Forums

[Plugin: GD Star Rating] What are the php codes to insert manually? (14 posts)

  1. migbrasil
    Member
    Posted 11 months ago #

    Hi, is there a way of inserting the stars manually?
    And what are the widget ("Rating", "Blog Rating") php codes so I can insert on my theme too?

    Sorry about my english, im not american.

    Thanks

  2. GDragoN
    Member
    Posted 11 months ago #

    All the things you need are described in the user guide. There are some 10 or more functions that can be used in the theme to render both ratings and widgets.

    User guide is in PDF and can be found on my website on the download page. Check the plugin readme file for direct links.

    Regards,
    Milan

  3. migbrasil
    Member
    Posted 11 months ago #

    Thank you,

    Perfect Plugin

  4. migbrasil
    Member
    Posted 11 months ago #

    Im sorry i read your guide but im still with some trouble...
    I wanted to insert the wp_gdsr_blog_rating into my header so how am i supposed to do? like this?
    <?php wp_gdsr_blog_rating() ?>

    This is what it says, but i cant really understand. :/

    wp_gdsr_blog_rating
    Returns object with average blog rating
    Return average rating, Bayesian mean estimate, votes count and active rating posts.
    Parameters:
    $select: types of articles to use. Allowed values:
    1. postpage: both posts and pages
    2. post: only posts
    3. page: only pages
    $show: use votes from users, visitors or both:
    1. total: all recorded votes
    2. visitors: visitor votes only
    3. users: users votes only

  5. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    $blog_rating = wp_gdsr_blog_rating('post', 'total');

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  6. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    $blog_rating = wp_gdsr_blog_rating('post', 'total');

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  7. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    $blog_rating = wp_gdsr_blog_rating('post', 'total');

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  8. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    $blog_rating = wp_gdsr_blog_rating('post', 'total');

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  9. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    $blog_rating = wp_gdsr_blog_rating('post', 'total');

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  10. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    <?php $blog_rating = wp_gdsr_blog_rating('post', 'total'); ?>

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  11. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data, same data used by the widget:

    $result->voters : total number of votes
    $result->votes : total sum of all votes
    $result->rating : average rating
    $result->bayes_rating : bayesian rating
    $result->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  12. GDragoN
    Member
    Posted 11 months ago #

    Well, for this widget I haven't still created full rendering function, this function will return an object with data. If you make a call:

    $blog_rating = wp_gdsr_blog_rating('post', 'total');

    function will return summary data for the blog, same data used by the widget:

    $blog_rating->voters : total number of votes
    $blog_rating->votes : total sum of all votes
    $blog_rating->rating : average rating
    $blog_rating->bayes_rating : bayesian rating
    $blog_rating->percentage : rating in percents

    You can use it to do whatever you need. Next version of plugin will have actual rendering call used for the Blog Rating Widget.

    As for the other widget (GD Star Rating Widget) there is a function wp_gdsr_render_widget() that renders exactly that widget. Parameters are in the array form, and in user guide there is a list of parameters.

    Milan

  13. GDragoN
    Member
    Posted 11 months ago #

    This function will not render widget, but return an object with data used by the widget. Full rendering function for this widget will be available with next release.

    Milan

  14. altrd
    Member
    Posted 9 months ago #

    Hi,

    How do I implement this to my theme manually? What is the PHP code to insert? I want the ratings to appear in a certain place within the loop other than the default position which is after the post.

    Sorry I'm not good at PHP. I just want the easy answer. Thanks :)

  15. 14words
    Member
    Posted 9 months ago #

    Same, I would like to know what the embed code is for the GD Star Rating widget. I looked at the manual and i'm clueless.

  16. GDragoN
    Member
    Posted 9 months ago #

    There is a function to call, and this function has basically the same set of parameters as the widget.

    But, you can expect soon, most likely next week, tutorials at official plugin website with detailed explanation of manual integration.

  17. Saurus
    Member
    Posted 9 months ago #

    Do you also have a widget to control duplicate posts?

  18. GDragoN
    Member
    Posted 9 months ago #

    There is a problem with large number of categories and some posts are displayed more than once, I will try to solve that soon.

  19. jonnyh431
    Member
    Posted 2 weeks ago #

    Have there been any advancements regarding this, I would find it extremely helpful.

  20. GDragoN
    Member
    Posted 2 weeks ago #

    All (and there are many now) functions are documented in the info files included with plugin.

  21. jonnyh431
    Member
    Posted 2 weeks ago #

    Thanks for the reply,

    Which function will get me a 10 star rating for the page it is featured on?

  22. GDragoN
    Member
    Posted 2 weeks ago #

    As I said, all functions are documented. Check the info files included with plugin.

Reply

You must log in to post.

About this Topic