Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Post Icons - drop down list (good for lots of icons!) Details »»
Post Icons - drop down list (good for lots of icons!)
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-15-2004 Last Update: Never Installs: 17
 
No support by the author.

This hack will put all the post icons into a dropdown list instead, which will save lots of space especially if you have lots of post icons available (or WANT to have a lot of post icons available )

Look at attached screenshot to see how it looks like
If you have a suggestion, let me know!

Anyways, here we go

Please make sure that all your icons have a title because this title will be shown in the dropdown menu! Otherwise it will be blank; it will still work and people can select it, but it doesn't help in knowing what the icon will show

Instructions

Open up includes/functions_newpost.php and find
PHP Code:
        if ($seliconid == $iconid)
        {
            
$iconchecked HTML_CHECKED;
            
$selectedicon = array('src' => $iconpath'alt' => $alttext);
        }
        else
        {
            
$iconchecked '';
        } 
Replace with
PHP Code:
    if ($seliconid == $iconid
    { 
        if (
$show['dropdownicons']) 
        { 
            
$iconselect " selected"
        } 
        else 
        { 
            
$iconchecked HTML_CHECKED
            
$selectedicon = array('src' => $iconpath'alt' => $alttext); 
        } 
    } 
    else 
    { 
        if (
$show['dropdownicons']) 
        { 
            
$iconselect ''
        } 
        else 
        { 
            
$iconchecked ''
        } 
    } 
Find:
PHP Code:
    $show['posticons'] = false
Below, add
PHP Code:
    $show['dropdownicons'] = 1;

    if (
$show['dropdownicons'])
    {
        
$posticondropdown '<option value="0">' $vbphrase[no_icon] . '</option>';

    } 
Find:
PHP Code:
        eval('$posticonbits .= "' fetch_template('posticonbit') . '";'); 
Below, add
PHP Code:
        eval('$posticondropdown .= "' fetch_template('posticon_dropdown') . '";'); 
Open up posticons template and find
HTML Code:
				<td width="12%" nowrap="nowrap"><label for="rb_iconid_0"><input type="radio" name="iconid" value="0" id="rb_iconid_0" tabindex="1" onclick="swap_posticon(null)" $iconchecked />$vbphrase[no_icon] &nbsp; &nbsp;</label></td>
				$posticonbits
Replace it with
HTML Code:
				<if condition="$show['dropdownicons']"><td><select name="iconid" id="iconid" onchange="changeImage(this.value)">$posticondropdown</select> <img id="posticonimage" /></td><else /><td width="12%" nowrap="nowrap"><label for="rb_iconid_0"><input type="radio" name="iconid" value="0" id="rb_iconid_0" tabindex="1" onclick="swap_posticon(null)" $iconchecked />$vbphrase[no_icon] &nbsp; &nbsp;</label></td>$posticonbits</if>
Find
HTML Code:
	// -->
Above, add
HTML Code:
	<if condition="$show['dropdownicons']">
function changeImage(selVal)
{
if (selVal != 0)
{
 document.getElementById('posticonimage').src = selVal;
}
else
{
document.getElementById('posticonimage').src = 'clear.gif';
}
}
	</if>
Create a new template called posticon_dropdown with the following content:
HTML Code:
<option value="$iconpath"$iconselect>$alttext</option>
All done! Now if you ever want to turn this off and use the old way of viewing post icons, then just change $show['dropdownicons'] = 1; in includes/functions_newpost.php to $show['dropdownicons'] = 0; (basically just change 1 to 0.)

I hope you enjoy this hack

Show Your Support

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

Comments
  #32  
Old 03-25-2004, 10:40 AM
Fibe Fibe is offline
 
Join Date: Oct 2002
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh my god....

I thought everything worked fine, but when i select and icon when posting it doesn't showup !

Anyone have any clue what i could have messed up this time?
Reply With Quote
  #33  
Old 04-02-2004, 06:29 AM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fibe
oh my god....

I thought everything worked fine, but when i select and icon when posting it doesn't showup !

Anyone have any clue what i could have messed up this time?
exact same issue ..

everything looks like it works, i can select the icon, it shows up next to it .. then i push post, and no icon appears in the forum.. ?!
Reply With Quote
  #34  
Old 04-02-2004, 07:44 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W



Find
HTML Code:
	// -->
Above, add
HTML Code:
	<if condition="$show['dropdownicons']">
function changeImage(selVal)
{
if (selVal != 0)
{
 document.getElementById('posticonimage').src = selVal;
}
else
{
document.getElementById('posticonimage').src = 'clear.gif';
}
}
	</if>
Where do these steps go??
Reply With Quote
  #35  
Old 04-02-2004, 07:48 AM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
Where do these steps go??
posticon template.
Reply With Quote
  #36  
Old 04-02-2004, 08:02 AM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks noonespecial.

I've got the same issue as others. It appears to work. But back in thread view no icons change. They only appear to change when you select them from the menu.
Reply With Quote
  #37  
Old 04-02-2004, 09:26 AM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
Thanks noonespecial.

I've got the same issue as others. It appears to work. But back in thread view no icons change. They only appear to change when you select them from the menu.
exactly.. slightly annoyed at the moment, but i am hoping the author will be on tomorrow, and sort this all out .. so, for now this remains uninstalled with a sincere hope to get it fixed and working, because I have way too many icons on my website .. and this would save so much bandwidth, loading time ..
Reply With Quote
  #38  
Old 04-03-2004, 06:36 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance for a fix Gary?
Reply With Quote
  #39  
Old 04-03-2004, 10:25 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jolten
Any chance for a fix Gary?
I'm working on it, just real busy
Reply With Quote
  #40  
Old 04-03-2004, 10:26 PM
noonespecial noonespecial is offline
 
Join Date: Nov 2002
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
I'm working on it, just real busy
yay!!!.. i've been working on it too, so far no luck .. and well, i suck. so that's prolly why.
Reply With Quote
  #41  
Old 04-09-2004, 09:22 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This one works like a charm for me:

https://vborg.vbsupport.ru/showthrea...ght=post+icons
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 01:52 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.04932 seconds
  • Memory Usage 2,338KB
  • 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
  • (7)bbcode_html
  • (6)bbcode_php
  • (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