View Full Version : Random
SnowBot
01-14-2004, 12:42 PM
I was looking for a random smilie thing for VB3 and couldnt find anything but i did notice this post here
https://vborg.vbsupport.ru/showpost.php?p=205751&postcount=2 (https://vborg.vbsupport.ru/showpost.php?p=205751&postcount=2)
I was wondering where and what i would change for it to work for VB3 RC2? Thanks for any help, i appreciate it.
NTLDR
01-14-2004, 02:05 PM
Two variations, based on if you want random smilies in each group or random smilies from any group respectivly:
In includes/functions_editor.php find:
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, smilie.displayorder
Replace with (for random smilies within each group):
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY imagecategory.displayorder, RAND()
Or replace with (for random smilies from any group):
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
ORDER BY RAND()
Untested but should work.
Zachery
01-14-2004, 02:55 PM
well there is a trick that requires no hackign make all the smilies id 1 when your saving them they will rotate now
SnowBot
01-14-2004, 03:01 PM
NTLDR thats great, i was looking in that file but didnt see that bit at all. Time to get an upgrade to RC2 on my glasses also :)
Appreciated
THANKS
Snowy
SiXXGuNNZ
01-16-2004, 01:50 AM
I wanna hump u, thanks :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.