Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Collapsable Quotes Details »»
Collapsable Quotes
Version: 1.02, by Hellcat Hellcat is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-31-2006 Last Update: 02-02-2006 Installs: 38
Template Edits
 
No support by the author.

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>
If that part is removed/left out all quotes start up uncollapsed and visible.


That's it.

Have fun

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-02-2006, 05:55 PM
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gizmo999
Thank you for explaining that better than I could.
That would be the first time Gizmo999 English is not my native language.
Reply With Quote
  #23  
Old 02-02-2006, 06:18 PM
Gizmo999 Gizmo999 is offline
 
Join Date: Dec 2005
Location: In my own virtual world
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TosaInu
That would be the first time Gizmo999 English is not my native language.
its meant to be mine but I'm from the far north, almost into Scotland so my dialect is different
Reply With Quote
  #24  
Old 02-02-2006, 06:26 PM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I might have an idea why this happens....
I'll look into this tonight and keep you posted!
Reply With Quote
  #25  
Old 02-02-2006, 06:39 PM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hellcat
I might have an idea why this happens....
I'll look into this tonight and keep you posted!
thankx man...we are waiting.....
plz give a thought about ignore image in quote...


thnx
Reply With Quote
  #26  
Old 02-02-2006, 07:24 PM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zia
thankx man...we are waiting.....
plz give a thought about ignore image in quote...

thnx
You want [img] tags in quotes striped?
Or (IMO better) converted to [url] tags?

Hmm.... that would be a different thing, but should be possible to do pretty easy with a plugin at the right hook....

[high]* Hellcat thinks[/high]
Reply With Quote
  #27  
Old 02-02-2006, 07:30 PM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx man...
did u figured out the probs..describe last post..

quote-inside a quote it showd the "paid subscriber link" ?

: give a deep deep think...
[high]* Zia offers hellcat a chilled bear & a cigar...[/high]
Reply With Quote
  #28  
Old 02-02-2006, 11:40 PM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No clue where a subscription link could come from.

But I (hopfully) solved the "Later quote collapses/expands quote from earlier post" problem.

Replace this line:
Code:
<if condition="$show[quoteid]=$show[quoteid]+1"></if>
with this one:
Code:
<if condition="$show[quoteid]=$show[quoteid] + 1 + $vbulletin->userinfo[lastactivity]"></if>
Instsructions and attachments have already been updated, hopfully that does the trick, let me know if there are still issues
Reply With Quote
  #29  
Old 02-03-2006, 06:50 AM
Gizmo999 Gizmo999 is offline
 
Join Date: Dec 2005
Location: In my own virtual world
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry

I applied the code change but its still the same only now the first quote opens "expanded" and has same problem - subsequent quotes are "expanded" clicking collapse closes the very first one

Thanks for the time and effort on this
Reply With Quote
  #30  
Old 02-03-2006, 06:58 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gizmo999
Sorry

I applied the code change but its still the same only now the first quote opens "expanded" and has same problem - subsequent quotes are "expanded" clicking collapse closes the very first one

Thanks for the time and effort on this
That might most likely be caused by vB's caching....
I experienced that myself during my experiments and didn't find a way (yet) to counteract it.

Try this:
On a post that seems to "ignore" the last modification to the template, edit and save that post and try again - should work now.

Try to post some some quote-posts in a test thread and look if everythings works there.
If it does -> it's the vB cache still pulling the old version of the template.

That cache is EVIL!
I disabled it on my boards....
Reply With Quote
  #31  
Old 02-03-2006, 08:09 AM
Gizmo999 Gizmo999 is offline
 
Join Date: Dec 2005
Location: In my own virtual world
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hellcat
That might most likely be caused by vB's caching....
I experienced that myself during my experiments and didn't find a way (yet) to counteract it.

I disabled it on my boards....
Is that the post caching in admin Cp>server settings/optimisation ?? sorry, I'm new to all this
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11338 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete