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

Reply
 
Thread Tools
Random Quote Hack Details »»
Random Quote Hack
Version: 1.00, by Sketch Sketch is offline
Developer Last Online: May 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-01-2002 Last Update: Never Installs: 29
 
No support by the author.

If anyone else has hacked this, I could not find it, so here I post.

This is my first hack. Simple one. Took 5 minutes to create. Designed for vB 2.2.5 but may work on other versions too. Requires MySQL so if you're a high end vB'er that is using another db, you'll have to modify this to your highly customized situation.

The hack creates a new table (unpopulated) and randomly selects one quote from the table everytime the page loads. It displays on the home page immediately above the forums.

Demonstration can be seen at (not online anymore)

Good luck
Sketch

Show Your Support

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

Comments
  #12  
Old 05-02-2002, 05:30 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have the same one as this hack, made it myself also, but it doesn't use the phpinclude template. Rather, I have this:

PHP Code:
 $quot=$DB_site->query_first("SELECT quote,name FROM quotes ORDER BY rand() LIMIT 1");
 
$thequote $quot['quote'];
 
$thequoter $quot['name']; 
in my global.php, and I call $thequote and $thequoter in my Header.

(I just gave some secret away here, damn...)

Anyhoo, I didn't like Lesane's hack, first off because it (currently) draws credit away from those who actually Said the quotes, and second of all, I don't want my users to submit quotes. All nice and fun, but they don't know which 614 quotes I have in my (vbulletin.quotes) table, and I doubt they'll refresh to see 'm all, before submitting one. I'll deal with it myself, thankyouverymuch. Was doing that anyhow, already
Reply With Quote
  #13  
Old 05-02-2002, 05:32 PM
KuraFire's Avatar
KuraFire KuraFire is offline
 
Join Date: Oct 2001
Location: inside vB3's .php
Posts: 1,245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

btw, I *am* trying to figure out if I can make my quotes searchable and 'orderable', similar to the memberlist but then with my quotes
(ie. sort them by Letter, and search on them by either quote or name)
Reply With Quote
  #14  
Old 05-02-2002, 07:10 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by DWZ
althought that one still has problems
If their any problems with my hack then post it in the desired thread. I saw your last posts and the problem was solved right?

@Sketch: You couldn't find it? Which keyword did u tried in the search?
Reply With Quote
  #15  
Old 05-02-2002, 07:47 PM
Sketch Sketch is offline
 
Join Date: Apr 2002
Location: Baltimore, Maryland
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lesane


If their any problems with my hack then post it in the desired thread. I saw your last posts and the problem was solved right?

@Sketch: You couldn't find it? Which keyword did u tried in the search?
I believe I searched for Quote and Random and Random quote together. However, once mentioned that you had created one, I did find it on the front page of the Forum Display hacks database page. Oh well. The more the merrier.

Sketch
Reply With Quote
  #16  
Old 05-06-2002, 03:23 PM
Zarith Zarith is offline
 
Join Date: Jan 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

would it be possible to have it pull pictures instead of text quotes? like if i made a folder with 1 line graphic images from a game i play could i make it pull them randomly?

like making the quotes "<img src="gfx2.jpg>" ect?
Reply With Quote
  #17  
Old 05-06-2002, 03:46 PM
Sketch Sketch is offline
 
Join Date: Apr 2002
Location: Baltimore, Maryland
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Zarith
would it be possible to have it pull pictures instead of text quotes? like if i made a folder with 1 line graphic images from a game i play could i make it pull them randomly?

like making the quotes "<img src="gfx2.jpg>" ect?
yeah, you'd have to modify the quote template and modify the table, although you wouldn't have to.

However, if these images were uploaded by users and you wanted to store the image in the db itself (which I don't personally recommend), then you WOULD have to modify the table to make the field containg the image BLOB or something. However, if the images are maintained by you, I recommend uploading the image to a folder on your server and storing a link to the image in your db table.

HTH.
Sketch
Reply With Quote
  #18  
Old 05-09-2002, 03:23 AM
Zarith Zarith is offline
 
Join Date: Jan 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yea i would run all the images, and maintain the quotes myself. not really sure how to use one of these random quote hacks to do it yet.. but basically i just want a random image from the DB to display at the top of the forum list and thread list. no other info just the image
Reply With Quote
  #19  
Old 06-06-2002, 05:25 AM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I just installed this hack, but I don't see how to add quotes to the db... Do I have to manually add quotes to the table via phpMyAdmin?
Reply With Quote
  #20  
Old 06-06-2002, 04:49 PM
Sketch Sketch is offline
 
Join Date: Apr 2002
Location: Baltimore, Maryland
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah you have to actually enter it manually. I was going to release a version that integrated with your admin cp, but seems everyone thought Lesane's was so much better, I just left the hack alone.

Sketch
Reply With Quote
  #21  
Old 06-07-2002, 12:40 AM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just went with Kurafire's hack.. I don't want people submitting their own quotes. (And yes I know I would have to approve them before they'd show up, but I like the idea of being in total control of all quote submissions)
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 05:00 AM.


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.06429 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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