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");
When I installed the hack, I got this error on the admin panal
Parse error: parse error in /home/hongkon/public_html/bbs/admin/functions.php on line 1956
Warning: Cannot add header information - headers already sent by (output started at /home/hongkon/public_html/bbs/admin/functions.php:1956) in /home/hongkon/public_html/bbs/admin/functions.php on line 1467
=========================
And I found that
Line 1956: smilies = $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie ORDER BY showid");
Line 1467: setcookie($name,$value,$expire,$cookiepath);
When I login to the admin panal, I got more errors.
Warning: Cannot add header information - headers already sent by (output started at /home/hongkon/public_html/bbs/admin/functions.php:1956) in /home/hongkon/public_html/bbs/admin/functions.php on line 1467
Warning: Cannot add header information - headers already sent by (output started at /home/hongkon/public_html/bbs/admin/functions.php:1956) in /home/hongkon/public_html/bbs/admin/functions.php on line 1467
Warning: Cannot add header information - headers already sent by (output started at /home/hongkon/public_html/bbs/admin/functions.php:1956) in /home/hongkon/public_html/bbs/admin/global.php on line 133
Warning: Cannot add header information - headers already sent by (output started at /home/hongkon/public_html/bbs/admin/functions.php:1956) in /home/hongkon/public_html/bbs/admin/global.php on line 159
====================================
Global.php
Line 133: setcookie("bbadminon",1,0,'/');
Line 159: setcookie("bbadminon",1,0,'/');