We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Display Random Quotes
Topic Started: Oct 7 2016, 09:32 AM (614 Views)
Sree
Member Avatar
Member
[ *  * ]
Code Name: Display Random Quotes

What the code does: Displays a random quote each time you load any page in your board

Preview: Preview

How to use the code: Add the code wherever you want the quotes to be displayed. Edit as required.

How to install the code:
Put this code wherever you want the quote to be displayed.
Code:
 
<dl class="notice info">
<dt>Quote</dt>
<dd>
<script type="text/javascript">
var qt = new Array;

qt.push("Quote 1");

qt.push("Quote 2");

qt.push("Quote 3");

document.write(qt[(Math.floor(Math.random() * qt.length))]);
</script>
</dd>
</dl>

You can add as many quotes as you want. Make sure to add semicolon(;) after each quote.

Extra notes: Thought some of you might find this useful. And my first code submission!
Edited by Sree, Oct 18 2016, 07:32 AM.
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
Name changed.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Already a code available for this: http://support.zathyus.com/topic/5066969/1/
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
Cory
Oct 10 2016, 11:56 AM
Already a code available for this: http://support.zathyus.com/topic/5066969/1/
Oh snap! Didn't see that..
I am not gonna remove this though.
Offline Profile Quote Post Goto Top
 
Helena
Member Avatar
M is for Mod

No need to remove it. Its good to have multiple versions. Codes don't always work for everyone, so having another version is often helpful.

Thanks for your submission, and code on! :)
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
Helena
Oct 12 2016, 01:57 PM
No need to remove it. Its good to have multiple versions. Codes don't always work for everyone, so having another version is often helpful.

Thanks for your submission, and code on! :)
^_^
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Congrats on submitting your first code! It's definitely a rather nice one for your first. :)
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
DaPizzaMan
Oct 13 2016, 01:54 PM
Congrats on submitting your first code! It's definitely a rather nice one for your first. :)
Thanks!
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
The variable name quote seems like it could be used as a common variable name. I suggest placing a function around the entirety of your code so it does not apply to other codes as a global variable.
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
Cory
Oct 18 2016, 04:59 AM
The variable name quote seems like it could be used as a common variable name. I suggest placing a function around the entirety of your code so it does not apply to other codes as a global variable.
Changed the variable to 'qt'.
Offline Profile Quote Post Goto Top
 
polocolo
Member Avatar
Member
[ *  *  * ]
Nice code
Offline Profile Quote Post Goto Top
 
Sree
Member Avatar
Member
[ *  * ]
polocolo
Oct 23 2016, 02:51 PM
Nice code
Thanks!
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply