Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Sideblock Random Quotes Details »»
Sideblock Random Quotes
Version: 1.00, by steve1966 steve1966 is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.2 Rating:
Released: 02-16-2010 Last Update: Never Installs: 49
 
No support by the author.

I take no credit for this credits to original author if ypu like to have more options with images and instead of quotes you could have Jokes, Pics, Videos, Sayings go here

http://homepage-tools.com/

Instructions:

Forums & Moderators/Forum Blocks Manager/Add new block

Select Block Type: Custom HTML/PHP
Title: Random Quotes
Content Type: HTML

Content

Code:
<center><font size="1"> 
<br> 
<script type="text/javascript"> 
//store the quotations in arrays 
quotes = new Array(); 
authors = new Array(); 
quotes[0] = "I have a new philosophy. I'm only going to dread one day at a time."; 
authors[0] = "Charles Schulz"; 
quotes[1] = "Reality is the leading cause of stress for those in touch with it."; 
authors[1] = "Jack Wagner"; 
quotes[2] = "Few things are harder to put up with than the annoyance of a good example."; 
authors[2] = "Mark Twain"; 
quotes[3] = "The pure and simple truth is rarely pure and never simple."; 
authors[3] = "Oscar Wilde"; 
quotes[4] = "There's no business like show business, but there are several businesses like accounting."; 
authors[4] = "David Letterman"; 
quotes[5] = "Man invented language to satisfy his deep need to complain."; 
authors[5] = "Lily Tomlin"; 
quotes[6] = "Sometimes the mind, for reasons we don't necessarily understand, just decides to go to the store for a quart of milk. "; 
authors[6] = "Diane Frolov and Andrew Schneider"; 
quotes[7] = "Correct me if I'm wrong, but hasn't the fine line between sanity and madness gotten finer? " 
authors[7] = "George Price "; 

quotes[8] = "Sanity calms, but madness is more interesting."; 
authors[8] = "John Russell"; 

quotes[9] = "I decided that it was not wisdom that enabled [poets] to write their poetry, but a kind of instinct or inspiration, such as you find in seers and prophets who deliver all their sublime messages without knowing in the least what they mean.."; 
authors[9] = "Socrates (469 BC - 399 BC)"; 

quotes[10] = "Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."; 
authors[10] = "Bill Watterson"; 

quotes[11] = "It is not worth an intelligent man's time to be in the majority. By definition, there are already enough people to do that."; 
authors[11] = "G. H. Hardy"; 

quotes[12] = "An intelligence test sometimes shows a man how smart he would have been not to have taken it."; 
authors[12] = "Laurence J. Peter (1919 - 1988)"; 

quotes[13] = "When I took office, only high energy physicists had ever heard of what is called the Worldwide Web.... Now even my cat has its own page."; 
authors[13] = "Bill Clinton"; 

quotes[14] = "We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true."; 
authors[14] = "Robert Wilensky"; 

quotes[15] = "The 'Net is a waste of time, and that's exactly what's right about it."; 
authors[15] = "William Gibson"; 

quotes[16] = "Do not envy a sinner; you don't know what disaster awaits him."; 
authors[16] = "Bible, Old Testament"; 

quotes[17] = "People everywhere confuse what they read in newspapers with news."; 
authors[17] = "A. J. Liebling (1904 - 1963)"; 

quotes[18] = "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population."; 
authors[18] = "David Letterman"; 

quotes[19] = "Rock music journalism is people who can't write interviewing people who can't talk for people who can't read."; 
authors[19] = "Frank Zappa"; 

quotes[20] = "Half of the American people have never read a newspaper. Half never voted for President. One hopes it is the same half."; 
authors[20] = "Gore VIdal"; 

quotes[21] = "I have always found that mercy bears richer fruits than strict justice."; 
authors[21] = "Abraham Lincoln (1809 - 1865)"; 

quotes[22] = "Injustice anywhere is a threat to justice everywhere."; 
authors[22] = "Martin Luther King Jr. (1929 - 1968)"; 

