PDA

View Full Version : Change the display order of smilies


Chen
20 Aug 2001, 09:23
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:
http://forum.t-cove.com/order.gif

Installation:
1. Run the following queries either in phpMyAdmin (http://www.vbulletin.com/forum/showthread.php?threadid=18558) or thru Telnet: (one query at a time)
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
$smilies = $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie");
with
$smilies = $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie ORDER BY showid");
And also replace
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie");
with
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie ORDER BY showid");

3. In smilie.php (in your admin folder) replace
$smilies=$DB_site->query("SELECT smilietext,smilieid,title,smiliepath FROM smilie ORDER BY title LIMIT ".($limitlower-1).",$perpage");
with
$smilies=$DB_site->query("SELECT smilietext,smilieid,title,smiliepath,showid FROM smilie ORDER BY showid LIMIT ".($limitlower-1).",$perpage");
Below
echo makelinkcode("remove","smilie.php?s=$session[sessionhash]&action=remove&smilieid=$smilie[smilieid]&perpage=$perpage&statrpage=$startpage");
add
echo "<br>Order: <input type=text name=\"order[$smilie[smilieid]]\" size=5 value=\"$smilie[showid]\">";
Replace
echo "</table></td></tr></table></form>";
with
doformfooter("Update order");
Replace
doformheader("smilie","modify");
with
doformheader("smilie","doorder");
Above
// ###################### Start Modify #######################
add
// ###################### 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";

}

Requested by:
JJR512

That's it! Feedback, requests and anything else is more than welcome. :)
Good luck! :D

dxb
20 Aug 2001, 09:47
nice simple and effective .... I'll try it now :)

JJR512
20 Aug 2001, 09:55
Alright, it's done, and it's great!

You know in the other thread I was about to say that the one line replacement you had originally (which added the ORDER BY bit) didn't work. I guess there was a lot more to it, though! :D Hope it wasn't too much trouble...but I love it! Thank you! :)

Chen
20 Aug 2001, 09:57
Yeah I know JJR, I forgot to replace another line. :o

Hoffi
20 Aug 2001, 11:13
Cool Hack and it works directly.
Good work.

weezle
20 Aug 2001, 11:40
kool hack m8 ur on fire with these hacks @ the mo

Zecherieh
21 Aug 2001, 01:27
I was actually doing something similiar at the same time, but wanted random


2. In functions.php (in your admin folder) replace
$smilies = $DB_site->query("SELECT title, smilietext, smiliepath FROM smilie");
with
$smilies = $DB_site->query("SELECT smilieid*0+RAND() AS randcol, title, smilietext, smiliepath FROM smilie ORDER BY randcol");
And also replace
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie");
with
$smilies=$DB_site->query("SELECT smilieid*0+RAND() AS randcol, smilietext,smiliepath FROM smilie ORDER BY randcol");

dost
21 Aug 2001, 10:38
Thanks FireFly, it works great!

snyx
21 Aug 2001, 22:39
omg, do I ever want this!
but I never thought of it as a hack?
THANKS MAN!

*snyx runs off to install*

snyx
21 Aug 2001, 22:41
I tired to copy paste the queries into phpmyadmin and I get errors?

dost
21 Aug 2001, 23:40
Originally posted by snyx
I tired to copy paste the queries into phpmyadmin and I get errors?

the instructions say (one query at a time)
so you have to run the first line of the query, then the second, then the third ...

snyx
21 Aug 2001, 23:49
I obviously tried that genius!

dost
21 Aug 2001, 23:54
How do you expect anyone to help you when you don't even tell what error you get?!? And do you always respond like that when people try to help you? :(

snyx
22 Aug 2001, 00:09
whatvere, I got it myself
but now Im getting this when I try to modify my smilies

Database error in vBulletin Control Panel: Invalid SQL: SELECT smilietext,smilieid,title,smiliepath,showid FROM smilie ORDER BY showid LIMIT 0,15
mysql error: Unknown column 'showid' in 'field list'
mysql error number: 1054
Date: Tuesday 21st of August 2001 07:06:03 PM
Script: /forums/admin/smilie.php?action=modify
Referer: http://www.xxxx-xxxx.com/forums/admin/index.php?action=nav


Ideas?

Chen
22 Aug 2001, 07:28
You didn't create the new field, showid.
Hold on a bit, I'll come up with a file to do everything itself.

snyx
22 Aug 2001, 07:35
sweet, thx

Chen
22 Aug 2001, 08:49
Try this file, upload it to your admin folder. Tell me if it worked!

snyx
22 Aug 2001, 09:37
I get this man
Database error in vBulletin Control Panel: Invalid SQL: ALTER TABLE smilie DROP showid
mysql error: Can't DROP 'showid'. Check that column/key exists
mysql error number: 1091
Date: Wednesday 22nd of August 2001 04:34:55 AM
Script: /forums/admin/orsmin.php
Referer: http://www.xxxx-xxxx.com/forums/admin/orsmin.php?

Chen
22 Aug 2001, 09:43
Use the second option.

