The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Namely the Collapse cookies. I am trying to write a script, but for some reason my cookies aren't being fetched to set the tbody style to be none or empty.
Sorry if I am not explaining it clearly, but I am not sure how to say what I am trying to do, hehe. It has something to do with $vbulletin->GPC['vbulletin_collapse'], but I can't figure out how exactly that function works. Does anyone know how to save collapsed/expanded tables? To clear things up a bit, when I click the expand/collapse image, the cookie DOES get written. The thing I am having problems with is the cookie getting pulled and set when the page reloads. |
|
#2
|
||||
|
||||
|
The cookie is read automatically in global.php
All you have to do is create your collapsible box correctly. Replace what's in red Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="180">
<thead>
<tr>
<td class="thead">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('MYBOX')"><img id="collapseimg_MYBOX" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_MYBOX].gif" alt="" border="0" /></a>
TITLE HERE
</td>
</tr>
</thead>
<tbody id="collapseobj_MYBOX" style="$vbcollapse[collapseobj_MYBOX]">
<tr>
<td class="alt1" nowrap="nowrap">CONTENTS HERE</td>
</tr>
</tbody>
</table>
|
|
#3
|
|||
|
|||
|
Ohh okay, I don't know why I didn't even think about that.
Thanks! |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|