View Full Version : View Post Icons As Drop-Down
damicatz
12-26-2002, 10:00 PM
Requested At : https://vborg.vbsupport.ru/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.
damicatz
12-27-2002, 08:35 PM
Screenshots :
http://catclub.dnip.net/screenshot1.png
You can toggle between the two modes of display in the control panel.
http://catclub.dnip.net/screenshot2.png
Screenshot of the post icon area when you have it set to be a drop-down. The preview image is updated with Javascript.
DrkFusion
12-27-2002, 08:43 PM
Looking great, I will add this to my quick reply, with a slight modification to it :)
Great Job
Taco John
12-27-2002, 09:34 PM
Awesome hack!
Screenshots look great!
I'm loading it to my test board immediately... I'll be back with a report!
Taco John
12-27-2002, 09:36 PM
uh oh... Problem... My board is a 2.2.8 board...
I hope it works... *ulp*
Chris M
12-27-2002, 09:43 PM
Erm...?
This is for a 2.2.8 board...:confused:
Looks good:) Won't use it, but great idea!:)
Satan
Taco John
12-27-2002, 10:01 PM
Ok... I set up a completely new test board to see if it might be backward compatible to 2.2.8...
*crossing fingers*
damicatz
12-27-2002, 10:24 PM
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
12-27-2002, 10:37 PM
WOOOO HOOO!!!
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]) {
$posticonsdropdown=chooseicons($iconid);
} else {
$posticons="";
}
When in reality, I believe it is this code that needs to be found:
if ($foruminfo[allowicons]) {
$posticons=chooseicons($iconid);
} else {
$posticons="";
}
Taco John
12-27-2002, 10:47 PM
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?
damicatz
12-27-2002, 11:07 PM
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.
NTLDR
12-27-2002, 11:29 PM
Yes you would need to add: ORDER BY title ASC to the query ;)
Taco John
12-28-2002, 01:05 AM
I don't know much about PHP... Would I need to go into the myPHP control panel?
damicatz
12-28-2002, 02:31 AM
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
12-28-2002, 05:42 AM
I'll just have to live with sorting them by hand then...
Thanks for the hack! Nice job man!
Dean C
12-28-2002, 09:28 AM
This is awesome :P
Hope its included in vb3 as it makes it so much neater hehe
damicatz
12-28-2002, 12:46 PM
From what I understand, Jelsoft isn't adding anymore features to vB 3 although there's always 3.1/3.5.
SpeedStreet
12-28-2002, 06:00 PM
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
12-29-2002, 04:35 AM
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...
damicatz
12-29-2002, 12:23 PM
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.
SpeedStreet
12-29-2002, 05:35 PM
Cool.
I'll hack the hack. :)
Taco John
12-30-2002, 07:57 PM
I just noticed that this isn't set to work with the "edit" option...
Taco John
12-30-2002, 09:01 PM
...and the personal messaging post screen...
Mystis
12-30-2002, 11:53 PM
Wow, that looks fantastic. I'm definately going to use this one!
Taco John
01-01-2003, 08:43 AM
Any chance this will be updated to include at least the "edit post" page? (pretty please) :nervous:
damicatz
01-01-2003, 04:25 PM
On It, I'll have it done in two hours or less.
damicatz
01-01-2003, 06:29 PM
Done, you can download the updated php file, which includes an upgrade option.
Taco John
01-01-2003, 11:13 PM
You da man!
Thanks brother! :)
hamed
01-02-2003, 02:04 PM
Nice hack! hank you.
Taco John
01-02-2003, 08:07 PM
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.
damicatz
01-02-2003, 11:09 PM
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
01-02-2003, 11:18 PM
Hmmm...
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.
damicatz
01-02-2003, 11:25 PM
Taco John, check your private messages.
mbforum
01-08-2003, 06:51 PM
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?
thanks
p.s.
vbull 2.2.9
SpeedStreet
01-10-2003, 01:07 PM
Damicatz,
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)?
The same for smilies would be extremely awesome...
Just got done installing this hack, a great job I should say :).
LilTara
01-26-2003, 12:27 AM
I'm having the same problem Taco John was having in Post 32... can anyone help me?
Thanks in advance...
Tara
Areku
01-31-2003, 10:23 PM
Working flawlesly on vb2.2.0 ;)
Thanks!
Taco John
02-06-2003, 04:05 AM
Originally posted by LilTara
I'm having the same problem Taco John was having in Post 32... can anyone help me?
Thanks in advance...
Tara
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
02-06-2003, 04:06 AM
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.
Thanks,
TJ
Taco John
02-17-2003, 01:10 AM
*bump*
Prankster
02-17-2003, 01:20 AM
Originally posted by DrkFusion
Looking great, I will add this to my quick reply
Great Job
* Prankster too
FASherman
05-14-2003, 05:35 PM
01-25-03 at 10:34 PM N9ne said this in Post #36 (https://vborg.vbsupport.ru/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: https://vborg.vbsupport.ru/showthread.php?s=&threadid=52952
Ninth Dimension
07-18-2003, 09:43 PM
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 :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.