snyx
22 Aug 2001, 10:33
Database error in vBulletin Control Panel: Invalid SQL: ALTER TABLE smilie ADD showid TINYINT not null
mysql error: Can't create/write to file './kaos_vbp/#sql-7db_262f.frm' (Errcode: 28)
mysql error number: 1
Date: Wednesday 22nd of August 2001 05:30:47 AM
Script: /forums/admin/orsmin.php
Referer: http://www.xxxx-xxxx.com/forums/admin/orsmin.php?

Chen
22 Aug 2001, 14:32
I just paid a little visit to your database (with your permission of course), and something is wrong with it, so I did a little search, and it looks like you're out of space in your MySQL partition.
(if you want, search for "mysql error: can't create/write file")
I suggest you have a little talk with your host.
Oh, and while you're at it, upgrade your phpMyAdmin :p

Sorry. :(

NYI Fan
23 Aug 2001, 04:51
Firefly;
Thanks for the hack, and the incredibly easy instructions (even a newbie like me could follow them!) Having a lot of smilies is now an easily managable thing!

:)

maverick1236
23 Aug 2001, 16:43
the random smilies are great-but if your in the middle of a post and u refresh to see another random set-you lose the post and need to start over-also could be a problem for those with the auto-refresh installed...

just a heads up!!:)

Hoffi
23 Aug 2001, 20:58
Just view all smilies on one Page. It's much, but it's OK and you can Edit the order completely.
I have 85 smilies on one Page, and it works excellent.

maverick1236
23 Aug 2001, 21:10
i have over 200 lol

Hoffi
23 Aug 2001, 23:01
u need a hugh Screen. :D

Sarge
25 Aug 2001, 21:21
Parse error: parse error in ./admin/functions.php on line 135

Fatal error: Call to undefined function: iif() in ./admin/functions.php on line 77

WTF?
I did everything right but it screwed my database

The dreaded white screen

Can anyone help?

Chen
25 Aug 2001, 21:36
What is line 135?
And did you run the queries successfully?

Sarge
25 Aug 2001, 21:42
yes I did run them sucessfully

I reverted back to my old functions and smilie php files but it didn't change the error

Line 135 is this

$l
if ($highlightlast) {

Sarge
25 Aug 2001, 21:43
i am on aol im
DLRArmyWebsite if you got a sec

Thanks in advance

Sarge
25 Aug 2001, 22:12
fixed it

Apparently when I downloaded the file before modifying it was screwed. IT had boxes instead of letters in certain areas.
Very weird.
Thanks

Chen
26 Aug 2001, 07:51
Sorry for not answering, I was sleeping. :o

Glad you fixed it. :)

Sarge
26 Aug 2001, 22:38
thanks bud

Kengan
27 Aug 2001, 09:41
cool hack ! I like it very much ! thanks man !

ying_ho
06 Sep 2001, 18:55
Help~

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);

What should I do?

Chen
06 Sep 2001, 19:05
Open your config.php file, and remove ANY whitespaces after the ?> and get back to me. :)

ying_ho
06 Sep 2001, 20:28
Thanks Buds. But there is no whitespaces behind <? in config.php.

Any other suggestion?

ying_ho
06 Sep 2001, 20:34
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,'/');


:confused: :confused: :confused:

Freddie Bingham
16 Sep 2001, 17:04
ying_ho please enter your license information into your profile.

YourHostSucks
30 Sep 2001, 20:48
Great again, you have alot of nice hacks..

Install was very easy, and it is working perfect! :D

Mike Gaidin
01 Oct 2001, 02:55
Great hack! Thanks!

almighty one
07 Oct 2001, 08:45
this is a good hack and all but i noticed if ya got alot of smilies and like lets say ya rename one as #5 well then you end up with 2 #5's is there a way to fix this

almighty one
07 Oct 2001, 08:45
this is a good hack and all but i noticed if ya got alot of smilies and like lets say ya rename one as #5 well then you end up with 2 #5's is there a way to fix this

Chen
07 Oct 2001, 08:55
Nope, sorry.
This is also the way it works with forums, by the way.

almighty one
07 Oct 2001, 09:00
ok n/p it is ok no matter it will show the first 15 regardless what the #s are

apollyon
08 Oct 2001, 02:01
does anyone here know how to organize the smilies into categories like i described in this topic: http://www.vbulletin.com/forum/showthread.php?s=&threadid=29779

apollyon
08 Oct 2001, 17:59
bump

Justice
16 Oct 2001, 06:56
another hack from FireFly that is
great
very practical
easy to install
hopefully in the next release of vB
further proof he's a bad ass

SirSteve
13 Nov 2001, 02:53
Does this work on vb2.2.0 ?

Chen
13 Nov 2001, 13:22
Yes it should.

|DarkManX|
22 Nov 2001, 21:53
getting this error in vb 2.2

Parse error: parse error in /****/********/***********/***/admin/smilie.php on line 262


this is line 262

if ($HTTP_POST_VARS['action']=="doorder") {

Chen
23 Nov 2001, 12:39
Probably forgot a ; or } in the line before.
Copy the 3 lines before line 262.

Wayne2k1.com
23 Nov 2001, 13:33
Installed.

Everything's fine :D

|DarkManX|
23 Nov 2001, 14:13
Originally posted by FireFly
Probably forgot a ; or } in the line before.
Copy the 3 lines before line 262.


ok here is the block just before 262

// ###################### Start Kill #######################

if ($HTTP_POST_VARS['action']=="kill") {

$DB_site->query("DELETE FROM smilie WHERE smilieid=$smilieid");

echo "<p>Deleted!</p>";

$action="modify";
}
// ###################### Start do order #####################
if ($HTTP_POST_VARS['action']=="doorder") {

|DarkManX|
23 Nov 2001, 16:38
ya see anything that could be wrong?

thanks in advance for the help

Chen
23 Nov 2001, 17:03
Everything seems right. :confused:

Try to install the hack again on a fresh version of smilie.php.

|DarkManX|
23 Nov 2001, 17:26
tried it on a fresh smilie.php and get the same thing.....

|DarkManX|
23 Nov 2001, 18:41
shoot....any idea's at all....i really want to be able to arrange them.......

|DarkManX|
25 Nov 2001, 19:51
well i guess the 3rd time was the charm....didn't do anything differently....just all of the sudden workd...so she works good on 2.2

FWC
25 Nov 2001, 21:03
Originally posted by |DarkManX|
well i guess the 3rd time was the charm....didn't do anything differently....just all of the sudden workd...so she works good on 2.2 At least it works now. :)

Brian Cruz
12 Dec 2001, 03:24
I installed this, but it doesn't affect the order in the "get more" smilies box. Did I do something wrong, or is it not designed to do that?

Dalius
13 Dec 2001, 02:40
this works on 2.2.1 right???

Dalius
13 Dec 2001, 02:49
YEAH!
Installed on 2.2.1, works PERFECTLY!
Thanks FireCat

Chen
13 Dec 2001, 07:01
Oi!

Rose
18 Jan 2002, 20:12
*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:
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. :(

Line 1498 is: if ($cookiedomain) {
setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);
} else {
setcookie($name, $value, $expire, $cookiepath, '', $secure);
}

The line after the 'else' is the line #1498 - I thought I'd post the surrounding code for clarification.


Any help? :(

Rose
19 Jan 2002, 16:13
The problem I had is now fixed. Thankfully it has nothing to do with this hack. This hack is the GREATEST!! Probably my all time fave.


One error in the script of Firefly's original post - startpage is mispelled in about the third line to find in the Smilie.php.

:)

Excellant work

DelusionalMind
19 Jan 2002, 20:04
nice :)

many thanks man

I see that vb.org is using this. heh

Shenlong
19 Jan 2002, 23:05
spectacular hack firefly!

Lucky
20 Jan 2002, 00:31
Great job again.

Thank you kindly!

blazin
20 Jan 2002, 05:44
i just uploaded that file, chose the 2nd install option, got an OK message, but there is no order # field in my smilie menu. What did I do wrong?

Xelation
23 Jan 2002, 22:40
Great Hack! I no longer have my big smilies up front... This helps me out a lot!!! No problems installing... Keep it up!

Xelation
24 Jan 2002, 04:10
Crap, found an error.... well what happens is... when I click for more smilies... the pop up comes up... but when I go to click on a smilie, the smilie browser turns to a "page cannont be found" link.... can anyone help me? thx

Chen
24 Jan 2002, 15:16
Nothing to do with my hack... do you happen to use the php3 version?

Xelation
24 Jan 2002, 15:46
I dont us the php3 version.

DarkReaper
26 Jan 2002, 04:29
Would it be possible to make it so smilies with a display order of 0 aren't in the list?

Also, it'd be nice to be able to specify random smilies, with some smilies being more frequent than others, and some not showing up at all :)

Souli
27 Jan 2002, 21:10
Nice Hack, but is it possible to include a rating system ? (Every User with >100 Posts can rate 10 Smilies from the List and only the best 10 or XX Smilies will show!?)

Brian Cruz
30 Jan 2002, 22:10
Any way to get this to affect the "get more" box?

Kat
04 Feb 2002, 21:21
I just used this on version 2.2.2 and it worked GREAT, thank you!!! :cool:

Lucky
05 Feb 2002, 04:51
Got vbp3.0pr7 and vb2.2.2 and all is working great!

Thanks. :p

mondaynightmike
15 Feb 2002, 17:09
Great hack. Thanks Firefly

Erwin
01 Mar 2002, 13:21
Good one. Easy install, worked first time round! Two thumbs up! :D

Vlad
27 Mar 2002, 01:24
Sorry to bring this back to the top, but I am in the middle of doing this. The queries were all successful. In phpMyadmin however, I don't have a folder "functions.php" I have the other ones but not that one.......

wooolF[RM]
27 Mar 2002, 02:40
functions.php is a filename that must be in your forum/admin folder

Vlad
27 Mar 2002, 03:07
yeah, hehe, I figured that out, lol. I was brainfarting for a bit there, but thank you anyway :D

