PDA

View Full Version : Show Thread Enhancements - Collapsable Posts


Madlike
08-03-2010, 10:00 PM
Collapsable Posts

You can collapse posts with this small template modification.

Installation:

<if condition="$vboptions['legacypostbit']">

1-) Find in postbit_legacy template:

<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>

Add above:

<a href="#top" onclick="return toggle_collapse('ackapat_$post[postid]')"><img id="collapseimg_ackapat_$post[postid]" src="$stylevar[imgdir_button]/collapse_tcat{$vbcollapse['collapseimg_ackapat_' . $post[postid]]}.gif" alt="" border="0" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" /></a>

2-) Find again:

<tr valign="top">
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">

Add above:

<tbody id="collapseobj_ackapat_$post[postid]" style="{$vbcollapse['collapseobj_ackapat_' . $post[postid]]}">

3-) Find again:

</table>
$template_hook[postbit_end]

Add above:

</tbody>

<else />

1-) Find in postbit template:

<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" />
</if>

Add above:

<a href="#top" onclick="return toggle_collapse('ackapat_$post[postid]')"><img id="collapseimg_ackapat_$post[postid]" src="$stylevar[imgdir_button]/collapse_tcat{$vbcollapse['collapseimg_ackapat_' . $post[postid]]}.gif" alt="" border="0" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" /></a>

2-) Find again:

<tr>
<td class="alt2" style="padding:0px">

Add above:

<tbody id="collapseobj_ackapat_$post[postid]" style="{$vbcollapse['collapseobj_ackapat_' . $post[postid]]}">

3-) Find again:

</table>
$template_hook[postbit_end]

Add above:

</tbody>

</if>

Done! - Mark As Installed (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=247959)

Hell Bomb
08-05-2010, 10:06 AM
Very nice, I might just look back into this in a few days, tagged for now.

grey_goose
08-05-2010, 10:04 PM
It seems so cool... yet I'm not sure if I actually have a use for it :D

tschai
09-21-2010, 06:15 PM
Just what I needed...works like a charm!
Ellerine saglik.