Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Collapsible first posts like vb.org or collapse every post Details »»
Collapsible first posts like vb.org or collapse every post
Version: 1.00, by RyanFabbro RyanFabbro is offline
Developer Last Online: Jan 2015 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.7 Rating:
Released: 09-07-2012 Last Update: Never Installs: 4
Template Edits
Re-useable Code  
No support by the author.

this will allow each of your posts to be collapsible, i use it to only collapse the first post like here at vb.org.

in postbit legacy find:
Code:
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
below add:
Code:
<a href="#top" onclick="return toggle_collapse('firstpost_$post[postid]')"><img id="collapseimg_firstpost_$post[postid]" src="$stylevar[imgdir_button]/collapse_tcat{$vbcollapse['collapseimg_firstpost_' . $post[postid]]}.gif" alt="" border="0" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" /></a>
then find:
Code:
<tr valign="top">
above add
Code:
<tbody id="collapseobj_firstpost_$post[postid]" style="{$vbcollapse['collapseobj_firstpost_' . $post[postid]]}">
then search for
Code:
$template_hook[postbit_end]
above add
Code:
</tbody>
to only display on first post wrap that first code you add with the if condition like so:
Code:
<if condition="$post[postcount] == 1">
<a href="#top" onclick="return toggle_collapse('firstpost_$post[postid]')"><img id="collapseimg_firstpost_$post[postid]" src="$stylevar[imgdir_button]/collapse_tcat{$vbcollapse['collapseimg_firstpost_' . $post[postid]]}.gif" alt="" border="0" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" /></a>
</if>

Screenshots

File Type: jpg 9-7-2012 9-36-41 PM.jpg (43.0 KB, 0 views)
File Type: jpg 9-7-2012 9-37-06 PM.jpg (41.0 KB, 0 views)
File Type: jpg 9-7-2012 10-02-44 PM.jpg (59.6 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 11-10-2012, 12:34 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow thanks for this i will try it
Reply With Quote
  #3  
Old 11-13-2012, 06:26 AM
al2thero al2thero is offline
 
Join Date: Aug 2008
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will try it too
Reply With Quote
Reply


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 05:13 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.04062 seconds
  • Memory Usage 2,235KB
  • Queries Executed 17 (?)
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
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete