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

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
  #2  
Old 04-23-2006, 03:10 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Princeton, your da man =D

I have around 25post icons :S
Reply With Quote
  #3  
Old 04-23-2006, 04:35 PM
Atakan KOC's Avatar
Atakan KOC Atakan KOC is offline
 
Join Date: Feb 2006
Location: Istanbul
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very Nice. Thanks.
Reply With Quote
  #4  
Old 01-04-2007, 08:22 PM
Muellmann's Avatar
Muellmann Muellmann is offline
 
Join Date: Jun 2006
Location: near keyboard
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you are a genius! :knockedout:
This is very useful to me because i have around 40 posticons.
The same for the smilies would be much appreciated
Reply With Quote
  #5  
Old 01-09-2007, 07:05 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I suggest moving the smilies below the editor.
You will be able to display more but I recommend 30 max per row ... the rest can be displayed in the smilies popup window.

check out my smilies below editor mod
Reply With Quote
  #6  
Old 05-21-2007, 03:37 PM
DiSpy's Avatar
DiSpy DiSpy is offline
 
Join Date: Feb 2007
Location: South Florida!!
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working on v3.6.7.

THANKS!
Reply With Quote
  #7  
Old 06-01-2007, 05:01 PM
713JunctionP 713JunctionP is offline
 
Join Date: Mar 2007
Location: Houston, TX
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as always, great mod. helps keep the site looking cleaner.

and again, although this mod was made on vB 3.5.x it worked on my 3.6.7 version! :up:
Reply With Quote
  #8  
Old 10-21-2007, 05:21 AM
boatdesign's Avatar
boatdesign boatdesign is offline
 
Join Date: Nov 2001
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was looking for something exactly like this; but I'm seeing a glitch. If I click the icon to hide the post icons, the setting isn't remembered so the next time I click on New Thread the post icons are all displayed again. The up / down ( show / hide ) setting isn't remembered like vBulletin remembers whether to hide or show the posting rules box (and once you hide it, keeps it hidden as you navigate through the site.)

I replaced my posticons template with the code shown, so I don't see how I could have messed this up; am I the only one seeing this behavior?
Reply With Quote
  #9  
Old 11-11-2007, 06:52 PM
Tim Skellett Tim Skellett is offline
 
Join Date: Sep 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 11-12-2007, 08:06 AM
nyunyu nyunyu is offline
 
Join Date: Dec 2004
Location: Malaysia
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and working great. thanks for the hack.
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 09:01 AM.


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.04855 seconds
  • Memory Usage 2,297KB
  • Queries Executed 23 (?)
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
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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