Support » Plugin: WP-PostRatings » Here's code for a small SEO fixup

  • wiseowl9000



    Fantastic plugin! However googlebot picks up items like /rating_over. in the javascript as real URLs and fills up my webmaster tools with page not found errors.

    To fix this could you put this update into wp-postratings.php ?
    Change on line 146:
    $postratings_javascript .= 'var ratings_'.$i.'_mouseover_image=new Image();ratings_'.$i.'_mouseover_image.src=ratingsL10n.plugin_url+unescape("%2fimages%2f")+ratingsL10n.image+unescape("%2frating_'.$i.'_over.")+ratingsL10n.image_ext;';

    and change on line 149 of wp-postratings.php:
    $postratings_javascript = 'var ratings_mouseover_image=new Image();ratings_mouseover_image.src=ratingsL10n.plugin_url+unescape("%2fimages%2f")+ratingsL10n.image+unescape("%2frating_over.")+ratingsL10n.image_ext;';

    To recap I’ve rawurlencoded the items that look like paths then run those strings through unescape on the client side and this fixes the issue.

    I’d be really grateful if you could incorporate this change into your next update.



  • The topic ‘Here's code for a small SEO fixup’ is closed to new replies.