Austin Dea
27 Mar 2002, 05:25
Originally posted by FireFly
Description:
Below
echo makelinkcode("remove","smilie.php?s=$session[sessionhash]&action=remove&smilieid=$smilie[smilieid]&perpage=$perpage&statrpage=$startpage");
add
echo "<br>Order: <input type=text name=\"order[$smilie[smilieid]]\" size=5 value=\"$smilie[showid]\">";


I guess I'm the only one to notice this...(I don't know how the other peeps installed...) but you have a type there..should be $perpage&startpage=$startpage") right?


I couldn't find that line so i looked at it a little more closely...what i don't get is how everyone else installed it O_O...

amsch
27 Mar 2002, 17:44
I go this erro when I did my query?
Error
SQL-query:

ALTER TABLE smilie ADD showid SMALLINT not null
ALTER TABLE smilie ADD INDEX (showid)
UPDATE smilie SET showid=smilieid
MySQL said: You have an error in your SQL syntax near 'ALTER TABLE smilie ADD INDEX (showid) UPDATE smilie SET showid=smilieid' at line 2

Vlad
27 Mar 2002, 18:56
My queries worked and all that, but I got that header error that a couple other people posted earlier in the thread. I couldn't figure it out, I even went to check the white spaces behind ?> like Firefly said as that could help in the config.php, but that did nothing either. I ultimately reverted back to my backup copies of my files, because I couldn't get the hack working. Any help on fixing those header errors would be appreciated. Thanks!

Austin Dea
27 Mar 2002, 19:28
Originally posted by amsch
I go this erro when I did my query?
Error
SQL-query:

ALTER TABLE smilie ADD showid SMALLINT not null
ALTER TABLE smilie ADD INDEX (showid)
UPDATE smilie SET showid=smilieid
MySQL said: You have an error in your SQL syntax near 'ALTER TABLE smilie ADD INDEX (showid) UPDATE smilie SET showid=smilieid' at line 2


They are each different queries.

Run ALTER TABLE smilie ADD showid SMALLINT not null

Then run ALTER TABLE smilie ADD INDEX (showid)

Then UPDATE smilie SET showid=smilieid

All separately.

Wayne2k1.com
28 Mar 2002, 08:21
and they all must end with

;

:cheeky:

Austin Dea
28 Mar 2002, 18:10
no...You can run them through phpMyAdmin and there doesn't need to be ';' at the end...I don't know about other ways cuz I've only ran queries with phpMyAdmin.

JulianD
20 Apr 2002, 06:06
Thanks! Finally I found something useful for this hack :D Already installed!

Rheinblitz
22 Apr 2002, 20:49
hi there,

nice hack, but i got one error during clicking "smilies-modify" in the admin cp!

Parse error: parse error in */admin/smilie.php on line 266

the hack works great, but i cant change the settings..

plz help

Neo
30 Apr 2002, 02:09
This work of 2.2.5

FWC
30 Apr 2002, 02:36
Originally posted by neo
This work of 2.2.5 Yes, it does.

Fatty_Bolger
15 May 2002, 00:59
Thanks for the great hack!!

I have to agree that it woud be great if the order was carried over into the "Get More Smilie" pop-up, or is there another way to affect the popup directly?

Kinda junior at this stuff.....:)

Help please!! :confused:

Chen
15 May 2002, 11:35
Edit misc.php and replace this:
$smilies = $DB_site->query("SELECT smilietext AS text, smiliepath AS path, title FROM smilie");
With this:
$smilies = $DB_site->query("SELECT smilietext AS text, smiliepath AS path, title FROM smilie ORDER BY showid");

Fatty_Bolger
15 May 2002, 13:40
Thanks Firefly, worked a treat. Mucho Happiness :-)

mariochiosso
16 May 2002, 02:41
hi,
does it work with 2.2.5 release?

Fatty_Bolger
16 May 2002, 03:01
Mario, seems to fine on our board and it is 2.2.5. Very easy to install. :-)

Keyser Söze
17 May 2002, 03:49
works great for me in 2.2.5

anyways, heresa important addition, after i have, lets say about 40 smilies or so, and i have them arranged smallest to biggest, to make it look better, well lets say i want to add another small one, i cant just give it a number and have the ones above it bumped up, it messes it up and doesnt change the others


like, if i make it num 14, it should make the one that was 14 now 15, and al the others above it should go up 1 number (after u hit the update order button)

think that could be done?

Kat
31 May 2002, 14:34
Anybody had luck with this for version 2.2.6?

I'm getting this error:

You have an error in your SQL syntax near 'nullALTER TABLE smilie ADD INDEX (showid)' at line 1

Thanks for any help!

Chen
31 May 2002, 16:15
You need to run each query separately, or separate them with ;.

Kat
31 May 2002, 17:08
Thanks Firefly! I did run them separately, but I think I must have had a timeout and just not noticed it... because it happened again... but third time was the charm and its working now!

I've installed your wonderful hack so many times, I think I got lazy and didnt pay close enough attention.

