View Full Version : View Post Icons As Drop-Down

27 Dec 2002, 21:22
Requested At : http://www.vbulletin.org/forum/showthread.php?s=&postid=335209

This hack allows the administrator to change the display of message icons in the post new thread and reply screens so that you select one from a drop-down box as opposed to using radio buttons. A preview image to the right displays the currently selected icon.

This can be toggled via the admin control panel and I will post screenshots in a minute.

This is designed for vBulletin Version 2.2.9, although that's not a choice on the version field, the script will not run on an older version, although you can override the saftey feature if you really want to install it on a different version.

Be sure to run the install script in your admin directory.

Edit :
Revision 2 is now avilable. This adds the new display for the edit screen and the private message screen.

27 Dec 2002, 21:35
Screenshots :

You can toggle between the two modes of display in the control panel.

Screenshot of the post icon area when you have it set to be a drop-down. The preview image is updated with Javascript.

27 Dec 2002, 21:43
Looking great, I will add this to my quick reply, with a slight modification to it :)

Great Job

Taco John
27 Dec 2002, 22:34
Awesome hack!

Screenshots look great!

I'm loading it to my test board immediately... I'll be back with a report!

Taco John
27 Dec 2002, 22:36
uh oh... Problem... My board is a 2.2.8 board...

I hope it works... *ulp*

Chris M
27 Dec 2002, 22:43

This is for a 2.2.8 board...:confused:

Looks good:) Won't use it, but great idea!:)


Taco John
27 Dec 2002, 23:01
Ok... I set up a completely new test board to see if it might be backward compatible to 2.2.8...

*crossing fingers*

27 Dec 2002, 23:24
If you are setting up a new board, you should use 2.2.9 as 2.2.8 has a security hole in it.

It will most likely work with 2.2.8 but you'll have to override the scripts to do so.

It's for a 2.2.9 board, I just can't select that as an option.

Taco John
27 Dec 2002, 23:37

So far so good... It works in principle on 2.2.8!

One thing... I *think* you made a slight error in your directions in two places...

You said that we should find and replace this code:
if ($foruminfo[allowicons]) {
} else {

When in reality, I believe it is this code that needs to be found:

if ($foruminfo[allowicons]) {
} else {

Taco John
27 Dec 2002, 23:47
Good work man! Icons are uploading just perfectly in it!

One quick question... Is there a way to make it so that the drop down icons are sorted in alphabetical order?

28 Dec 2002, 00:07
Ok I fixed the instructions.

As for the alphabetical order part :
You'd have to use a sort command, I belive that would be in the database query itself although I'm not entirely sure, I'm still a biy rusty with PHP.

28 Dec 2002, 00:29
Yes you would need to add: ORDER BY title ASC to the query ;)

Taco John
28 Dec 2002, 02:05
I don't know much about PHP... Would I need to go into the myPHP control panel?

28 Dec 2002, 03:31
No, it'd require an actual code change, you'd have to change around some of the querys, possibly having to rewrite some, as I'm not sure if you can sort the global posticons database query without screwing something up. I'm not 100% sure on that however.

Taco John
28 Dec 2002, 06:42
I'll just have to live with sorting them by hand then...

Thanks for the hack! Nice job man!

Dean C
28 Dec 2002, 10:28
This is awesome :P

Hope its included in vb3 as it makes it so much neater hehe

28 Dec 2002, 13:46
From what I understand, Jelsoft isn't adding anymore features to vB 3 although there's always 3.1/3.5.

28 Dec 2002, 19:00
Oooh...This is kinda nice.

Anyway I think I am going to try to modify this to work with smilies as well...would anyone be interested in this?

*edit - actually, is there a way you can just post up the code for this, versus having to make it a php hack the gives you the ability to select yes or no in your options? Instead of making this a global thing, I would be interested in just adding it to one of my styles.

Do you think this is a possibility, since you have already done the worst of it?

Taco John
29 Dec 2002, 05:35
You can just open the PHP as a text file... But you'll need to run it to alter the database, unless you want to do that manually too...

29 Dec 2002, 13:23
Instructions are in the PHP file as text, like Taco John Said, it's under a textarea tag. The database query adds a option to the global settings page, so if you don't want that you don't want to run the actual query.

29 Dec 2002, 18:35

I'll hack the hack. :)

Taco John
30 Dec 2002, 20:57
I just noticed that this isn't set to work with the "edit" option...

Taco John
30 Dec 2002, 22:01
...and the personal messaging post screen...

31 Dec 2002, 00:53
Wow, that looks fantastic. I'm definately going to use this one!

Taco John
01 Jan 2003, 09:43
Any chance this will be updated to include at least the "edit post" page? (pretty please) :nervous:

01 Jan 2003, 17:25
On It, I'll have it done in two hours or less.

01 Jan 2003, 19:29
Done, you can download the updated php file, which includes an upgrade option.

Taco John
02 Jan 2003, 00:13
You da man!

Thanks brother! :)

02 Jan 2003, 15:04
Nice hack! hank you.

Taco John
02 Jan 2003, 21:07
The hack seems to work just fine... except on small detail... For some reason, when I edit a post to change the icon, the edit I make doesn't seem to change on the thread index... The old icon is still in place.

03 Jan 2003, 00:09
If you are referring to the listing of threads, that doesn't update when you edit a post. With vBulletin you have to go into the admin cp and use the update counters selection to update the threadindex.

Taco John
03 Jan 2003, 00:18

Just to be clear...

When someone submits a thread, they usually forget to give it an icon... So I have a default icon that their thread is posted under...

When either I, or my mod staff edit that post, to change the icon... The icon doesn't stay... The original, default icon stays... and if I go to edit the post again, it is still on that default icon...

It works like this with all the icons... It seems once an icon is set, it cannot be re-set... Maybe it works like this as a standard... I guess I'm not certain.

I do know that I'd like to be able to re-set those icons.

03 Jan 2003, 00:25
Taco John, check your private messages.

08 Jan 2003, 19:51
Hi thanks for this great hacks but i have this problem
when all is done and then start to open new thread appear this error message

Parse error: parse error in /home/vhost/mbsh020602/forum010/newthread.php on line 446

the line 446 is the last line of php code and there is this simbol:


this error appear also in other file like this:

Parse error: parse error in /home/vhost/mbsh020602/forum010/newreply.php on line 557

this line have the same symbol


what can i do?



vbull 2.2.9

10 Jan 2003, 14:07

It appears that my hack idea is a little tougher than I thought. Do you think this is something that can be done (doing the same to smilies)?

25 Jan 2003, 20:34
The same for smilies would be extremely awesome...

Just got done installing this hack, a great job I should say :).

26 Jan 2003, 01:27
I'm having the same problem Taco John was having in Post 32... can anyone help me?

Thanks in advance...

31 Jan 2003, 23:23
Working flawlesly on vb2.2.0 ;)


Taco John
06 Feb 2003, 05:05
Originally posted by LilTara
I'm having the same problem Taco John was having in Post 32... can anyone help me?

Thanks in advance...

Go to your vBulleting options.

Find the option: "Time limit on editing of thread title"

Change that to something like 20000000000

You should have no problems editing the topic icons now...

Taco John
06 Feb 2003, 05:06
Ok... Now for my problem.... ;)

I really love this hack, but there is a slight problem that I have. I am ready to add new icons to it, however, there is no way to organize them. Is there anything that can be done to alphebetize the list? Otherwise, it'll just turn into a huge mess that nobody will use...

I appreciate any help.


Taco John
17 Feb 2003, 02:10

17 Feb 2003, 02:20
Originally posted by DrkFusion
Looking great, I will add this to my quick reply
Great Job

/me too

14 May 2003, 18:35
01-25-03 at 10:34 PM N9ne said this in Post #36 (http://www.vbulletin.org/forum/showthread.php?postid=346291#post346291)
The same for smilies would be extremely awesome...

Just got done installing this hack, a great job I should say :).

Not exactly the same, but it achieves the same results for smilies here: http://www.vbulletin.org/forum/showthread.php?s=&threadid=52952

Ninth Dimension
18 Jul 2003, 22:43
I want to install this hack on my vB2.30 board, but it won't let me, telling me it's for 2.2.9 - can someone update this for me please? :)

UPDATE: Using my utter skill and cunning i went into the install file and changed the verson number so I've now installed this hack :)

Great hack, just what I was looking for and (so far as I cna tell) working great in 2.3.0, my only comment would be that this could have been a lot easier to install (maybe nothing more than a template edit) if you didn't have the whole on/off switch.

The switch provides great flexability, but at the end of the day, i can't imagine any need to go switching between the two modes that often - regardless, great hack, thank you very much :)