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

Reply
 
Thread Tools
Post Icon Collapse/Expand Details »»
Post Icon Collapse/Expand
Version: 1.00, by Princeton Princeton is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-22-2006 Last Update: Never Installs: 23
 
No support by the author.

A site I'm working on has about 50+ post icons ... the post icons are used as "tags". As you might have expected, it's a bit annoying waiting for all these icons to load.

So, I edited the posticons template to offer a collapse/expand feature. Just one template edit and the feature is visible everywhere posticons are enabled.

REPLACE posticons TEMPLATE WITH:
HTML Code:
<if condition="$show['posticons']">
    <script type="text/javascript">
    <!--
    function swap_posticon(imgid)
    {
        var out = fetch_object("display_posticon");
        var img = fetch_object(imgid);
        if (img)
        {
            out.src = img.src;
            out.alt = img.alt;
        }
        else
        {
            out.src = "$vboptions[cleargifurl]";
            out.alt = "";
        }
    }
    // -->
    </script>
<br />
    <table class="tborder" style="background-color:#E1E4F2" cellpadding="2" cellspacing="0" border="0" width="100%">
    <thead>
        <tr>
            <td class="tcat" colspan="15" style="padding:4px">
            <div class="smallfont"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('gtposticons')"><img id="collapseimg_gtposticons" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_gtposticons].gif" alt="" border="0" /></a>
            $xvbphrase[may_choose_icon_for_message]<strong>Post Icon</strong>:  <label for="rb_iconid_0"><input type="radio" name="iconid" value="0" id="rb_iconid_0" style="margin:0px;" tabindex="1" onclick="swap_posticon(null)" $iconchecked /> $vbphrase[no_icon]</label></div></td>
        </tr>        
    </thead>
    <tbody id="collapseobj_gtposticons" style="$vbcollapse[collapseobj_gtposticons]">
        <tr>
            <td class="" style="width:0px">&nbsp;</td>
            $posticonbits
            <if condition="$show['addedspan']"><td class="" colspan="$remainingspan">&nbsp;</td></if>
        </tr>
    </tbody>
    </table>
<else />
    <input type="hidden" name="iconid" value="0" />
</if>
TIPS
- change background color (style="background-color:#E1E4F2") of table to fit your site

Show Your Support

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

Comments
  #12  
Old 01-14-2008, 08:23 PM
lostgirl815 lostgirl815 is offline
 
Join Date: Apr 2006
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent! Thanks so much!
Reply With Quote
  #13  
Old 04-25-2008, 07:51 AM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, Nice share
Reply With Quote
  #14  
Old 09-25-2008, 01:16 AM
VikesRule VikesRule is offline
 
Join Date: Aug 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tim Skellett View Post
What changes do I need to make to the above script to make it automatically collapsed, so that it is only uncollapsed if people click the relevant button?

Many thanks in advance for all help.
Same question!
Reply With Quote
  #15  
Old 10-05-2008, 11:34 PM
compact123 compact123 is offline
 
Join Date: Jun 2006
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yhnaks sir, nice mod
Reply With Quote
  #16  
Old 04-03-2009, 02:02 PM
mmorse mmorse is offline
 
Join Date: Dec 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VikesRule View Post
Quote:
Originally Posted by Tim Skellett View Post
What changes do I need to make to the above script to make it automatically collapsed, so that it is only uncollapsed if people click the relevant button?

Many thanks in advance for all help.
Same question!
Change:
PHP Code:
<tbody id="collapseobj_gtposticons" style="$vbcollapse[collapseobj_gtposticons]"
To:
PHP Code:
<tbody id="collapseobj_gtposticons" style="display:none"
Reply With Quote
  #17  
Old 05-20-2009, 08:37 AM
lm3a.net's Avatar
lm3a.net lm3a.net is offline
 
Join Date: May 2009
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that's cool

thank you,,
Reply With Quote
  #18  
Old 03-08-2010, 12:48 AM
vijayninel's Avatar
vijayninel vijayninel is offline
 
Join Date: Mar 2009
Posts: 537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks working well in 3.8.4
Reply With Quote
  #19  
Old 04-25-2010, 08:04 AM
Kimberley Kimberley is offline
 
Join Date: Oct 2008
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone tell me how to align it so its centered and not cut off to the right please

screenshot below
Reply With Quote
  #20  
Old 04-25-2010, 08:41 AM
snowlion snowlion is offline
 
Join Date: Mar 2005
Location: STY
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kimberley View Post
Can someone tell me how to align it so its centered and not cut off to the right please

screenshot below
It's centered, just decrease the width of your images
Reply With Quote
  #21  
Old 04-25-2010, 01:19 PM
Kimberley Kimberley is offline
 
Join Date: Oct 2008
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

then can it be aligned left so i dont have to remake my images so smaller?
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 10:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09431 seconds
  • Memory Usage 2,311KB
  • Queries Executed 27 (?)
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
  • (1)bbcode_html
  • (2)bbcode_php
  • (4)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
  • (1)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_postinfo_query
  • fetch_postinfo
  • 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