PDA

View Full Version : Change the display order of smilies


Admin
08-19-2001, 10:00 PM
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
08-20-2001, 07:47 AM
nice simple and effective .... I'll try it now :)

JJR512
08-20-2001, 07:55 AM
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! :)

Admin
08-20-2001, 07:57 AM
Yeah I know JJR, I forgot to replace another line. :o

Hoffi
08-20-2001, 09:13 AM
Cool Hack and it works directly.
Good work.

weezle
08-20-2001, 09:40 AM
kool hack m8 ur on fire with these hacks @ the mo

Zecherieh
08-20-2001, 11:27 PM
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
08-21-2001, 08:38 AM
Thanks FireFly, it works great!

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

*snyx runs off to install*

snyx
08-21-2001, 08:41 PM
I tired to copy paste the queries into phpmyadmin and I get errors?

dost
08-21-2001, 09:40 PM
[QUOTE]Originally posted by snyx
I tired to copy paste the queries into phpmyadmin and I get errors?

snyx
08-21-2001, 09:49 PM
I obviously tried that genius!

dost
08-21-2001, 09:54 PM
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
08-21-2001, 10:09 PM
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?

Admin
08-22-2001, 05:28 AM
You didn't create the new field, showid.
Hold on a bit, I'll come up with a file to do everything itself.

snyx
08-22-2001, 05:35 AM
sweet, thx

Admin
08-22-2001, 06:49 AM
Try this file, upload it to your admin folder. Tell me if it worked!

snyx
08-22-2001, 07:37 AM
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?

Admin
08-22-2001, 07:43 AM
Use the second option.

snyx
08-22-2001, 08:33 AM
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?

Admin
08-22-2001, 12:32 PM
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
08-23-2001, 02:51 AM
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
08-23-2001, 02:43 PM
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
08-23-2001, 06:58 PM
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
08-23-2001, 07:10 PM
i have over 200 lol

Hoffi
08-23-2001, 09:01 PM
u need a hugh Screen. :D

Sarge
08-25-2001, 07:21 PM
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?

Admin
08-25-2001, 07:36 PM
What is line 135?
And did you run the queries successfully?

Sarge
08-25-2001, 07:42 PM
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
08-25-2001, 07:43 PM
i am on aol im
DLRArmyWebsite if you got a sec

Thanks in advance

Sarge
08-25-2001, 08:12 PM
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

Admin
08-26-2001, 05:51 AM
Sorry for not answering, I was sleeping. :o

Glad you fixed it. :)

Sarge
08-26-2001, 08:38 PM
thanks bud

Kengan
08-27-2001, 07:41 AM
cool hack ! I like it very much ! thanks man !

ying_ho
09-06-2001, 04:55 PM
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?

Admin
09-06-2001, 05:05 PM
Open your config.php file, and remove ANY whitespaces after the ?> and get back to me. :)

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

Any other suggestion?

ying_ho
09-06-2001, 06:34 PM
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
09-16-2001, 03:04 PM
ying_ho please enter your license information into your profile.

YourHostSucks
09-30-2001, 06:48 PM
Great again, you have alot of nice hacks..

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

Mike Gaidin
10-01-2001, 12:55 AM
Great hack! Thanks!

almighty one
10-07-2001, 06:45 AM
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
10-07-2001, 06:45 AM
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

Admin
10-07-2001, 06:55 AM
Nope, sorry.
This is also the way it works with forums, by the way.

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

apollyon
10-08-2001, 12:01 AM
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
10-08-2001, 03:59 PM
bump

Justice
10-16-2001, 04:56 AM
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
11-13-2001, 12:53 AM
Does this work on vb2.2.0 ?

Admin
11-13-2001, 11:22 AM
Yes it should.

|DarkManX|
11-22-2001, 07:53 PM
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") {

Admin
11-23-2001, 10:39 AM
Probably forgot a ; or } in the line before.
Copy the 3 lines before line 262.

Wayne2k1.com
11-23-2001, 11:33 AM
Installed.

Everything's fine :D

|DarkManX|
11-23-2001, 12:13 PM
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|
11-23-2001, 02:38 PM
ya see anything that could be wrong?

thanks in advance for the help

Admin
11-23-2001, 03:03 PM
Everything seems right. :confused:

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

|DarkManX|
11-23-2001, 03:26 PM
tried it on a fresh smilie.php and get the same thing.....

|DarkManX|
11-23-2001, 04:41 PM
shoot....any idea's at all....i really want to be able to arrange them.......

|DarkManX|
11-25-2001, 05:51 PM
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
11-25-2001, 07:03 PM
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-12-2001, 01:24 AM
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
12-13-2001, 12:40 AM
this works on 2.2.1 right???

Dalius
12-13-2001, 12:49 AM
YEAH!
Installed on 2.2.1, works PERFECTLY!
Thanks FireCat

Admin
12-13-2001, 05:01 AM
Oi!

Rose
01-18-2002, 06:12 PM
*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
01-19-2002, 02:13 PM
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
01-19-2002, 06:04 PM
nice :)

many thanks man

I see that vb.org is using this. heh

Shenlong
01-19-2002, 09:05 PM
spectacular hack firefly!

Lucky
01-19-2002, 10:31 PM
Great job again.

Thank you kindly!

blazin
01-20-2002, 03:44 AM
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
01-23-2002, 08:40 PM
Great Hack! I no longer have my big smilies up front... This helps me out a lot!!! No problems installing... Keep it up!

Xelation
01-24-2002, 02:10 AM
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

Admin
01-24-2002, 01:16 PM
Nothing to do with my hack... do you happen to use the php3 version?

Xelation
01-24-2002, 01:46 PM
I dont us the php3 version.

DarkReaper
01-26-2002, 02:29 AM
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
01-27-2002, 07:10 PM
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
01-30-2002, 08:10 PM
Any way to get this to affect the "get more" box?

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

Lucky
02-05-2002, 02:51 AM
Got vbp3.0pr7 and vb2.2.2 and all is working great!

Thanks. :p

mondaynightmike
02-15-2002, 03:09 PM
Great hack. Thanks Firefly

Erwin
03-01-2002, 11:21 AM
Good one. Easy install, worked first time round! Two thumbs up! :D

Vlad
03-26-2002, 11:24 PM
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]
03-27-2002, 12:40 AM
functions.php is a filename that must be in your forum/admin folder

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

Austin Dea
03-27-2002, 03:25 AM
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
03-27-2002, 03:44 PM
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
03-27-2002, 04:56 PM
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
03-27-2002, 05:28 PM
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
03-28-2002, 06:21 AM
and they all must end with

;

:cheeky:

Austin Dea
03-28-2002, 04:10 PM
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
04-20-2002, 04:06 AM
Thanks! Finally I found something useful for this hack :D Already installed!

Rheinblitz
04-22-2002, 06:49 PM
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
04-30-2002, 12:09 AM
This work of 2.2.5

FWC
04-30-2002, 12:36 AM
Originally posted by neo
This work of 2.2.5 Yes, it does.

Fatty_Bolger
05-14-2002, 10:59 PM
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:

Admin
05-15-2002, 09:35 AM
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
05-15-2002, 11:40 AM
Thanks Firefly, worked a treat. Mucho Happiness :-)

mariochiosso
05-16-2002, 12:41 AM
hi,
does it work with 2.2.5 release?

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

Keyser S?ze
05-17-2002, 01:49 AM
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
05-31-2002, 12:34 PM
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!

Admin
05-31-2002, 02:15 PM
You need to run each query separately, or separate them with ;.

Kat
05-31-2002, 03:08 PM
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.
06-21-2002, 10:18 PM
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.
06-21-2002, 10:22 PM
Okay, it does update the order, it simply does not show the order on the admin smilie page.

Schorsch
07-16-2002, 05:20 AM
thanks, works great, easy install :)

MarkyBuzz
07-22-2002, 08:26 PM
Just wanna add my thanks FireFly yoos the man ;)

Worked like a charm on 2.2.6!

THANK YOOOOO! :cool:

Barret
08-30-2002, 05:49 PM
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
08-30-2002, 06:35 PM
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
08-30-2002, 06:49 PM
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
08-30-2002, 07:05 PM
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
08-30-2002, 09:23 PM
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
09-06-2002, 08:06 PM
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
09-10-2002, 05:02 PM
/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
09-12-2002, 12:38 AM
thanks.
*clicks install*

groovesalad
09-20-2002, 09:09 PM
EDIT: Figured it out....

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

otacon
10-17-2002, 05:06 PM
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
10-19-2002, 10:41 PM
Does this work in 2.2.8?

