The Arcive of vBulletin Modifications Site. |
|
Post Icons - drop down list (good for lots of icons!) Details »»
|
|||||||||||||||||||||||||||
|
Post Icons - drop down list (good for lots of icons!)
Developer Last Online: Jun 2020
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:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
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] </label></td> $posticonbits 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] </label></td>$posticonbits</if> HTML Code:
// --> 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> HTML Code:
<option value="$iconpath"$iconselect>$alttext</option> 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
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
how much good is this if it doesnt show the actual icons in the list?
|
|
#3
|
||||
|
||||
|
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
|
|
#4
|
|||
|
|||
|
I dont think its possible with regular drop down menu's... Maybe its possible to use one of those vb3 dropdown menu's?
|
|
#5
|
||||
|
||||
|
Nevermind I got it
I will add it in a sec
|
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
|||
|
|||
|
cool hack!
|
|
#8
|
|||
|
|||
|
Quote:
PHP Code:
Code:
function changeImage(selVal)
{
if (selVal != 0)
{
document.getElementById('posticonimage').src = selVal;
}
else
{
document.getElementById('posticonimage').src = 'clear.gif';
}
}
Code:
<option value="$iconpath"$iconselect>$alttext</option> |
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
||||
|
||||
|
This one is good for coding similiar hacks, great one!
|
![]() |
|
|