I could not find quote of the day code which could support up to 365 quotes. So my friend J.M. developed a code. We re thank full to him for developing this code for free. We are happy to release Quote of the day code.
1. Quotes are parsed and so that no quote is missed.
2. Quotes refresh daily and not on browser tab refresh.
3. Upto 365 quotes. So new quote for a year.
4. Contains date script.
5. Fully customizable.
Troubleshooting / Points to consider while uploading the code.
1. Do not use special characters. They may / may not be supported.
2. Do not use the characters like Opening and closing double quotes (" ") and semicolon (;) since they are used by the codes.
e.g. if you use this quote
The Mother said, "She devotes her energy to bring up . passing through all these experiences; so then . done"
Then the code will look like
Quotes= " The Mother said, "She devotes her energy to bring up . passing through all these experiences; so then . done" ";
a. As you can see there are two opening and two closing quotes.
b. Again the semi colon is repeated twice (one in the quote and another at the end (needed to complete the line of code)
This will not allow the code to work ad nothing will be displayed.
So change it to
Quotes= " The Mother said, 'She devotes her energy to bring up . passing through all these experiences, so then . done' ";
Here double opening and closing quotes ("") are replaced by single ones ('') and semicolon (;) by comma (,).
The best and fastest way according to me is to copy the quotes in word processer like MS word. Then find and replace all ( " ) by ( '), ( " ) by ( ') and ( ; ) by ( , ).
c. If the code is still not displayed, then remove other special characters like underscore (_), in short, make your quote in simple plain text and check if it works.
Please find code for Quote of the day.
<p><font face="Trebuchet MS" color="#800000" size="2">
<!-- date script ends ->
<!-- end of OFTD script by J.M. -->
How to use the code
1. The lines marked in green are the comments, which the makes no difference to a browser but makes it easier for us to identify the codes.
2. The date script contains
var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
You can change ( Sunday ) to ( Sun ) and/or ( Jan ) to ( January )
If you do not wish to add date, then just delete lines starting from (including)
<!-- date script starts ->
<!-- date script ends ->
3. Change the number of quotes.
var numquotes = 5;
change 5 to any number. here 5 is any number 'n'
make sure that 'n' mentioned in var numquotes and the last number in square bracket after ( Quotes ) is the same.
Quotes= " You can also ask for Brahma Jnana to divine mother.";
4. I Have created the quote code which has only one saint. So Instead of adding the name in each quote I have added it in the last
<p><font face="Trebuchet MS" color="#800000" size="2"><p><i>- Sri Ramakrishna</i></p></font></p>
Here ( - Sri Ramakrishna ) can be changed.
If you want to display quotes by more than one saints, then in each quote, the name has to be added manually.
Quotes= " You can also ask for Brahma Jnana to divine mother. - Sri Ramakrishna";
5. If you have some knowledge of CSS, then you can change way this script is displayed.
Hope you will find this script / code useful.