Show/Hide Sticky Posts (collapsible)
This modification is in the archives.
Made this for myself so decided to release here. Just tried it and it seems to work fine.
What does it do? Many of my forums have a lot of sticky threads. For me, they were taking up too much of the FORUMDISPLAY view. Adding this code will allow you and your users to optionally collapse/expand all sticky posts on FORUMDISPLAY and adds a seperator when they are displayed thanks to Oblivion Knight Spoiler (click to open)
Quote by Boofo
Ouch! 4 if conditions just for that.?
Would this not be better (2 if conditions)? HTML Code:
<tr><td class="thead" colspan="<if condition="$show['threadicons'] AND $show['inlinemod']">7<else /><if condition="($show['threadicons'] AND !$show['inlinemod']) OR (!$show['threadicons'] AND $show['inlinemod'])">6<else />5</if></if>"> </td></tr> HTML Code:
<tr><td class="thead" colspan="<if condition="$show['threadicons'] AND $show['inlinemod']">7<else /><if condition="($show['threadicons'] AND !$show['inlinemod']) OR (!$show['threadicons'] AND $show['inlinemod'])">6<else />5</if></if>"><img src="$vboptions[cleargifurl]" width="1" height="1" alt="" /></td></tr> Close
What is left? I have no clue how to do it but if someone would like to help out and tell me how to have the text "Show|Hide Sticky Threads" instead display "Show Sticky Threads" when they are hidden and "Hide Sticky Threads" when they are being displayed, that would be nice. It would also be nice if the could be on a per forum basis rather than always hide/show stickies across the board but that is well beyond me also. Open FORUMDISPLAY template Find: Code:
$threadbits_sticky Code:
<thead> <tr> <td class="thead" colspan="<if condition="$show['threadicons'] AND $show['inlinemod']">7<else /><if condition="($show['threadicons'] AND !$show['inlinemod']) OR (!$show['threadicons'] AND $show['inlinemod'])">6<else />5</if></if>"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('hidesticky')">Show|Hide Sticky Threads <img id="collapseimg_hidesticky" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_hidesticky].gif" alt="" border="0" /></a> </td> </tr> </thead> <tbody id="collapseobj_hidesticky" style="$vbcollapse[collapseobj_hidesticky]"> <tr> <td class="alt1"> Code:
<tr><td class="tcat" colspan="<if condition="$show['threadicons'] AND $show['inlinemod']">7<else /><if condition="($show['threadicons'] AND !$show['inlinemod']) OR (!$show['threadicons'] AND $show['inlinemod'])">6<else />5</if></if>"><img src="$vboptions[cleargifurl]" width="1" height="1" alt="" /></td></tr> </td> </tr> </tbody> Screens added. Download This modification is archived and cannot be downloaded. Screenshots
|