vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Random smilies in posts/reply (https://vborg.vbsupport.ru/showthread.php?t=99426)

GuaRRand 10-26-2005 10:00 PM

Random smilies in posts/reply
 
I edited the original 3.0.7 code, by BluPheonix, a bit to comply with 3.5.
Tetsed it with my 3.5 site and it works fine.

In includes/functions_editor.php find:

Code:

$smilies = $vbulletin->db->query_read("
                                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 it with:

Code:

$smilies = $vbulletin->db->query_read("
                                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()
                        ");

Should work fine!!

jugo 10-27-2005 01:28 PM

I want to do this so bad, but i'd hate to have to edit files...

[high]* jugo goes to find a way to trick it into a hook....
[/high]

[high]* jugo found it!!!
[/high]

I hope I'm not stepping on toes here, but i released the plugin version here: https://vborg.vbsupport.ru/showthread.php?t=99435 :ermm:

GuaRRand 10-27-2005 03:33 PM

OUCH!!

*sees toes get crushed*

:P

Snake 10-27-2005 06:42 PM

Installed!

GuaRRand 10-27-2005 06:50 PM

Dont forget to click INSTALL pls :D

sellbuydomain 10-27-2005 08:49 PM

find the code, where to change it, you did not say where to change or add
'

Bounce 10-27-2005 09:30 PM

Quote:

Originally Posted by sellbuydomain
find the code, where to change it, you did not say where to change or add
'

from the original thread ;)

Change To:-

PHP 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()
            "
); 

I take it its the same as thread from 3.0.7 :ninja:

GuaRRand 10-28-2005 06:34 AM

Hehe..sorry, will add it in the main post...

hotwheels 12-28-2005 09:51 PM

worked perfectly........thanks. hotwheels clicks *installs*

sportsoutlaw 12-31-2005 10:58 PM

I will give this one a try


All times are GMT. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01056 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete