Seite 1 von 1

Javascript - Rokbox & Kategorien ausblenden

Verfasst: 13.11.2009 00:21
von tmlk666
Hallo

erstens hoffe ich das ich das hier im richtigen Bereich poste
und zweitens das ich mein Problem gut genug erklären kann.

Also im allgemeinen Betrifft es glaub ich Javascript
und hierbei gehts um zwei "Mods".

Und zwar hatte ich schon seit ewigkeiten die Rokbox eingebaut hat auch super funktioniert bis jetzt.
Den letztens habe ich den Mod welcher die Kategorien einklappen kann eingebaut.
Beide arbeiten mit Javascript und es scheint das sich diese untereinander nicht vertragen oder ich muss die Codezeilen anders einfügen ?
Zumindest seit ich den Kategorie Mod installiert hatte ging die Rokbox nicht mehr
als ich die Codezeilen von der Rokbox dann NACH den Zeilen des Kat.Mod gestellt hatte ging zwar die Rokbox wieder aber das andere nicht mehr.

Also meine Frage gibt es begrenzungen an der Menge der Javascript"Zeilen"
oder falsch eingefügt und die Lösung

Und noch ein Anliegen so nebenbei.
Wer kann mir eine gute Lektüre bezüglich PHP / Mysql empfehlen welche sich eher an Einsteiger richtet (also einfach geschrieben ist)
Da ich jetzt seit mehr als einem Jahr ein Forum betreibe und schon viel ausprobiert habe denke ich
das es nicht schlecht wäre noch etwas tiefer in die Materie einzutauchen.


mfg und Danke schonmal

Re: Javascript - Rokbox & Kategorien ausblenden

Verfasst: 14.11.2009 12:41
von Boecki91
Bitte reiche mal ein paar Infos nach z.B. die Datei wo du etwas vorher und nachher einbaust.

Re: Javascript - Rokbox & Kategorien ausblenden

Verfasst: 17.11.2009 23:33
von tmlk666
Hallo

ich schätze mal das hier der Fehler versteckt ist

Overallheader.html

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<!-- INCLUDE ads/ads.js -->
<head>
<!--[if IE]>ACHTUNG zur optimalen Ansicht empfehlen wir FIREFOX - http://www.mozilla-europe.org/de/firefox/ - Dann ist auch diese nervige Nachricht weg !!!<![endif]-->
<script src="{T_THEME_PATH}/rokbox/mootools-release-1.11.js" type="text/javascript"></script>
<script src="{T_THEME_PATH}/rokbox/rokbox.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="{T_THEME_PATH}/rokbox/themes/dark/rokbox-style.css" />
<script src="{T_THEME_PATH}/rokbox/themes/light/rokbox-config.js" type="text/javascript"></script>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2002-2006 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<!--
	phpBB style name: prosilver
	Based on style:   prosilver (this is the default phpBB3 style)
	Original author:  Tom Beddard ( http://www.subBlue.com/ )
	Modified by:      Echo        ( http://www.echological.com )
	
	NOTE: This page was generated by phpBB, the free open-source bulletin board package.
	      The phpBB Group is not responsible for the content of this page and forum. For more information
	      about phpBB please visit http://www.phpbb.com
-->

<script type="text/javascript">
// <![CDATA[
	var jump_page = '{LA_JUMP_PAGE}:';
	var on_page = '{ON_PAGE}';
	var per_page = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';
	var style_cookie = 'phpBBstyle';
	var onload_functions = new Array();
	var onunload_functions = new Array();

	<!-- IF S_USER_PM_POPUP -->
		if ({S_NEW_PM})
		{
			var url = '{UA_POPUP_PM}';
			window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
		}
	<!-- ENDIF -->

	/**
	* Find a member
	*/
	function find_username(url)
	{
		popup(url, 760, 570, '_usersearch');
		return false;
	}

	/**
	* New function for handling multiple calls to window.onload and window.unload by pentapenguin
	*/
	window.onload = function()
	{
		for (i = 0; i <= onload_functions.length; i++)
		{
			eval(onload_functions[i]);
		}
	}

	window.onunload = function()
	{
		for (i = 0; i <= onunload_functions.length; i++)
		{
			eval(onunload_functions[i]);
		}
	}

// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/styleswitcher.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.cookie.js"></script>
<!-- IF X_UNREAD -->
<script type="text/javascript" src="{T_TEMPLATE_PATH}/unread_posts.js"></script>
<script type="text/javascript">
// <![CDATA[
   var x_length = <!-- IF X_MAR_ANZAHL -->{X_MAR_ANZAHL}<!-- ELSE -->10<!-- ENDIF -->;

   window.onload = function()
   {
      startswitch();
   }

// ]]>
</script>
<!-- ENDIF -->

<!-- IF S_NEW_DL_POPUP -->
<script language="Javascript" type="text/javascript">
// <![CDATA[
	window.open('{U_NEW_DOWNLOAD_POPUP}', '_blank', 'HEIGHT=225,resizable=yes,WIDTH=400');
// ]] >
</script>
<!-- ENDIF -->
    <script type="text/javascript">
    // <![CDATA[
    $(document).ready(function() {

       var id = [];
       
       $("[id^='fid']").each(function() {
          id.push( $(this).attr("id").replace('fid','') );
       });
       
       for (var i = 0; i < id.length; i++)
       {
          $('#fid' + id[i]).css("font-family","Lucida Console");
          
          if ($.cookie('{COOKIE_NAME}_cb_' + id[i]) == 'collapsed')
          {
             $('#fid' + id[i]).text('*');
             $('#fid' + id[i]).addClass('cb_collapsed');
             $('#frow' + id[i]).css("display","none");
          } else
          {
             $('#fid' + id[i]).text('#');
             $('#fid' + id[i]).addClass('cb_expanded');
          }
          
          $('#fid' + id[i]).click(function()
          {
             var thisid = $(this).attr("id").replace('fid','');
             
             if ($(this).attr('class') == 'cb_collapsed')
             {
                $.cookie('{COOKIE_NAME}_cb_' + thisid, null)
                $(this).text('#')
                $(this).removeClass('cb_collapsed')
                $(this).addClass('cb_expanded')
                $("#frow" + thisid).slideDown(200)
             } else
             {
                $.cookie('{COOKIE_NAME}_cb_' + thisid, 'collapsed', { expires: 365 })
                $(this).text('*')
                $(this).removeClass('cb_expanded')
                $(this).addClass('cb_collapsed')
                $("#frow" + thisid).slideUp(200)
             }
          });
       }
    });
    // ]]>
    </script>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<!-- IF S_HAS_HOOKUP -->
<link href="{T_THEME_PATH}/hookup.css" rel="stylesheet" type="text/css" />
<link href="{T_THEME_PATH}/calendar-system.css" rel="stylesheet" type="text/css" />
<!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />

<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />

...........
Dieser Abschnitt ist für die RockBox zuständig

Code: Alles auswählen

<script src="{T_THEME_PATH}/rokbox/mootools-release-1.11.js" type="text/javascript"></script>
<script src="{T_THEME_PATH}/rokbox/rokbox.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="{T_THEME_PATH}/rokbox/themes/dark/rokbox-style.css" />
<script src="{T_THEME_PATH}/rokbox/themes/light/rokbox-config.js" type="text/javascript"></script>
Und die beiden hier für die Ausblendung der Kategorien

Code: Alles auswählen

<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.cookie.js"></script>

Code: Alles auswählen

        <script type="text/javascript">
        // <![CDATA[
        $(document).ready(function() {

           var id = [];
           
           $("[id^='fid']").each(function() {
              id.push( $(this).attr("id").replace('fid','') );
           });
           
           for (var i = 0; i < id.length; i++)
           {
              $('#fid' + id[i]).css("font-family","Lucida Console");
             
              if ($.cookie('{COOKIE_NAME}_cb_' + id[i]) == 'collapsed')
              {
                 $('#fid' + id[i]).text('[+]');
                 $('#fid' + id[i]).addClass('cb_collapsed');
                 $('#frow' + id[i]).css("display","none");
              } else
              {
                 $('#fid' + id[i]).text('[-]');
                 $('#fid' + id[i]).addClass('cb_expanded');
              }
             
              $('#fid' + id[i]).click(function()
              {
                 var thisid = $(this).attr("id").replace('fid','');
                 
                 if ($(this).attr('class') == 'cb_collapsed')
                 {
                    $.cookie('{COOKIE_NAME}_cb_' + thisid, null)
                    $(this).text('[-]')
                    $(this).removeClass('cb_collapsed')
                    $(this).addClass('cb_expanded')
                    $("#frow" + thisid).slideDown(200)
                 } else
                 {
                    $.cookie('{COOKIE_NAME}_cb_' + thisid, 'collapsed', { expires: 365 })
                    $(this).text('[+]')
                    $(this).removeClass('cb_expanded')
                    $(this).addClass('cb_collapsed')
                    $("#frow" + thisid).slideUp(200)
                 }
              });
           }
        });
        // ]]>
        </script>

Es wäre absolut super wenn da jemand eine Lösung hätte


mfg