quotes[23] = "Deeds, not words shall speak me."; 
authors[23] = "John Fletcher (1579 - 1625)"; 

quotes[24] = "Drawing on my fine command of the English language, I said nothing."; 
authors[24] = "Robert Benchley (1889 - 1945)"; 

quotes[25] = "Nearly all men can stand adversity, but if you want to test a man's character, give him power."; 
authors[25] = "Abraham Lincoln (1809 - 1865)"; 

quotes[26] = "If everything's under control, you're going too slow. "; 
authors[26] = "-- Mario Andretti "; 

quotes[27] = "A lie gets halfway around the world before the truth has a chance to get its pants on."; 
authors[27] = "- Sir Winston Churchill (1874-1965) "; 

quotes[28] = "MG is the bomb" 
authors[28] = "gearhead"; 

//calculate a random index 
index = Math.floor(Math.random() * quotes.length); 

//display the quotation 
document.write("<DL>\n"); 
document.write("<DT>" + "\"" + quotes[index] + "\"\n"); 
document.write("<DD>" + "-- " + authors[index] + "\n"); 
document.write("</DL>\n"); 

//done 
</SCRIPT> </b></font> 
</center> 
<br>

Show Your Support

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

Comments
  #12  
Old 03-28-2010, 02:18 PM
chriske chriske is offline
 
Join Date: Oct 2008
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dr.osamA View Post
thank you mate

can we use BBcode in the code ??

installed
I hope so, I want to put a link under the quotes. how can I achieve that?
Reply With Quote
  #13  
Old 03-28-2010, 07:15 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a better idea...
Everytime someone applies to our community we ask them a question and would like to see their response.

So my idea is this...
a hidden bbcode around a question such as [hidden]question here : answer here [/hidden]

Then when a person copied the original questionaire and answers it in his post... the site would grab his answer and show it in a slide of quotes what they answered.

It's a pretty cool feature.
Could someone develop this PLEASE?
Reply With Quote
  #14  
Old 03-28-2010, 07:50 PM
Knuckles83 Knuckles83 is offline
 
Join Date: Jan 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I sometimes randomly get 'undefined' for both the quote and author, randomly. Any reason why?
Reply With Quote
  #15  
Old 03-31-2010, 12:05 AM
chriske chriske is offline
 
Join Date: Oct 2008
Posts: 167
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chriske View Post
I hope so, I want to put a link under the quotes. how can I achieve that?
anyone?
Reply With Quote
  #16  
Old 06-20-2010, 10:10 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So I have an idea...
Each user has a custom field in their profile, and they type a quote like

"Brotherhood of Gamers- it's all about the friends"

And then this mod would randomely grab a quote from a random member to display it on a page on each load, OR BETTER YET... have it rotate after it shows for a couple of seconds.

How would i accomplish this? could someone help me please?
Reply With Quote
  #17  
Old 06-22-2010, 07:50 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any demo or pic of this in action?
Reply With Quote
  #18  
Old 07-30-2010, 05:39 PM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works but it would be great if it was modified for random pics from albums.
Reply With Quote
  #19  
Old 11-05-2010, 03:21 AM
webmastersitesi webmastersitesi is offline
 
Join Date: Oct 2007
Location: Turkey
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any working sample for this?
Reply With Quote
  #20  
Old 03-28-2011, 11:02 PM
Sablehawk Sablehawk is offline
 
Join Date: Dec 2010
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works ok ... unfortunately I cannot get it to make much of a database. I can use a total of 11 quotes. If I put more than that it just won't work for me.
Reply With Quote
  #21  
Old 12-21-2011, 12:34 AM
doc fluty doc fluty is offline
 
Join Date: Aug 2010
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Knuckles83 View Post
I sometimes randomly get 'undefined' for both the quote and author, randomly. Any reason why?
I get this also.

Also when I put a lot of quotes in there.. it doesn't work.

is there an update for this or some other way of doing the same thing?

Thanks!
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 08:38 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.04654 seconds
  • Memory Usage 2,323KB
  • Queries Executed 26 (?)
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_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)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