Site Author : Topic: How to add star rating Widget  (Read 2136 times)
March 03, 2010, 07:00:13 AM
Just popping in
User No : 28556
Posts: 19
  • WWW
  • Email
Email
Hi Guys,

I want to add a rating widget under and each and every post. But unfortunately when i use free widgets from outbrain website, they ad avertisement popups on my blog and when i use free widget code that is

<script type='text/javascript'>
aR_BgColor="";aR_FgColor="";aR_url=location.href;
aR_title=document.title;aR_StarType ='0';
document.write('<div id="aR_star_info" style="height:60px;"></div>');
document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"></scr'+'ipt>');
</script>

When i copy paste this code to my post section It only add widget to my one post and thats it.....Please tell me how can i give 5 to 9 stars rating widget under each and every post without widget owner advertisement. Also i want widget to share my Facebook group and twitter to my blog

http://www.theprettygeeks.blogspot.com
Logged

March 03, 2010, 07:50:54 PM
Registered Users
Just can't stay away
*
User No : 24019
Posts: 376
  • WWW
Login to your blogger. Go to layout section. Click on "edit HTML". Check "expand widgets templates". Search this code "<p><data:post.body/></p>". Make a new line after the code. Paste your script. Save changes and done.
Logged

Learn the most recent and up-to-date casino news! http://cn-casinonews.blogspot.com
March 04, 2010, 11:52:02 PM
Just popping in
User No : 28556
Posts: 19
  • WWW
  • Email
Email
Thanks for the reply but i am not getting appropriate result that is when i copy paste the code

    <div class='post-header-line-1'/>

    <div class='post-body entry-content'>
      <data:post.body/>

<script type='text/javascript'>
aR_BgColor="";aR_FgColor="";aR_url=location.href;
aR_title=document.title;aR_StarType ='0';
document.write('<div id="aR_star_info" style="height:60px;"></div>');
document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"></scr'+'ipt>');
</script>


      <div style='clear: both;'/> <!-- clear for photos floats -->
    </div>
 
    <b:if cond='data:post.hasJumpLink'>
      <div class='jump-link'>
        <a expr:href='data:post.url + &quot;#more&quot;'><data:post.jumpText/></a> 
      </div>
    </b:if>


I get an error

We were unable to save your template
Please correct the error below, and submit your template again.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Element type "scr" must be followed by either attribute specifications, ">" or "/>".


Also there is one other code that i took from http://www.addrating.com/blogs/

      <data:post.body/>
<script type='text/javascript'>
aR_BgColor="";
aR_FgColor="";
aR_url="<DATA:POST.URL>";
aR_title="<DATA:POST.TITLE>";
aR_StarType ='5';
document.write('<div id="aR_star_info" style="height:60px;"></div>');
document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"></scr'+'ipt>');
</script>
 

      <div style='clear: both;'/> <!-- clear for photos floats -->
    </div>
 
Again i get the same error
Please correct the error below, and submit your template again.  Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: Element type "scr" must be followed by either attribute specifications, ">" or "/>".   

Tell me what to do?
« Last Edit: March 04, 2010, 11:55:11 PM by babyblogger » Logged

March 10, 2010, 11:48:55 PM
Registered Users
Just can't stay away
*
User No : 24019
Posts: 376
  • WWW
Try this instead.. It works fine.. Made some corrections in the code that triggers the error.. (usually caused by '/' which is a line termination for blogger.. like, instead of <script=""></script>, blogger reads <script="" />)

<script type='text/javascript'>
aR_BgColor=&quot;&quot;;
aR_FgColor=&quot;&quot;;
aR_url=&quot;<DATA:POST.URL/>&quot;;
aR_title=&quot;<DATA:POST.TITLE/>&quot;;
aR_StarType =&#39;5&#39;;
document.write(&#39;<div id='aR_star_info' style='height:60px;'/>&#39;);
document.write(&#39;<script src='http://addratings.com/aR_BootStrap.js' type='text/JavaScript'/>&#39;);
</script>

Logged

Learn the most recent and up-to-date casino news! http://cn-casinonews.blogspot.com
March 11, 2010, 02:41:22 AM
Just popping in
User No : 28556
Posts: 19
  • WWW
  • Email
Email
Thanks a Lot Regmac for the reply But unfortunately its not working on my side... :(

Fortunately i came accross one more code trick on some blog for adding star rating and this trick is  working fine... :D

Let me Share so that others can get benefit from it

1. Go to draft.blogger.com
2. Click on Layout
3. Check "Show Star Ratings (*****)"
4.Then Click Edit Html and find

<b:include name='nextprev'/>

5. Then Copy Paste this code just below this line

<b:if cond='data:top.showStars'>
<script src='http://www.google.com/jsapi' type='text/javascript'/>
<script type='text/javascript'>
google.load(&quot;annotations&quot;, &quot;1&quot;);
function initialize() {
google.annotations.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>

P.S: If want to see how it looks then Please Visit

http://theprettygeeks.blogspot.com


ThAnks
Logged

March 26, 2010, 04:42:45 AM
New Here
User No : 30298
Posts: 4
Nice to see your post, find it worth reading and pretty much informative.I an grateful to you for the publishing of such a helpful stuff on star rating widget.
Logged

<a href="http://www.cheapwebhostingseller.com/"><b> Cheap Web Hosting</b></a>
March 26, 2010, 03:47:36 PM
Just popping in
User No : 30304
Posts: 14
  • WWW
thanks for your information
Logged

Earn Money Online | Lubang Bisnis
March 27, 2010, 12:48:07 AM
Just popping in
User No : 30059
Posts: 6
  • WWW
i never used star widget before. Thanks for this thread that give me idea
Logged

No commercial links,please.
March 28, 2010, 12:06:45 AM
Quite a regular
User No : 30311
Posts: 97
  • WWW
thanks for sharing the information
Logged