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");
*sigh* I thought I had this working, but apparently it's not.
I have installed the hack, and even got so far as testing the smilie orders and whatnot. Everything seemed to work with a few minor errors at the top of the pages, but they looked like they were unrelated.
Now, I'm afraid they are related. This is the last hack I have installed. I tried reverting to my original 'functions.php' and 'smilie.php' file, but to no avail.
Here's the errors on the homepage:
Quote:
Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/functions.php:2228) in /home/simpson/public_html/admin/functions.php on line 1498
Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/functions.php:2228) in /home/simpson/public_html/admin/functions.php on line 1498
Warning: Cannot add header information - headers already sent by (output started at /home/simpson/public_html/admin/functions.php:2228) in /home/simpson/public_html/admin/functions.php on line 1498
This is above the header banner on the forum home page. I had turned the bulletin board to 'off' in case any errors occured. Unfortunately, now, I can't get into the admin cp!! The errors quoted above are also listed on the admin cp. When I enter my name and password, it shows the "hang on a sec" then it goes back to the normal (without errors) admin log in screen. But it just cycles again if I try to log in again.