Back to vBulletin 3.0 Add-Ons

Random Smilies v1
Mod Version: 1.00, by BluPhoenix

This modification is in the archives.
vB Version: 3.0.7 Rating: (1 vote - 5.00 average) Installs: 11
Released: 31 Mar 2005 Last Update: Never Downloads: 1
Not Supported  

What does this do then?
It's nice having those smilies on the side of the editor, but after a while you get sick of looking at the same ones each time you post, so this changes the display to a random one.

The Hack

In includes/functions_editor.php find:
Code:
			$smilies = $DB_site->query("
				SELECT smilieid, smilietext, smiliepath, smilie.title,
				imagecategory.title AS category
				FROM " . TABLE_PREFIX . "smilie AS smilie
				LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
				ORDER BY imagecategory.displayorder, smilie.displayorder
			");
REPLACE that code with:
Code:
			$smilies = $DB_site->query("
				SELECT smilieid, smilietext, smiliepath, smilie.title,
				imagecategory.imagetype AS category
				FROM " . TABLE_PREFIX . "smilie AS smilie
				LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
				ORDER BY rand()
			");
======================================================
*Important Extra Configuration bit*

Do you have large smilies you'd rather weren't in the random selection? well make sure they are all stored in their own categories and then find:

Code:
LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
and add below:
Code:
WHERE imagecategory.imagecategoryid NOT IN (1,2)
Where the highlighted bits are the categoryid's you'd rather weren't available in the random smilies.
=======================================================

and now you are all done, no template edits are required and of course the screenshot, but it'll be different on yours as it'll include your smilies so you need to use a bit of imagination on this one

Thanks for looking at (and hopefully installing) a BluPhoenix vB Hack :tired:

Download

No files for download.

Screenshots

 


vblts.ru supports vBulletin®, 2022-2024