WordPress.org

Ready to get started?Download WordPress

Forums

Simple Theme integration for GD Star Rating (13 posts)

  1. polle001
    Member
    Posted 4 years ago #

    Hi, I just install GD Star Rating and it has like 2000 options.

    I just want thumbs up and down for each post and I want to add the code just for that into my theme.

    I know there is documentation for the 500 functions, but thats the problem, I am not a programmer that can catch all the things to combine 100 functions.

    I just want the default thumbs up and down with the text it comes "Rating: 0 (from 0 votes)" which also I want to translte...

    Can someone please tell me whats the code I need to put in my theme ?

    Because the auto add, puts the thumbs in the incorrect place for me.

    <?php wp_gdsr_rating_article ($post_id=0) ?> this does not work.

    Thanks

  2. polle001
    Member
    Posted 4 years ago #

    Ok, this seems to work... not completely.

    <? wp_gdsr_render_article_thumbs ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true); ?>

    I get the thumbs where I want, but when voting, the never endin circle stays there, but the vote is efective.

    How can I fix so the vote comes up completely when the action happens ?

    How can I translate or select language for "Rating: 0 (from 0 votes)" ?

    Thanks.

  3. Milan Petrovic
    Member
    Posted 4 years ago #

    Read the FAQ on official website, most of the problems are described there. Also, in case something like that happens in 100% problem is with some other plugin or JavaScript that's causing trouble. For that you need to use Firebug or something like that to find out what it is.

  4. polle001
    Member
    Posted 4 years ago #

    Hi GDragoN, can you please help in where I can choose the language ? I cant find it in the docs, neither in the plugin settings...

    It displays translated in the admin, but in my theme its in english.

    Is there a choose language option ? where ? because I dont see it in any place.

    I know that as a programmer its easy just to catch the problem and solve it, but can you at least give a clue of why the loading image after voting stays in a loop ?

    Thanks.

  5. polle001
    Member
    Posted 4 years ago #

    Ok, I see that the plugin is looking for
    http://domain.com/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/gd-star-rating/js/i18n-17/jquery-ui-datepicker-es_ES.js?ver=1.8.5

    So it will never load. Maybe thats the loading forever problem.

    Where can I fix or edit, so it looks in the correct place.

    And which one should be ?
    http://domain.com/wp-content/plugins/gd-star-rating/js/i18n-17/jquery-ui-datepicker-es_ES.js?ver=1.8.5
    or
    /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/gd-star-rating/js/i18n-17/jquery-ui-datepicker-es_ES.js?ver=1.8.5

    Thanks.

  6. Milan Petrovic
    Member
    Posted 4 years ago #

    Translations are only for backend. Front end rendering is controlled by templates. There are tutorials on official website on that subject.

  7. polle001
    Member
    Posted 4 years ago #

    Thanks GDragoN, I'll try to find them, a link to them would be useful, so other users with the same problem that see this, have a reference for the same.

    Also, as I said in my last message, I see that the plugin is looking for
    http://domain.com/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/gd-star-rating/js/i18n-17/jquery-ui-datepicker-es_ES.js?ver=1.8.5

    So it will never load. Maybe thats the loading forever problem.

    Where can I fix or edit, so it looks in the correct place.

    Thanks.

  8. Milan Petrovic
    Member
    Posted 4 years ago #

    Again, this is used only for backend of wordpress, and it doesn't affect front end. Anyway, I found the problem and will be fixed in next version. To fix it now, find in code/class.php file line 713 that looks like this:

    wp_enqueue_script('gdsr-jquery-datepicker-translation', $jsUrl, array("gdsr-jquery-datepicker"), $this->o["version"], true);

    and replace it with:

    $jsUrl = $this->plugin_url.'js/i18n'.($this->wp_version < 28 ? '' : '-17').'/jquery-ui-datepicker-'.$this->l.'.js';
    wp_enqueue_script('gdsr-jquery-datepicker-translation', $jsUrl, array("gdsr-jquery-datepicker"), $this->o["version"], true);

    Milan

  9. polle001
    Member
    Posted 4 years ago #

    Hi GDragoN, that correct it from looking into the wrong place.

    Everything its working now except the loading forever image after voting.

    I vote and it stars loading, but the image of loading instead of the thumb up stays there forever, if I refresh the vote was casted and I cant vote again, so its kind of working, but how can I fix the loading forever image, so it shows the vote was casted correctly ?

    Thanks.

  10. Milan Petrovic
    Member
    Posted 4 years ago #

    I am 99% sure that the problem you are having has nothing to do with GD Star Rating. Some other plugin or theme is causing problem with brocken JS code.

  11. polle001
    Member
    Posted 4 years ago #

    Hi GDragoN.

    The problem came up again with the new version and now its looking for:

    http://domain.com/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/gd-star-rating/js/i18n-17/jquery-ui-datepicker-es_ES.js?ver=1.8.6

    The same as before just with 1.8.6 version.

    To fix it, its the same as you mentioned above ?

    Thanks.

  12. Milan Petrovic
    Member
    Posted 4 years ago #

    I will check again what can be the problem. New version should be out in the next 2-3 days.

  13. talgalili
    Member
    Posted 4 years ago #

    Thanks polle001,
    Your code helped me.

    Tal

Topic Closed

This topic has been closed to new replies.

About this Topic