View Full Version : Thread ID into collapseobj
TygerTyger
04-04-2006, 04:16 PM
PHP syntax isn't my strongest point...I want to put a $thread[threadid] value inside a $vbcollapse[collapseobj_threadidgoeshere] and it's giving me:
Parse error: parse error, unexpected T_VARIABLE, expecting ']'
The $thread[threadid] is used inside tlist inside the same template, what is the problem with putting it where I want?
Thanks for your help.
Edit: Specifically this is what I want:
id="collapseobj_foo$thread[threadid]" style="$vbcollapse[collapseobj_foo$thread[threadid]]"
The id is fine, the style one gives the error. As yet curly braces and/or escaping have made no difference.
TygerTyger
04-06-2006, 10:17 AM
No? Nobody knows why the threadid var would produce an error inside the style tag?
SleekSkins
04-06-2006, 04:08 PM
I don't think you can use [] inside [], but I don't know a way around it either.
TygerTyger
04-06-2006, 04:40 PM
You can, it's done in several other places in the postbit template.
DeveloperGuy
05-29-2006, 08:56 PM
Did anyone figure out how to do this?
TygerTyger
05-29-2006, 09:01 PM
Well I never did, and the guys on the vBulletin.com forum seemed equally stumped as to how it could be done. In fact they didn't even appear to know why it was used elsewhere in the same template but produced an error where I wanted it.
I'd still like to do be able to do it.
ams3521
05-15-2008, 01:39 AM
Hello does anyone know how to make a menu default as closed when using this code? I have a sidebar on my forum and the menus default as open. I would like them to stay closed. Thanks
<!-- partners -->
<div class="leftmenutitle">
<div class="floatleft">Stuff</div><div class="floatright"><a href="#top" onClick="return toggle_collapse('partners8')"><img id="collapseimg_partners" src="$vboptions[bburl]/skin_images/buttons/collapse_tcat$vbcollapse[collapseimg_tcat].gif" alt="" border="0" /></a></div>
</div>
<div id="collapseobj_partners8" style="$vbcollapse[collapseobj_partners8]">
<div class="leftmenucontent">
<ul class="partnerslist">
<li><a href="http://www.thedailypunt.com/forum/index.php?styleid=47" target="_blank">Old Theme</a></li>
<li><a href="http://www.thedailypunt.com/forum/index.php?styleid=57" target="_blank">Mobile Theme</a></li>
<li><a href="http://www.thedailypunt.com/forum/modapp.php" target="_self">Forum Mods Req</a></li>
<li><a href="http://thedailypunt.com/tdps-forum/" target="_self">tDPS Forum</a></li>
<li><a href="http://thedailypunt.com/wp-signup.php" target="_blank">Create tDPS</a></li>
</ul>
</div>
</div>
<!-- / partners -->
Dismounted
05-15-2008, 06:43 AM
Trigger the toggle_collapse() function with an "onload" parameter.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.