Support » Plugin: kk Star Ratings » [Plugin: kk Star Ratings] Adding Microdata information

  • Resolved mishta


    I am trying to integrate into the code Microdata information.
    To do so I altered the original code of kk-star-ratings/kk-ratings.php by adding some info.

    public function markup($id=false)
    			$markup = '<div itemscope itemtype="" class="kk-ratings open">
    						  <div class="stars-turned-on"> </div>
    						  <div class="hover-panel">
    							  <a href="javascript:void();" rel="star-1"></a>
    							  <a href="javascript:void();" rel="star-2"></a>
    							  <a href="javascript:void();" rel="star-3"></a>
    							  <a href="javascript:void();" rel="star-4"></a>
    							  <a href="javascript:void();" rel="star-5"></a>
    						  <div itemprop="rating" itemscope itemtype="" class="casting-desc">'.$this->options['init_msg'].'</div>
    						  <div class="casting-thanks">Thanks!</div>
    						  <div class="casting-error">AAn error occurred!</div>
    			$markup .= $this->options['clear']? '<br clear="both" />' : '';
    			return $markup;

    The resulted code in html page is:

    <div itemscope="" itemtype="" class="kk-ratings" style="float: left; opacity: 1; ">
    						  <div class="stars-turned-on stars-turned-strict" style="display: block; width: 100%; "> </div>
    						  <div class="hover-panel">
    							  <a href="javascript:void();" rel="star-1" style="display: block; " class=""></a>
    							  <a href="javascript:void();" rel="star-2" style="display: block; " class=""></a>
    							  <a href="javascript:void();" rel="star-3" style="display: block; " class=""></a>
    							  <a href="javascript:void();" rel="star-4" style="display: block; " class=""></a>
    							  <a href="javascript:void();" rel="star-5" class="" style="display: block; "></a>
    						  <div itemprop="rating" itemscope="" itemtype="" class="casting-desc" style="display: block; ">5/5 from 1 votes</div>
    						  <div class="casting-thanks" style="display: none; ">Thanks!</div>
    						  <div class="casting-error">An error occurred!</div>

    I need to add the rating markings. I do not know how to do that…
    I am sure this will lead to a new version of the plugin ….
    The code:
    <div itemprop="rating" itemscope="" itemtype="" class="casting-desc" style="display: block; ">5/5 from 1 votes</div>

    needs to be changed to …

    <div itemprop="rating" itemscope="" itemtype="" class="casting-desc" style="display: block; "><span itemprop="average">5</span>/<span itemprop="best">5</span> from <span itemprop="votes">1</span> votes</div>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kamal Khan


    For your custom description (meta info) you can use jquery to handle this.

    I don’t think this will be an appropriate option to have this in a new version.

    I do not know if you are aware of the tendencies, but if take a look at Google Webmaster Tools you will see that Google have a testing tool for testing this: Rich Snippets Testing Tool.
    This means that Google encourages the use of this and I can reassure you that microdata is really working.
    All that I wrote above makes me believe that THIS HAS TO BE IN THE NEW VERSION!

    I completely agree! Please put this in the new version, for GD Star Ratings already has this feature and it definitely helps drive traffic to your site from Google searches.

    GD Star Ratings is way too complicated though and doesn’t work as well as your plugin does. If you were able to add this feature in a new version, yours would be the best option out there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: kk Star Ratings] Adding Microdata information’ is closed to new replies.