Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Post Icons - drop down list (good for lots of icons!) Details »
Post Icons - drop down list (good for lots of icons!)
Mod Version: 1.00, by Gary King (Member) Gary King is offline
Developer Last Online: May 2018 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (2 votes - 5.00 average) Installs: 17
Released: 16 Mar 2004 Last Update: Never Downloads: 1
Not Supported  

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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Find:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Below, add
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Find:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Below, add
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Open up posticons template and find
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Find
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Above, add
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Create a new template called posticon_dropdown with the following content:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	posticons.jpg
Views:	1811
Size:	26.2 KB
ID:	17352  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 16 Mar 2004, 21:59
Owen Owen is offline
 
Join Date: Jan 2002
how much good is this if it doesnt show the actual icons in the list?
Reply With Quote
  #3  
Old 16 Mar 2004, 22:15
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
If someone has the Javascript where I can display the image depending on the value selected, then I would be more than happy to add it in
Reply With Quote
  #4  
Old 16 Mar 2004, 22:22
Owen Owen is offline
 
Join Date: Jan 2002
I dont think its possible with regular drop down menu's... Maybe its possible to use one of those vb3 dropdown menu's?
Reply With Quote
  #5  
Old 16 Mar 2004, 22:30
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Nevermind I got it I will add it in a sec
Reply With Quote
  #6  
Old 16 Mar 2004, 22:39
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Okay updated It now shows the icons - BUT, it will only work when icons are in the images/icons/ folder and in the correct file format, for now. So it will work with default vB3 icons. If you add any new icons, just make sure they are the same format and same folder.
Reply With Quote
  #7  
Old 16 Mar 2004, 22:48
alkatraz alkatraz is offline
 
Join Date: Oct 2002
Location: Vancouver, Canada
Real name: Colin
cool hack!
__________________
-alkatraz
Northwest Nissans Classifeds
Reply With Quote
  #8  
Old 17 Mar 2004, 02:20
Pikok Pikok is offline
 
Join Date: Jul 2002
Originally Posted by Gary W
Okay updated It now shows the icons - BUT, it will only work when icons are in the images/icons/ folder and in the correct file format, for now. So it will work with default vB3 icons. If you add any new icons, just make sure they are the same format and same folder.
Why not use this in includes/functions_newpost.php:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This in the posticons template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This in the posticon_dropdown template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That would use the correct SRC path for all icons and would also have the icon pre-selected if the post already had one (i.e. when editing).
Reply With Quote
  #9  
Old 17 Mar 2004, 02:48
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by Pikok
Why not use this in includes/functions_newpost.php:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This in the posticons template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This in the posticon_dropdown template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That would use the correct SRC path for all icons and would also have the icon pre-selected if the post already had one (i.e. when editing).
Okay I integrated your steps now
Reply With Quote
  #10  
Old 17 Mar 2004, 05:15
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Real name: Marco
This one is good for coding similiar hacks, great one!
Reply With Quote
  #11  
Old 17 Mar 2004, 08:32
Owen Owen is offline
 
Join Date: Jan 2002
ah nifty, forgot to think you could load the image next to it.

Good Work.
Reply With Quote
  #12  
Old 20 Mar 2004, 13:53
Fibe Fibe is offline
 
Join Date: Oct 2002
For some reason, i now have dropdown AND the original list to chose from.

Any idea what could be wrong?
Reply With Quote
  #13  
Old 20 Mar 2004, 15:14
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by Fibe
For some reason, i now have dropdown AND the original list to chose from.

Any idea what could be wrong?
You didn't follow instructions properly then

The code you did wrong was in the posticons template.
Reply With Quote
  #14  
Old 20 Mar 2004, 16:00
Fibe Fibe is offline
 
Join Date: Oct 2002
hmm i just double checked and everything is like it should be. afaik
<if condition="$show['posticons']">
<script type="text/javascript">
<!--
function swap_posticon(imgid)
{
out = fetch_object("display_posticon");
img = fetch_object(imgid);
if (img)
{
out.src = img.src;
out.alt = img.alt;
}
else
{
out.src = "$vboptions[cleargifurl]";
out.alt = "";
}
}
<if condition="$show['dropdownicons']">
function changeImage(selVal)
{
if (selVal != 0)
{
document.getElementById('posticonimage').src = selVal;
}
else
{
document.getElementById('posticonimage').src = 'clear.gif';
}
}
</if>
// -->
</script>
<fieldset class="fieldset" style="margin:10px 0px 0px 0px">
<legend>$vbphrase[post_icons]</legend>
<div style="padding:$stylevar[formspacer]px">
<table cellpadding="0" cellspacing="$stylevar[cellspacing]" border="0" width="95%">
<tr>
<td colspan="15"><div style="margin-bottom:$stylevar[formspacer]px">$vbphrase[may_choose_icon_for_message]:</div></td>
</tr>
<tr>
<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>


$posticonbits
<if condition="$show['addedspan']"><td colspan="$remainingspan">&nbsp;</td></if>
</tr>
</table>
</div>
</fieldset>
<else />
<input type="hidden" name="iconid" value="0" />
</if>
Reply With Quote
  #15  
Old 20 Mar 2004, 18:06
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Originally Posted by Fibe
hmm i just double checked and everything is like it should be. afaik
Can I please see your forums then.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 17:29.

Layout Options | Width: Wide Color: