Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Random Smilies v1 Details »»
Random Smilies v1
Version: 1.00, by BluPhoenix BluPhoenix is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-30-2005 Last Update: Never Installs: 11
 
No support by the author.

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:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-31-2005, 07:47 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you don't order them doesn't it show them randomized anyway?
Reply With Quote
  #3  
Old 03-31-2005, 01:16 PM
BluPhoenix BluPhoenix is offline
 
Join Date: Nov 2004
Location: Wirral Peninsula
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Noit as far as I'm aware.. if you set them all to one it'll just shown the first 16 or whatever you have set..
Reply With Quote
  #4  
Old 03-31-2005, 02:50 PM
error_22 error_22 is offline
 
Join Date: Nov 2004
Location: Stockholm, Sweden
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sabret00the is right, they are if u don't order them.....thanks anyway
Reply With Quote
  #5  
Old 03-31-2005, 10:47 PM
underESTIMATED underESTIMATED is offline
 
Join Date: Feb 2005
Location: Akron, Oh
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good enough for me.

Thank you.
Reply With Quote
  #6  
Old 04-10-2005, 08:46 AM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #7  
Old 04-26-2005, 08:25 PM
Pain86 Pain86 is offline
 
Join Date: Mar 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks just what i needed
Reply With Quote
  #8  
Old 05-21-2005, 04:41 PM
colorteck's Avatar
colorteck colorteck is offline
 
Join Date: Apr 2005
Location: Texas
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice just what I was looking for. Installed and clicked :squareeyed:
Reply With Quote
  #9  
Old 05-26-2005, 07:56 PM
Pain86 Pain86 is offline
 
Join Date: Mar 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you get it workin for vb 3.0.7?
Reply With Quote
  #10  
Old 05-26-2005, 08:04 PM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just set them all to number 1 in the smiley manager, does the same thing.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06780 seconds
  • Memory Usage 2,288KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete