The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
collapse help please
I am trying to add collapsable genres to my vb jukebox i have used the code belos to form the genre sections, and the sections do open and close when clicking the image ..... however any that i have closed once i refresh display as open again ....... what do i need to do to fix this so colsed genres stay closed on refresh?
Tnx in advance HTML Code:
<tbody> <tr> <td class="tcat" colspan="5"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$jbgenre')"><img id="collapseimg_forumbit_$jbgenre" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_jbgenre}.gif" alt="" border="0" /></a> $genrename[genre]</div> </td> </tr> </tbody> <tbody id="collapseobj_forumbit_$jbgenre" style="{$collapseobj_jbgenre}"> $playlist </tbody> |
#2
|
||||
|
||||
Looks strange ...
Try this: HTML Code:
<tbody> <tr> <td class="tcat" colspan="5"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$jbgenre')"><img id="collapseimg_forumbit_$jbgenre" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumbit_$jbgenre].gif" alt="" border="0" /></a> $genrename[genre]</div> </td> </tr> </tbody> <tbody id="collapseobj_forumbit_$jbgenre" style="$vbcollapse[collapseobj_forumbit_$jbgenre]"> $playlist </tbody> |
#3
|
||||
|
||||
Thanks Kirby i used your code and the same thing happens ..... is there any php code required for my script maybe?
heres a screenie your revised error gives me an error Parse error: parse error, unexpected T_VARIABLE, expecting ']' in /var/www/html/upload/includes/adminfunctions_template.php(3054) : eval()'d code on line 4 |
#4
|
||||
|
||||
No, should work.
But my first post still had some bugs ^.^ |
#5
|
||||
|
||||
ill try it again
same error when i try to save the template The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected T_VARIABLE, expecting ']' in /var/www/html/upload/includes/adminfunctions_template.php(3054) : eval()'d code on line 4 This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. |
#6
|
||||
|
||||
Theoretically, this is the correct code, but as you need a variable as part of the key for $vbcollapse parsing fails.
(To see what I mean just put $foo[foo_$bar] in an empty template and try to save it) Therefore you must construct variables in PHP that hold $vbcollapse["collapseobj_forumbit_$jbgenre"] $vbcollapse["collapseimg_forumbit_$jbgenre"] I forgot about this problem when posting the code as I did not try to compile it |
#7
|
||||
|
||||
ok so if i add in the php
PHP Code:
|
#8
|
||||
|
||||
I'd try
PHP Code:
But then it should work. |
#9
|
||||
|
||||
Wootness .... Thank you for your time
Lets re pach and reelease the upgrade |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|