WordPress.org

Forums

[Plugin: GD Star Rating] Rating in RSS (16 posts)

  1. dlawton
    Member
    Posted 5 years ago #

    Hey GDragoN,
    Plugin is amazing, working great, thanks a lot. I'm looking for a way to add it to the RSS feed, because feed readers are not seeing or rating any posts. Haven't been able to find a way to do this, is there anyway possible that you might know of?

    Thanks a lot,
    Dave

  2. dlawton
    Member
    Posted 5 years ago #

    Oh, I'm using Feedburner also

  3. dlawton
    Member
    Posted 5 years ago #

    I guess a question for anyone is:
    Is there a way to add php to a feed? I found a good plugin called RSS supplement that allows you to add html or text to a feed, but php is not supported yet.

    cheers

  4. Milan Petrovic
    Member
    Posted 5 years ago #

    And it never will be. PHP is a server side language, and RSS is intented to be a static and simple content delivered to a user.

  5. dlawton
    Member
    Posted 5 years ago #

    figured that might be the case :( although it would be cool if i could just embed the current rating info (like 9/10 - 5 votes so far) even if it's not dynamic and the reader can't vote

    anyway, thanks for the info

  6. Milan Petrovic
    Member
    Posted 5 years ago #

    Well, you can embed current post rating in RSS feed. Even with stars image. Check Integration tab on plugins Settings panel to enable it. Subscribe to feed from plugins official website to see how it looks like.

  7. dlawton
    Member
    Posted 5 years ago #

    oh great, didn't see that previously will check it out!

    thanks

  8. krunk
    Member
    Posted 5 years ago #

    Awesome plugin! Just found it today and have been customizing it.

    I'm going to piggy back on this thread since it's highly related. I've enabled RSS integration and noticed it only inserts the rating into the excerpt/summary of the RSS feed and not the content area.

    I was wondering if there's a way to enable so it also includes it in the content area since if people are viewing the full post via RSS feed, they wouldn't see the vote.

    Thanks!

  9. Milan Petrovic
    Member
    Posted 5 years ago #

    The plugin uses both content and excerpt filters for RSS. If you don't see rating with the content, than the problem is with the WP functions that prepare data for RSS.

  10. krunk
    Member
    Posted 5 years ago #

    Is there any way I can debug this or provide further info?

    My rss feed is located:
    http://www.hd-trailers.net/blog/feed/

    I don't think WordPress templates could affect the RSS feed generation and I haven't modified any of the default WordPress code that would affect excerpt/content filters.

  11. Milan Petrovic
    Member
    Posted 5 years ago #

    I tried to see what is going on, but definitely problem is in WP. Filter for content is executed by the WP method, and that again content is modified. I will try to see if there is another way to do this.

  12. krunk
    Member
    Posted 5 years ago #

    Thanks. If I figure a workaround, I'll let you know too. :)

  13. krunk
    Member
    Posted 5 years ago #

    Found the issue.

    In gd-star-rating.php, I needed to add this line:

    if ($this->o["integrate_rss_powered"] == 1 || $this->o["rss_active"] == 1) {
    add_filter('the_excerpt_rss', array(&$this, 'rss_filter'));
    add_filter('the_content_rss', array(&$this, 'rss_filter'));
    add_filter('the_content', array(&$this, 'rss_filter'));
    }

  14. krunk
    Member
    Posted 5 years ago #

    Had to make one more change:

    function rss_filter($content) {
    if( is_feed() )
    {
    if ($this->o["rss_active"] == 1) $content.= "
    ".$this->render_article_rss();
    if ($this->o["integrate_rss_powered"] == 1) $content.= "
    ".$this->powered_by();
    $content .= "
    ";
    }
    return $content;
    }

    Without that condition check, the rss_filter would also be applied to the single blog posts, which made it display 2 ratings.

  15. krunk
    Member
    Posted 5 years ago #

    I was curious if you plan on fixing this. I've been modifying the code manually for the past few updates.

  16. Milan Petrovic
    Member
    Posted 5 years ago #

    This will be added in next version.

Topic Closed

This topic has been closed to new replies.

About this Topic