help with html code on blogger

gamingseo

Power Member
Joined
Jul 10, 2013
Messages
509
Reaction score
52
I'm trying to add one of these rating scripts to a blogger blog of mine, but I want the rating system to appear either on top of the content in a post or at a certain point within the content of a post. By default it appears below the end of the content in a blogger post, which is ok, but I want to be able to do the other 2 options also. Can anyone help me with how I need to change the code to be able to do this ?

http://rating-widget.com/?s=blogger


<div class="rw-js-container"> <script type="text/javascript"> var _rws = _rws || []; _rws.push({ uid: "426365F2E3F3D134AF1B7A69C5E341F7", huid: "127693", options: { "size": "large", "style": "oxygen" }, source: "Blogger" }); if (typeof(RW) == "undefined"){ (function(){ var rw = document.createElement("script"), d = new Date(), ck = "Y" + d.getFullYear() + "M" + d.getMonth() + "D" + d.getDate(); rw.type = "text/javascript"; rw.async = true; rw.src = "http://js.rating-widget.com/blogger.js?ck=" + ck; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(rw, s); })(); } </script></div>
 
Last edited:
If I remember correctly you need to wrap that code in html code with your desired alignment.

Then paste it in the modify post template box.

When I done it with adsense I wanted it top right of post with text wrap and that was how I done it.
 
Sorry I don't quite understand how to do this. What would I have to enter in to make the script appear at the top of a post content instead of the bottom?
 
if you want it in the middle of the post then you will have to create a article then write nothing in it. save it as a draft. then edit it and just write out the content as normal. then go into the html way of writing the article. then just paste it in.

thats how i get javascript into posts. although i normally put it at the top of the content not in the middle but still should work.

you will have to put it in a frame though to put it in the content. otherwise it wont work at all. <iframe></iframe> put the first tag here at the start of the code and the latter at the end of the code for your widget.

sorry i cant remember how to get it to appear at top of the post and at the end of the post. i have done it for social media buttons but just cant find the code.

if you have problems getting this widget in the post just let me know
 
Code:
 [COLOR=#333333][B]<b:if cond='data:blog.pageType == "item"'>  [/B][/COLOR]<div style="float:right;">
PASTE SCRIPT HERE </div> </b:if>

Try that. In the edit html page.
Find data: post.body
You might have to play about with the exact placement
I would experiment until you get the look your after
 
Last edited:
<code><b:if cond='data:blog.pageType == "item"'>
<div style="float:right;">
PASTE SCRIPT HERE </div> </b:if></code>

Try that. In the edit html page.
Find data: post.body
You might have to play about with the exact placement
I would experiment until you get the look your after

thanks for the help, but which of that code do I use and where do I put it? In datapost.body?
 
The code I put up is the wrapper that places your box where you want it

Where I wrote paste script here, delete that and paste in your script so that it's in the middle of the wrapper script that I posted.

Open blogger webmaster panel, goto design, click edit html,

You then need to scan through the html until you find data: post.body. and paste the whole lot, my modified wrapper with your script in it. Onto the template where I said.
Save and the view blog

If it's where you want it then jobs a good UN.

If not, play about until you get it right
 
Ok I have a new question now, by default this rating system code adds the rating to every post you make. Is there a way to exclude the rating from being added to a certain post?
 
Yes but you would have to If Else Elsif the code which is a wee bit more time consuming
 
Back
Top