The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Collapsable Quotes Details »» | |||||||||||||||||||||||||
As requested in this thread
Collapsable Quote Mod What does it do? ================== Sometimes, when others post lots of quotes, or very long ones, you might get the wish to hide the quoted text and only read the new posted message. Now you can This little mod makes the quotes collapsable, like the categories on the forumhome or other areas of vBulletin. Installation ============== To apply this go to: AdminCP -> Style Manager -> Edit templates -> "BB Code Layout Templates" group -> Template: "bbcode_quote" Edit that template, cut out (=delete) EVERYTHING that's in there and paste this back in: Code:
<div style="margin:20px; margin-top:5px; <if condition="$show['iewidthfix']">width: 100%;</if>"> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%"> <if condition="$show[quoteid]=$show[quoteid] + 1 + $vbulletin->userinfo[lastactivity]"></if> <tr> <td class="tcat"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('quote_$show[quoteid]')"><img id="collapseimg_quote_$show[quoteid]" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a> <div class="smallfont" style="margin-bottom:2px"> <a href="#top" onclick="return toggle_collapse('quote_$show[quoteid]')">$vbphrase[quote] <if condition="$show['username']">($username)</if>: <em>(click to expand/collapse)</em></a> </div> </td> </tr> <tbody id="collapseobj_quote_$show[quoteid]" style="{$collapseobj_forumid}"> <tr> <td class="alt2" style="border:1px inset"> <if condition="$show['username']"> <div><phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase></div> <div style="font-style:italic">$message</div> <else /> $message </if> </td> </tr> </tbody> </table> </div> <script type="text/javascript"> <!-- toggle_collapse('quote_$show[quoteid]'); --> </script> Hit "SAVE" and you're done *** If you are one of the lucky folks that have the "Template Manager" installed: *** You can simply take the template .XML also supplied as download and import it via the template manager -> even faster and more easy done (you might have to check "overwrite templates" when importing) What else? ============ By default this collapsable quotes start up collapsed! So if a user wants to read the quoted text he has to uncollapse it. If you want it the other way round, users can collapse quotes they do not want to waste space for the moment: Remove (or leave out at install) the last three lines of the template: Code:
<script type="text/javascript"> <!-- toggle_collapse('quote_$show[quoteid]'); --> </script> That's it. Have fun Show Your Support
|
Comments |
#32
|
|||
|
|||
Quote:
On my live board I have that set to "0", my board isn't that huge that I need the cache to pull load off the server.... Quote:
The only stupid question is the one not asked We all started at square one and had to ask our way through |
#33
|
|||
|
|||
Quote:
Quote:
|
#34
|
|||
|
|||
One quick question, the phrase Quote(user):click to expand /contract isn't showing up as the font colour is the same as the background (red), from the code it looks like the font style is smallfont yet my smallfont in my style is white. How do i change that colour please??
|
#35
|
||||
|
||||
We have a spoiler code and I modified that one to make collapsable quotes. Nesting and Cache proof.
Same template bbcode_quote, replace the whole content: Code:
<div style="margin:5px 20px 20px 20px"> <div class="smallfont" style="margin-bottom:2px"> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }"> <if condition="$show['username']"> <phrase 1="$username">$vbphrase[originally_posted_by_x]</phrase>: click show to read. <else /> Quote: click show to read. </if> </div> <div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"> <div style="display: none;"> <class="alt2" style="border:1px inset"> <if condition="$show['username']"> <div style="font-style:italic">$message</div> <else /> $message </if> </div> </div> </div> |
#36
|
|||
|
|||
Updated Today?
|
#37
|
|||
|
|||
This would be great if it would check to see how many lines where in the quote before collapsing it.
Maybe 4 lines or less and the quote isn't collapsed. |
#38
|
|||
|
|||
Would it be possible to create a collapse field, but still be still be open with scrollbar. I do not know if select all can be made without file editing. see image below and follow link to site that has this a functional one. I notice it requires files edits to make for that brand of message board.
Demo http://forums.phpmix.org/viewtopic.php?p=1164#1164 http://forums.phpmix.org/viewtopic.php?p=1165#1165 |
#39
|
||||
|
||||
In order to remove the redundant attribution...
From this: Quote (Max): (click to expand/collapse) Originally Posted by Max This is a test... to this: Quote (Max): This is a test... Here's the code I modified. Code:
<div style="margin:20px; margin-top:5px; <if condition="$show['iewidthfix']">width: 100%;</if>"> <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%"> <if condition="$show[quoteid]=$show[quoteid] + 1 + $vbulletin->userinfo[lastactivity]"></if> <tr> <td class="tcat"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('quote_$show[quoteid]')"><img id="collapseimg_quote_$show[quoteid]" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a> <div class="smallfont" style="margin-bottom:2px"> <a href="#top" onclick="return toggle_collapse('quote_$show[quoteid]')">$vbphrase[quote] <if condition="$show['username']">($username)</if></a> </div> </td> </tr> <tbody id="collapseobj_quote_$show[quoteid]" style="{$collapseobj_forumid}"> <tr> <td class="alt2" style="border:1px inset"> <if condition="$show['username']"> <div style="font-style:italic">$message</div> <else /> $message </if> </td> </tr> </tbody> </table> </div> Thanks for a great hack! |
#40
|
||||
|
||||
How can I make the "banner" a bit thinner? Users are complaining that it's distracting.
Actually, some users really don't like this change, and don't see why you'd want to collapse a quote in the first place at all. And of course, others love it. Like your Quoted IMG->URL hack, can this be made a user preference, Hellcat? Allow each user to choose, in UserCP -> Edit Options: Quoting: Old style vs. new style If new style, Default to collapsed vs. Default to expanded |
#41
|
|||
|
|||
Hi.... One simple question.... I would love to use this but as a NEW BBCode.... I mean: [ spoiler ]something[ /spoiler ]
But i need something to replace the "quote_$show[quoteid]" in order to work as a separate BBCode... Here's what i've got.. It works when only is a single "quote", but it doesn't when there ara more than one... Code:
<div style="margin:20px; margin-top:5px;"> <table class="tborder" border="0" width="100%"> <tr> <td class="thead"> <div class="smallfont" style="margin-bottom:2px"> <a href="#top" onclick="return toggle_collapse('quote_$show[quoteid]')"><b>Spoiler</b> | Hace click para ver / ocultar</a> </div> </td> </tr> <tbody id="collapseobj_quote_$show[quoteid]" style="{$collapseobj_forumid}"> <tr> <td class="alt2"> {param} </td> </tr> </tbody> </table> </div> <script type="text/javascript"> <!-- toggle_collapse('quote_$show[quoteid]'); --> </script> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|