![]() |
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!
|
ah nifty, forgot to think you could load the image next to it.
Good Work. |
For some reason, i now have dropdown AND the original list to chose from.
Any idea what could be wrong? |
Quote:
The code you did wrong was in the posticons template. |
hmm i just double checked and everything is like it should be. afaik :(
Quote:
|
Quote:
|
<a href="http://forums.soi-guild.org" target="_blank">http://forums.soi-guild.org</a>
test/test u can login with ! and thanks ! |
Weird, maybe a problem with Gold? Although I sincerely doubt it; it looks like it has something to do with the conditionals but that should be fine.
How it is right now is that you can change between the two, but to fix this for you, simply do the following then: open the posticons template, 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] </label></td>$posticonbits |
u are god ! thanks man.
one last question when u click on new thread no icon is picked this gif file logol shows up. how can i get rid of this?" |
What do you mean? Please make a screenshot and circle it.
|
As you can see they are still there :( And i circled the gif thing.
Code:
<if condition="$show['dropdownicons']"><td><select name="iconid" id="iconid" onchange="changeImage(this.value)">$posticondropdown</select> <img id="posticonimage" /></td></if> |
Wow, you have something really messed up there; you removed the code from the template but it still shows? :eek:
Make sure you modify the correct styleset. |
i don't understand lol i added posticons template in the SOI style. (which is style i use) and they are sitll there lol.
what about that image btw ? and thanks loads ! i really want this to work since it's godly, i am not giving up :) |
I can't believe what's going on, something is broken :p
I can't really help you much farther in terms of removing the post icons radio buttons because it shouldn't be there in the first place. |
LOL i turned the 1 into a 0 in the functions_newpost.php
and now all icons are there twice |
Yep that's why it should be 1.
|
ok not sure how when and why, but i fixed it !
Just that little graphics shows up. If i pick another icon and then go back to " no icon" it's no longer there. |
Yep it's a Javascript thing, it's not really that important but if someone wants to try to fix it to be my guest :)
|
Quote:
Just a note for future users, in order for the text to show in the list, you must have edited the titles/names in your cp here: http://www.yourdomain.com/admincp/im...ify&table=icon |
Quote:
|
Does anyone know a way to make the "No Icon" selection show the default icon?
|
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? |
Quote:
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.. ?! |
Quote:
|
Quote:
|
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. |
Quote:
|
Any chance for a fix Gary?
|
Quote:
|
Quote:
|
|
All times are GMT. The time now is 03:00 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:
|