N9ne
10-20-2002, 03:44 PM
bump...

Xer
12-06-2002, 05:55 PM
WORKING ON 2.2.9

LilTara
12-10-2002, 02:40 AM
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
12-10-2002, 03:56 PM
I've got this working for me no problems on 2.2.8, should work on 2.2.x.

LilTara
12-10-2002, 05:09 PM
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
12-10-2002, 05:25 PM
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
12-10-2002, 06:35 PM
I've redone it several times... so I'm pretty baffled.

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

N9ne
12-10-2002, 07:05 PM
Have you got any other hacks installed which have anything to do with smilies in any way?

LilTara
12-10-2002, 08:51 PM
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
12-10-2002, 08:53 PM
When you added smilies to quick reply, did you modify functions.php ?

LilTara
12-10-2002, 08:54 PM
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
12-17-2002, 11:51 PM
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
01-06-2003, 12:51 AM
Thanks for a great hack Firefly.

*Installs*

Oblivion Knight
02-05-2003, 08:50 PM
Top stuff FireFly.
Nice and simple, yet really handy :)

* Oblivion Knight clicks install.

Host Directory
02-10-2003, 09:33 PM
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
02-15-2003, 04:48 PM
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
02-17-2003, 01:54 PM
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
02-21-2003, 06:16 PM
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
03-09-2003, 09:15 AM
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
03-09-2003, 04:55 PM
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
03-14-2003, 06:49 PM
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
03-14-2003, 08:06 PM
The reason i am concerned about this hack is because it is a prequisit to another hack called the smilie panel - https://vborg.vbsupport.ru/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
03-22-2003, 10:27 AM
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
04-11-2003, 07:11 PM
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
04-11-2003, 09:12 PM
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
04-11-2003, 09:14 PM
There are a litle bug ...

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

AdultInsider
04-15-2003, 05:12 PM
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
05-17-2003, 12:26 AM
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
05-17-2003, 07:27 AM
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
05-23-2003, 03:10 PM
Installed on 2.3.0 and works wonderfully! Thank you Firefly!!

gthell
05-26-2003, 09:11 AM
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-06-2003, 07:00 AM
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
06-10-2003, 02:17 AM
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
06-21-2003, 01:37 PM
05-26-03 at 11:11 AM gthell said this in Post #150 (https://vborg.vbsupport.ru/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
07-03-2003, 06:13 PM
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
07-16-2003, 02:36 AM
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
07-16-2003, 06:46 AM
06-10-03 at 04:17 AM Linus said this in Post #152 (https://vborg.vbsupport.ru/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.. ;)

https://vborg.vbsupport.ru/showthread.php?postid=251173#post251173

Host Directory
07-16-2003, 10:22 PM
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
07-17-2003, 12:43 AM
Today at 12:22 AM Host Directory said this in Post #157 (https://vborg.vbsupport.ru/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
07-17-2003, 02:59 AM
Today at 09:43 PM JonUrban said this in Post #158 (https://vborg.vbsupport.ru/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
07-17-2003, 03:11 AM
Today at 04:59 AM DeeperImage said this in Post #159 (https://vborg.vbsupport.ru/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
07-17-2003, 03:19 AM
Today at 12:11 AM JonUrban said this in Post #160 (https://vborg.vbsupport.ru/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
07-17-2003, 08:01 AM
Today at 02:43 AM JonUrban said this in Post #158 (https://vborg.vbsupport.ru/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
07-17-2003, 03:42 PM
Today at 05:01 AM Oblivion Knight said this in Post #162 (https://vborg.vbsupport.ru/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
07-17-2003, 06:43 PM
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
07-29-2003, 09:45 PM
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
07-29-2003, 09:47 PM
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
08-03-2003, 11:33 AM
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
08-23-2003, 10:07 PM
@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
09-20-2003, 06:15 PM
I've done this other way round :)

Rabbitoh Warren
10-03-2003, 11:45 AM
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
10-08-2003, 07:47 PM
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
10-09-2003, 11:01 AM
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
10-09-2003, 08:21 PM
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-10-2003, 10:32 AM
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-10-2003, 03:13 PM
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
10-15-2003, 03:29 AM
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
01-14-2004, 08:25 AM
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
01-28-2004, 02:33 AM
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
02-15-2004, 02:12 PM
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
03-13-2004, 06:47 PM
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