TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 302
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 203
  • Total: 204
  • @rjen

OMG Another Random Quote Block

Started by evilicy, November 04, 2007, 08:06:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

evilicy

I know there is already random quote block code snipplets but this one is different!
I did not write this script all orginal credits are intact. All I did was simply modify the script to display the quotes in a text area. Why? Because I thought it be a cool thing to do!

Copy and paste into a scriptbox

<style>
#randomtext{
background-image:url(/images/dclouds.jpg);
}
</style>

<form name="random">
<textarea id="randomtext" rows="10" cols="17" wrap="physical" name="random" readOnly="true">
</textarea>
<center>
<input type=button value="New Quote" onClick="getMessage()">
</center>
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
// Copyright 1996 - Tomer and Yehuda Shiran
// This example will appear in our forthcoming book on JavaScript.
// Feel free to "steal" this code provided that you leave this notice as is.
// Additional examples from the book can be found at //http://www.geocities.com/SiliconValley/9000/
// For more information contact Tomer or Yehuda Shiran <yshiran@iil.intel.com>

function getMessage() {
// create array of poetry quotes
var ar = new Array(52)
ar[0] = "A poet is, before anything else, a person who is passionately in love with language. - W. H. Auden"
ar[1] = "A poet is a professional maker of verbal objects. - W. H. Auden"
ar[2] = "A verbal art like poetry is reflective; it stops to think. Music is immediate, it goes on to become. - W. H. Auden"
ar[3] = "Geniuses are the luckiest of mortals because what they must do is the same as what they most want to do. - W. H. Auden"
ar[4] = "It is a sad fact about our culture that a poet can earn much more money writing or talking about his art than he can by practicing it. - W. H. Auden"
ar[5] = "Poetry is ordinary language raised to the Nth power. Poetry is boned with ideas, nerved and blooded with emotions, all held together by the delicate, tough skin of words. - Paul Engle"
ar[6] = "A poem is true if it hangs together. Information points to something else. A poem points to nothing but itself. - E. M. Forster"
ar[7] = "Poetry is what gets lost in translation. - Robert Frost"
ar[8] = "Poetry is when an emotion has found its thought and the thought has found words. - Robert Frost"
ar[9] = "To be a poet is a condition, not a profession. - Robert Frost"
ar[10] = "A poem begins in delight and ends in wisdom. - Robert Frost"
ar[11] = "Poetry is plucking at the heartstrings, and making music with them. - Dennis Gabor"
ar[12] = "Poetry is a deal of joy and pain and wonder, with a dash of the dictionary. - Kahlil Gibran"
ar[13] = "Poetry is thoughts that breathe, and words that burn. - Thomas Gray"
ar[14] = "Even when poetry has a meaning, as it usually has, it may be inadvisable to draw it out... Perfect understanding will sometimes almost extinguish pleasure. - A. E. Housman"
ar[15] = "Poetry is the art of uniting pleasure with truth. - Samuel Johnson"
ar[16] = "You will find poetry nowhere unless you bring some of it with you. - Joseph Joubert"
ar[17] = "Poetry should... should strike the reader as a wording of his own highest thoughts, and appear almost a remembrance. - John Keats"
ar[18] = "Poets are soldiers that liberate words from the steadfast possession of definition. - Eli Khamarov"
ar[19] = "Poetry is the art of creating imaginary gardens with real toads. - Marianne Moore"
ar[20] = "Each memorable verse of a true poet has two or three times the written content. - Alfred de Musset"
ar[21] = "Poetry heals the wounds inflicted by reason. - Novalis"
ar[22] = "Poetry is nearer to vital truth than history. - Plato"
ar[23] = "Painting is silent poetry, and poetry is painting that speaks. - Plutarch"
ar[24] = "Poetry is the rhythmical creation of beauty in words. - Edgar Allan Poe"
ar[25] = "Poetry is the revelation of a feeling that the poet believes to be interior and personal which the reader recognizes as his own. - Salvatore Quasimodo"
ar[26] = "The poem is the point at which our strength gave out. - Richard Rosen"
ar[27] = "Science is for those who learn; poetry, for those who know. - Joseph Roux"
ar[28] = "A poet's work is to name the unnameable, to point at frauds, to take sides, start arguments, shape the world, and stop it going to sleep. - Salman Rushdie"
ar[29] = "Poetry is an echo, asking a shadow to dance. - Carl Sandburg"
ar[30] = "I've written some poetry I don't understand myself. - Carl Sandburg"
ar[31] = "Poetry is the opening and closing of a door, leaving those who look through to guess about what is seen during the moment. - Carl Sandburg"
ar[32] = "Poetry is a mirror which makes beautiful that which is distorted. - Percy Bysshe Shelley"
ar[33] = "Poets are the unacknowledged legislators of the world. - Percy Bysshe Shelley"
ar[34] = "Poetry is an orphan of silence. The words never quite equal the experience behind them. - Charles Simic"
ar[35] = "Wanted: a needle swift enough to sew this poem into a blanket. - Charles Simic"
ar[36] = "A poet looks at the world the way a man looks at a woman. - Wallace Stevens"
ar[37] = "The poet may be used as a barometer, but let us not forget that he is also part of the weather. - Lionel Trilling"
ar[38] = "A poem is never finished, only abandoned. - Paul Valery"
ar[39] = "The poem is a little myth of man's capacity of making life meaningful. And in the end, the poem is not a thing we see-it is, rather, a light by which we may see-and what we see is life. - Robert Penn Warren"
ar[40] = "To have great poets, there must be great audiences. - Walt Whitman"
ar[41] = "A poet can survive everything but a misprint. - Oscar Wilde"
ar[42] = "All bad poetry springs from genuine feeling. - Oscar Wilde"
ar[43] = "A poet's autobiography is his poetry. Anything else is just a footnote. - Yevgeny Yevtushenko"
ar[44] = "Listen, real poetry doesn't say anything; it just ticks off the possibilities. Opens all doors. You can walk through anyone that suits you. - Jim Morrison "
ar[45] = "If my poetry aims to achieve anything, it's to deliver people from the limited ways in which they see and feel. - Jim Morrison"
ar[46] = "I believe in a long, prolonged derangement of the senses to attain the unknown. Our pale reasoning hides the infinite from us. - Jim Morrison"
ar[47] = "I am interested in anything about revolt, disorder, chaos-especially activity that seems to have no meaning. It seems to me to be the road toward freedom... Rather than starting inside, I start outside and reach the mental through the physical. - Jim Morrison"
ar[48] = "Each generation wants new symbols, new people, new names. They want to divorce themselves from their predecessors. - Jim Morrison"
ar[49] = "I think the highest and lowest points are the important ones. Anything else is just...in between. I want the freedom to try everything. - Jim Morrison"
ar[50] = "The most important kind of freedom is to be what you really are. You trade in your reality for a role. You give up your ability to feel, and in exchange, put on a mask. - Jim Morrison"
ar[51] = "Where's your will to be weird? - Jim Morrison"

var now = new Date()
var sec = now.getSeconds()
document.random.random.value="" + ar[sec % 52]
}
getMessage()
//-->
</SCRIPT>


DEMO

You may also want to change the quotes, unless you have a poetry related site!

-edit-

Fixed missing tag and added bg image to textbox and a new quote button (just edited so doesn't refresh entire page) See I'm only abit dumb!


Crip

I added two php script Random-quotes somewhere in here..more the merrier. ;)
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



evilicy

Quote from: icrip on November 04, 2007, 08:10:25 PM
I added two php script Random-quotes somewhere in here..more the merrier. ;)

It can't hurt! :)
and after getting so much  help from this site I wanted to try to give something back.

Crip

Yeah,
I just took the 50 quotes in your code and added them to my already 500; so now I have a Total of 550 different Quotes.. :P
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



evilicy


This website is proudly hosted on Crocweb Cloud Website Hosting.