Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 08-19-2001
Last Update: Never
Installs: 75
No support by the author.
Description:
This hack will allow you to set the display order of clickable smilies (if you use them).
It's good if you have a lot of smilies, and want the more commonly used to be shown in the box.
Demo:
Installation: 1. Run the following queries either in phpMyAdmin or thru Telnet: (one query at a time)
Code:
ALTER TABLE smilie ADD showid SMALLINT not null
ALTER TABLE smilie ADD INDEX (showid)
UPDATE smilie SET showid=smilieid
2. In functions.php (in your admin folder) replace
PHP Code:
$smilies = $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie");
with
PHP Code:
$smilies = $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie ORDER BY showid");
And also replace
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie");
with
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie ORDER BY showid");
3. In smilie.php (in your admin folder) replace
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smilieid,title,smiliepath FROM smilie ORDER BY title LIMIT ".($limitlower-1).",$perpage");
with
PHP Code:
$smilies=$DB_site->query("SELECT smilietext,smilieid,title,smiliepath,showid FROM smilie ORDER BY showid LIMIT ".($limitlower-1).",$perpage");
gthell I installed it on VB3.0 .. got the same error ...
Replace:
PHP Code:
// ###################### Start do order #####################
if ($HTTP_POST_VARS['action']=="doorder") {
while (list($key,$val)=each <http://www.php.net/each>($order)) {
$DB_site->query("UPDATE smilie SET showid='$val' WHERE smilieid='$key'");
}
echo "<p>Order updated!</p>";
$action="modify";
}
With:
PHP Code:
// ###################### Start do order #####################
if ($HTTP_POST_VARS['action']=="doorder") {
while (list($key,$val)=each ($order)) {
$DB_site->query("UPDATE smilie SET showid='$val' WHERE smilieid='$key'");
}
echo "<p>Order updated!</p>";
$action="modify";
}
I also got an error on line 262, but this was due to spaces ...
Try removing all spaces between lines !
The order seems to be changed only in the Admin CP and when Users post replies/new threads. However when clicking on more smilies the order is not updated.
I installed it on 2.3.0 and i got no errors, but it will not accept the order commands. I keep hitting update and everything and no changes. When i first installed it some of them worked but thats it.. What can i do?
I just installed this on 2.3.0. I got the sucess message, but I cannot see anywhere to assign the smile order? Does that mean I screwed it up, or is it operator malfunction?
06-10-03 at 04:17 AM Linus said this in Post #152 The order seems to be changed only in the Admin CP and when Users post replies/new threads. However when clicking on more smilies the order is not updated.
Today at 12:22 AM Host Directory said this in Post #157 I am not sure what you mean Jon, i updated my forum from 2.2.9 to 2.3.0 and this hack works fine for me.
Was you upgrading your forum when you got the problem?
It worked. I just did not realize that I had to go into MySQL and modify the tables. I thought there might be a way to do it in the vBulliten Control Panel.
Anyway, I did it through MySQL, moved the ID numbers around, and all is well. Thanks to all for the help and the hack!
Today at 09:43 PM JonUrban said this in Post #158 It worked. I just did not realize that I had to go into MySQL and modify the tables. I thought there might be a way to do it in the vBulliten Control Panel.
Anyway, I did it through MySQL, moved the ID numbers around, and all is well. Thanks to all for the help and the hack!
:-jon
Jon,
Would you be kind enough to tell us exactly what you did in there? thanks.
Today at 04:59 AM DeeperImage said this in Post #159 Jon,
Would you be kind enough to tell us exactly what you did in there? thanks.
Sure! Bear in mind that I am a TOTAL ROOKIE at this, I have a slight amount of experience with Microsoft SQL, but I have never used any web based stuff at all.
I applied the hack using the second option and got the success message.
Then, I used phpMyAdmin (which is software provided by my web hosting company), selected 'database', then the 'forum' database. I was then presented with a list of tables in the database. I selected the "smilie" table, browsed it, and edited the following 2 fields until they were in the order I needed. "Smilieid" and "showid".
I renumbered the ones that I wanted to move (i.e. 12,13,14,15) to numbers out of my range, them renumbered the ones I wanted to make 12,13,14,15, and finally renumbered the temporary numbered ones back to the former numbers of the ones I moved.
This may be a round about, convaluted way to do this, but it worked!!