Read a 36-post ... Random
Many blogging platforms allow you to automatically insert a function for reading a post at random (random). In Blogger (blogspot) you need a special script. Many authors have produced such scripts but I chose to CreareBlog because I was easy to understand.
's easy, do this: Go to your blog
. Click on a link Design in the upper right. Please check the sidebar to the right and click on "Add a Gadget." From the page that opens, choose HTML / JavaScript. In the first entry box type a title for this gadget. I wrote a "post event" but you can invent a fanciful title or strange ... Then in the second entry box enter the code shown below:
\u0026lt;script type="text/javascript">
randarray var = new Array (); var l = 0; var flag;
numofpost var = 10 ; var wordnumber = 10; \u0026lt;/ script>
\u0026lt;script style = "text / javascript" src = "http://sites.google.com/site/creareblog/script-blog/articolicasuali.js? attredirects = 0 ">
\u0026lt;/ script>
\u0026lt;script src = "/ feeds / posts / default? Alt = json-in-script & start-index = 1 & max-results = 500 randomposts & callback =" type = " text / javascript "> \u0026lt;/ script>
Save, save and re-publish. Done.
Now, as the author explains, you can customize this script in the code highlighted in color.
1-The area in red gives the number of posts displayed, and you can increase or decrease. I've put in my 15
2-The area in green gives the number of words for the preview of each post. Increasing the number preview will be more complete, reducing the number you will gain space, putting 0 there will be no preview. I put 6.
3-The area in purple gives total number of posts from which to extract the post at random. If you've written only 30 posts, you can write here 50 or 100, so the script is faster. But when you arrive you will need to update this number to 101. I left 500.
One caution: do not render if you have written 15 post less because the script will not work.
CreareBlog Go take a look at: it is a treasure trove!
newbie;)
0 comments:
Post a Comment