![]() |
Post Icons - drop down list (good for lots of icons!)
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> 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']"> HTML Code:
<option value="$iconpath"$iconselect>$alttext</option> I hope you enjoy this hack :p |
how much good is this if it doesnt show the actual icons in the list?
|
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 :)
|
I dont think its possible with regular drop down menu's... Maybe its possible to use one of those vb3 dropdown menu's?
|
Nevermind I got it :) I will add it in a sec :)
|
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.
|
cool hack!
|
Quote:
PHP Code:
Code:
function changeImage(selVal) Code:
<option value="$iconpath"$iconselect>$alttext</option> |
Quote:
|
This one is good for coding similiar hacks, great one!
|
All times are GMT. The time now is 09:57 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|