Jeremy W.
22 Jun 2002, 00:18
I attempted to install this, and it worked fine until I tried to update the order in the admin cp... I hit Update Order and it doesn't save the results (or display them perhaps).

Jeremy W.
22 Jun 2002, 00:22
Okay, it does update the order, it simply does not show the order on the admin smilie page.

Schorsch
16 Jul 2002, 07:20
thanks, works great, easy install :)

MarkyBuzz
22 Jul 2002, 22:26
Just wanna add my thanks FireFly yoos the man ;)

Worked like a charm on 2.2.6!

THANK YOOOOO! :cool:

Barret
30 Aug 2002, 19:49
Works great on 2.2.6 but..........
if you have quick reply, it will not work with the quick reply box even though you see the smilies.
Any way to fix that?

Rose
30 Aug 2002, 20:35
Originally posted by Barret
Works great on 2.2.6 but..........
if you have quick reply, it will not work with the quick reply box even though you see the smilies.
Any way to fix that?


What do you mean it won't work with the QRB? I have 2.2.6, smilies in the QRB, and they show up ordered as they should.

:)

Barret
30 Aug 2002, 20:49
What do you mean it won't work with the QRB? I have 2.2.6, smilies in the QRB, and they show up ordered as they should.
They show up fine but when you click them in QRB they wont work..or havent yet :(

Rose
30 Aug 2002, 21:05
Did you remember to add the tags to the end of the QRB template, the two tags listed in the addon? I think they are <*java> tags, but there's two of them.

Barret
30 Aug 2002, 23:23
Yepper.
I did a stupid thing and found the problem :)
My smiley of all things wasnt named.
Sorry for all the confusion.
Boy was I confused as I couldn`t see why in the world this hack would mess that up.
Thanks again for the help.
Glad found my stupidity! :ermm:

Rose
06 Sep 2002, 22:06
Originally posted by Barret
Yepper.
I did a stupid thing and found the problem :)
My smiley of all things wasnt named.
Sorry for all the confusion.
Boy was I confused as I couldn`t see why in the world this hack would mess that up.
Thanks again for the help.
Glad found my stupidity! :ermm:

*hehe* We all have moments. ;) Glad it's working. :D

Illuvatar
10 Sep 2002, 19:02
/me moves his whole site to a new server, installs VB 2.2.7, and re-installs this most excellent hack!

Thanks again! I was really gratefull that all I had to do was the template/php mods again as the databse retained the queries during the move and I didn't have to re-order all our flipping smilies again! lol

Buddha
12 Sep 2002, 02:38
thanks.
*clicks install*

groovesalad
20 Sep 2002, 23:09
EDIT: Figured it out....

groovesalad
05 Oct 2002, 14:33
Firefly - You contribute SO much to this board. Thank you VERY much! :)

otacon
17 Oct 2002, 19:06
aaaaa......

is there like some sort of submit button i did not put in or something cus i will put the order i want it to but then what...... nuthing happens

N9ne
20 Oct 2002, 00:41
Does this work in 2.2.8?

N9ne
20 Oct 2002, 17:44
bump...

Xer
06 Dec 2002, 19:55
WORKING ON 2.2.9

LilTara
10 Dec 2002, 04:40
I'm having the same trouble as that Ying ho person.... can someone please help. It says:

Parse error: parse error, unexpected T_VARIABLE in /home/prue/public_html/admin/functions.php on line 2091

Warning: Cannot add header information - headers already sent by (output started at /home/prue/public_html/admin/functions.php:2091) in /home/prue/ public_html/admin/functions.php on line 1593

Fatal error: Call to undefined function: getclickysmilies() in /home/prue/public_html/showthread.php on line 252

N9ne
10 Dec 2002, 17:56
I've got this working for me no problems on 2.2.8, should work on 2.2.x.

LilTara
10 Dec 2002, 19:09
I have 2.2.7.... I'm not sure if it's conflicting with another hack or if I've just done something wrong. It seems to be related to my functions.php file because when I restore the back up of that file everything works again.

Any ideas?

N9ne
10 Dec 2002, 19:25
It should work, there's no reason why it shouldn't...try re-applying the changes in functions.php, there's only two and they're just modifications to queries.

LilTara
10 Dec 2002, 20:35
I've redone it several times... so I'm pretty baffled.

Thanks though N9ne... I'll try again.

N9ne
10 Dec 2002, 21:05
Have you got any other hacks installed which have anything to do with smilies in any way?

LilTara
10 Dec 2002, 22:51
I've got the quick reply box that has smilies... I didn't install it myself though since I took the board over from a friend... so I'm not sure what version it is.

N9ne
10 Dec 2002, 22:53
When you added smilies to quick reply, did you modify functions.php ?

LilTara
10 Dec 2002, 22:54
Honestly I don't know... as I posted above, I'm not the one who installed that hack... I can probably find out though.

AzzKickr
18 Dec 2002, 01:51
hi guys. is it possible to make this:
first 6 smilies will always be here and i will setup it using this hack, and other 6 will check random using random smilies hack :chinese:
sorry my bad english :p :rolleyes:

