Random Smilies v1
This modification is in the archives.
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 "); 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) Code:
WHERE imagecategory.imagecategoryid NOT IN (1,2) ======================================================= 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
|