The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Collapse posts
I get complaints from members about off-topic posts which can spoil their reading enjoyment. Is it possible to make posts collapsible to hide the off-topic posts so that an individual can control which posts are displayed in a thread?
|
#2
|
|||
|
|||
hmm... thats a good idea.
shouldnt be hard, just a template mod. see if vbt has it. |
#3
|
|||
|
|||
Thanks, I've posted this to vB Templates:
http://www.vbulletintemplates.com/mo...7616#post57616 ---------------------------------------------------------------------------- <!-- / user info --> </td> </tr> <tbody id="collapseobj_my_table_$post[postid]" style="$vbcollapse[collapseobj_my_table_$post[postid]]"> <tr> <td class="alt1"> <!-- message, attachments, sig --> ----------------------------------------------------------------------------- I've added the yellow code to the postbit template and am getting this error: The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected T_VARIABLE, expecting ']' in /hsphere/local/home/worldate/world-a-team.com/includes/adminfunctions_template.php(3055) : eval()'d code on line 92 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. ---------------------------------------------------------------------------------------- How do I correct this? |
#4
|
|||
|
|||
Have you touched any of the IF conditionals?
|
#5
|
||||
|
||||
this:
HTML Code:
<tbody id="collapseobj_my_table_$post[postid]" style="$vbcollapse[collapseobj_my_table_$post[postid]]">
HTML Code:
<tbody id="collapseobj_my_table_$post[postid]" style="$vbcollapse[collapseobj_my_table_$post[postid]">
|
#6
|
|||
|
|||
Please see this post to understand why I'm using a variable in the identifier.
Sabret00the, your code suggestion doesn't seem right. style="$vbcollapse[collapseobj_my_table_$post[postid]"> There is a square bracket after $vbcollapse which must be closed. I haven't touched any IF conditionals. When I use my_table as the identifier I don't get any parse errors. However, the posts don't collapse. Each post must have a unique identifier which is why the postid is used. But it won't parse. Looks like somebody else tried this a couple of years ago and had the same problem. http://www.vbulletintemplates.com/mo...59&postcount=2 ------------------------------------------------------------------ Okay, I managed to find a way to collapse both the member info and message text. They are two separate tables so each has to be collapsed individually. They both required different identifiers so I used postid for the message table and postcount for the user info table. Thanks to Mike Sullivan from vBulletin.com for helping. Additionally, the collapse state needs to be saved in a cookie somehow as it does for the collapsible tables elsewhere. Any help with this would be welcome. I've attached the postbit template as an .rtf wordpad document so that the code additions could be highlighted in bold and red. You can visit my site as a guest to see how it works. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|