Dan_UPC
06 Jan 2003, 02:51
Thanks for a great hack Firefly.

*Installs*

Oblivion Knight
05 Feb 2003, 22:50
Top stuff FireFly.
Nice and simple, yet really handy :)

/me clicks install.

Host Directory
10 Feb 2003, 23:33
I have been looking for a hack which does not seem to exist, this is kind of on the same lines so i am hoping you might be interested in this hack.

New area in admin panel.

Allows you to set the smilies in Posts to be displayed ramdomly or pick the ones you wish from your smilies list to display in the New Post area.

Also allows option to display smilies in Get More as ramdom but also allows you to select how many smilies should appear in Get More before splitting the page.

For example if you have 400 smilies and you set the number to split at 50. The result would be 8 seperate pages with the smilies on.

This is much better - i have lots of smilies and they all display on one page. Many of the smilies i have are animated and the server cannot cope with so many on one page. I think a lot of people have this problem. The result is many of the smilies do not show as a graphic.

This would be a good hack to make.

Host Directory
15 Feb 2003, 18:48
Can someone do me a massive favour and talk me through phpmyadmin - i am confused how to change the code.

I need to

ALTER TABLE smilie ADD showid SMALLINT not null
ALTER TABLE smilie ADD INDEX (showid)
UPDATE smilie SET showid=smilieid


I have never used phpmyadmin before. Can someone talk me through?

Host Directory
17 Feb 2003, 15:54
I have installed this now and its working fine on 2.2.9

Someone has told me that this hack wont work on the new version of vb 2.3.0.

Can anyone confirm this before i upgrade?

Paraone
21 Feb 2003, 20:16
EDIT: I JUST NOTICED THE POST ABOVE MINE!!!! I have version 2.3.0 and I can't get it to work, can "DA MAN" make one that works for the newest version ppppplease please please...!!! If not I understand..... now read my post, it may help you fix whatever problem it is having...



Ok i got this error:


Parse error: parse error in /home/clan-tuc/public_html/forums/admin/functions.php on line 865

Fatal error: Call to undefined function: vbdate() in /home/clan-tuc/public_html/forums/admin/sessions.php on line 400

after the 1st post install....so i put the old backup of functions back in...and the site came back up, tried it all again and same error...

Ok so then i downloaded the orsmin file...and the first link worked, but the second gave an error...so i ran the first again...then installed everything and same error...so i replaced the functions.php with the original copy and the sites backup(still the modified smilie.php)

so just for the hell of it, i went into admin...and now i have numbers below the smilies...so i tried changing the order, and it didn't work, obviously cuz i don't have the proper stuff in the functions.php....


Now when i ran the mysql queries...the last query didn't reply with ran succesful it just said :

Affected rows: 0

SQL-query : [Edit] [Create PHP Code]
UPDATE smilie SETshowid = smilieid

but i get that error....ne ideas whats going on

Cyricx
09 Mar 2003, 11:15
not getting the error codes but it definately isn't working for me, I'm on 2.3.0

it won't display their current order number or accept changes well, they get all fubared and contorted for the order lol.

No discernable pattern that I can find.

Paraone
09 Mar 2003, 18:55
well i wonder if we can get this working on 2.3.0 ...who is a super hacker that can figure it out?

AllMadden.net
14 Mar 2003, 20:49
It seems to work on 2.3 for me...but when I try to edit the smilies or add or upload in the admin menu I get this error:

Parse error: parse error, unexpected ':' in /home/virtual/site4/fst/var/www/html/madden/forums/admin/smilie.php on line 268

Any idea how to fix that?

Host Directory
14 Mar 2003, 22:06
The reason i am concerned about this hack is because it is a prequisit to another hack called the smilie panel - http://www.vbulletin.org/forum/showthread.php?s=&postid=361236#post361236

I really like the smilie panel hack and it was hard to set up so i dont want to loose it when i install.

Can anyone confirm this hack working in 2.30?

Stud_Muffin
22 Mar 2003, 12:27
I installed it in vb 2.3.0 and I can update the order in 'Smilies' 'Modify' and the display does reflect this in the admin CP.
The the 'Smilies' window shows the correct order but the 'get more smiles' window do not reflect this order.

Mikado247
11 Apr 2003, 21:11
There is an error in the code.

It's the reason of Parse error. look this :

Change :

while (list($key,$val)=$order)) {

For :

while (list($key,$val)=$order) {

and it's work !

(tested on vbulletin v2.3.0)

Mikado247
11 Apr 2003, 23:12
Well, the code who work is :


while (list($key, $val) = each($order))
{
$DB_site->query("UPDATE smilie SET showid='$val' WHERE smilieid='$key'");
}


It's work on vbulletin 2.3.0

Mikado247
11 Apr 2003, 23:14
There are a litle bug ...

while (list($key, $val) = each($order))

AdultInsider
15 Apr 2003, 19:12
What mikado is saying is that the following might need to be done to make it work in 2.3. This is what I did:

Change

while (list($key,$val)= $order)

to
while (list($key,$val)= each($order))

jibious
17 May 2003, 02:26
question. my smilies are listed in order, starting at 176 (through 357). just wondering if there is a query anyone knows that i could run to just change their order, starting at 1? so basically just re-order them 1-179 rather than 176-357 (keeping the same order they are in now though...

otto

gmarik
17 May 2003, 09:27
FireFly, could you make it just in one .txt file for easier download?
And I wanted to ask you - how does the table building array function in HiveMail 1.2 differs from vBulletin 2.30 - can they be integrated in one way or are they just too different?

Anjie
23 May 2003, 17:10
Installed on 2.3.0 and works wonderfully! Thank you Firefly!!

gthell
26 May 2003, 11:11
Im running 2.30 and this is what i get. I checked 4+ times too.

Parse error: parse error, unexpected '{' in /home/valider/public_html/forum/admin/smilie.php on line 269
the code in smilie.php:

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 tried everything that was posted b4 me and still get that error....please help :(

smx
06 Jun 2003, 09:00
gthell I installed it on VB3.0 .. got the same error ...


Replace:

// ###################### 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:

// ###################### 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 ! ;)

Linus
10 Jun 2003, 04:17
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.

electrolov
21 Jun 2003, 15:37
05-26-03 at 11:11 AM gthell said this in Post #150 (http://www.vbulletin.org/forum/showthread.php?postid=400111#post400111)
Im running 2.30 and this is what i get. I checked 4+ times too.

Parse error: parse error, unexpected '{' in /home/valider/public_html/forum/admin/smilie.php on line 269
the code in smilie.php:

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 tried everything that was posted b4 me and still get that error....please help :(

had same error line, i deleted space from start of line to code on lines 269, 270,273.

might help if u delete the "?"'s in yr code.

DeeperImage
03 Jul 2003, 20:13
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?

JonUrban
16 Jul 2003, 04:36
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?

Thanks

Oblivion Knight
16 Jul 2003, 08:46
06-10-03 at 04:17 AM Linus said this in Post #152 (http://www.vbulletin.org/forum/showthread.php?postid=406847#post406847)
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. This was answered in Post #96.. ;)

http://www.vbulletin.org/forum/showthread.php?postid=251173#post251173

Host Directory
17 Jul 2003, 00:22
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?

You can see this hack working at www.hostcompanies.com/forums (vb version 2.3.0)

JonUrban
17 Jul 2003, 02:43
Today at 12:22 AM Host Directory said this in Post #157 (http://www.vbulletin.org/forum/showthread.php?postid=418299#post418299)
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?

You can see this hack working at www.hostcompanies.com/forums (vb version 2.3.0)

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

DeeperImage
17 Jul 2003, 04:59
Today at 09:43 PM JonUrban said this in Post #158 (http://www.vbulletin.org/forum/showthread.php?postid=418320#post418320)
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.

JonUrban
17 Jul 2003, 05:11
Today at 04:59 AM DeeperImage said this in Post #159 (http://www.vbulletin.org/forum/showthread.php?postid=418344#post418344)
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!!

:-jon

DeeperImage
17 Jul 2003, 05:19
Today at 12:11 AM JonUrban said this in Post #160 (http://www.vbulletin.org/forum/showthread.php?postid=418347#post418347)
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!!

:-jon

I totally suck at this too so i will give this a shot..Because it aint working for me otherwise

Oblivion Knight
17 Jul 2003, 10:01
Today at 02:43 AM JonUrban said this in Post #158 (http://www.vbulletin.org/forum/showthread.php?postid=418320#post418320)
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 In other words, the hack didn't work for you.. You had to go in to the database manually and play around with the order there.. The hack should automatically change the order via the Smilie CP.

DeeperImage
17 Jul 2003, 17:42
Today at 05:01 AM Oblivion Knight said this in Post #162 (http://www.vbulletin.org/forum/showthread.php?postid=418389#post418389)
In other words, the hack didn't work for you.. You had to go in to the database manually and play around with the order there.. The hack should automatically change the order via the Smilie CP.


I guesss it didnt work for me either. I installed it just like the directions said, i got no errors at all and everything went smooth. But when i try to change the order it does not work :(.

Host Directory
17 Jul 2003, 20:43
Well i never had any problems installing this hack in 2.2.9.. when i upgraded to 2.3.0 ( after reinstalling the prequisit hacks and then reinstalling the smilie hack ) everything stayed in place.
My order of smilies was fine so i did not need to change them, although i have not yet tryed adding any more smilies.

Its a nice hack but its long winded to add all the smilies manually... still love it.

mcyates
29 Jul 2003, 23:45
im on vb 2.3.0.

How exactly does this thing work. For example just say i have 20 smilies on my page (the newthread page) and number 3 smilie gets used more than any other smilie, will #3 smilie automatically move to the no. 1 position?

Illuvatar
29 Jul 2003, 23:47
Errrrm...no....

All this does is allow you to place the smilies in the order that you want them to show up either in the little smilie window or in the popup 'get more' window.

PKRWUD
03 Aug 2003, 13:33
I've got a question. What would make a chunk of the function.php file to simply disappear?

I have 2.3.0, and I modified the necessary files, ran the queries, uploaded the files, and couldn't get into the site. I had the exact same problem as the gentleman 2nd from the top on page 10. Unfortunately, no one ever answered him, so I decided to try for myself. I reinstalled my functions backup, uploaded and ran the installer, and option one worked. I then had numbers under the smilies in the control panel, but they wouldn't take.

So I went into the function file and added the part about ordering the smilies by the showid in the two places required, saved it, and got an error message telling me something about line 909.

I deleted the function file, and copied the backup over again, and it was like before; numbers under the smilies, but they wouldn't stick. I then modified the function file again, and got the error message. I did this routine one more time with the same results.

Finally, I selected Show File instead of edit, and I noticed that the code from line 909 through 942, or part of line 942, was missing.

I tried another fresh copy of the function file, and i was able to access my site with no error messages. I clicked on Edit for the function file, and then Save, without touching a single thing. Back came the error messages, and sure enough, lines 909 through half of 942 were missing.

How is this happening, and how can I modify the file without it happening?

Any help would be appreciated.

Take care,
~Chris

Hellraider
24 Aug 2003, 00:07
@FireFly: Can you please post a single .txt or .zip of this hack that can be run on vB 2.3.x (espacially for 2.3.2 that I'm running ;)) cause it seems that this hack (first .zip and .txt) will not run on vB >= 2.3.x :(

Hellraider
20 Sep 2003, 20:15
I've done this other way round :)

Rabbitoh Warren
03 Oct 2003, 13:45
Has anyone got this hack to work on vB 2.3.2? I keep getting parse errors on line 268 of the smilie.php file.

Line 268:
while(list($key,$val)=each($order)) {

futureal
08 Oct 2003, 21:47
I just re-did this hack as I upgraded to 2.3.2 and it is working fine.

Attached is my version of it, which really only has a couple minor changes. If anybody wants to try it, go for it, and let me know if it works for you.

Rabbitoh Warren
09 Oct 2003, 13:01
Futureal, thanks for providing the attachment. It appears my install went fine this time but when I try to update the order of the smilies it doesn't seem to work. Any ideas?

futureal
09 Oct 2003, 22:21
Does it give you any sort of an error message or anything?

I just double-checked on mine and it works, using those same instructions. Try replacing your admin/smilie.php with a 100% fresh copy and make those same changes. Pay close attention to which lines are getting modified; there are a number of similar lines in there for the different actions.

Rabbitoh Warren
10 Oct 2003, 12:32
Does it give you any sort of an error message or anything?
Nah, after re-numbering all the smilies I click on the 'update' button but it doesn't appear to have any effect. It just refreshes the page and returns the same smilie order as when I started. In other words no changes are saved. But thanks for your help anyway futureal. With 100+ smilies now I'd like to keep them organised so I'll do what you suggest and try it again and see how it goes. Any chance you could send me your copy of the smilies.php as a fallback?

futureal
10 Oct 2003, 17:13
Technically we're not allowed to send out vB source files, modified or otherwise. The only modifications I've made to it, though, are those I detailed in the text file. So once those are made, your file should be identical to mine. :)

It sounds like a step is being missed somewhere, so that when you click the update button, no query is being performed. Just a guess, though.

dieselicious
15 Oct 2003, 05:29
Futureal, thanks for posting the update to get this working in 2.32. I had installed the previous version and was able to update the order by manually changing the orderid in the database, but had not been able to get the interface to work in the Admin panel. I hadn't had a chance to look at it myself, and since I don't really need to reorganize the smilies very often, didn't feel very inclined to put much more effort into it since I'd already ordered them to my liking in my database. Then I just happened to buzz by here and saw that you'd redone it, so I tried again. Thank you so much!

carryapple
14 Jan 2004, 10:25
Hi Guys,

I just installed the hack, but I'm getting a Parse error and can't seem to figure out what's wrong here.

Parse error: parse error in /home/mo001vma/www/home/admin/smilie.php on line 417

----


// ###################### Start do order #####################
if ($HTTP_POST_VARS['action']=="doorder") {

++while (list($key,$val)=each($order)) { // - this is line 417

++++$DB_site->query("UPDATE smilie SET showid='$val' WHERE smilieid='$key'");

++}


Thanks!

lmongello
28 Jan 2004, 04:33
I installed the hack and noithing happened, although it said it was successful. I checked my smilies CP and it looks the same.

What did I do wrong?

Thanks!!!

-L

atrkyhntr
15 Feb 2004, 16:12
All worked well till I added more smiles thus a click for more link appears and when clicked an error page not found pops up... Its marked php but I run php3 where can I change the java script to read php3 instead of php?
THANKS in advance

Khashyar
13 Mar 2004, 20:47
Hi everyone....

Is this smiley display hack working for version 2.3.4??

Are there other similar hacks out there that definitely will work with 2.3.4?

Thanks for the feedback,

Khashyar