Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

RSS Feed of HOT questions

+3 votes
8,344 views
asked Jun 15, 2011 in Q2A Core by anonymous
i want rss of hot questuins, is that maybe possible  ? hopefuly not too difficult?

2 Answers

0 votes
answered Jun 15, 2011 by Aslan
edited Jun 16, 2011 by Aslan

Go to qa-feed.php

And try changing

        case 'unanswered':
            qa_feed_load_ifcategory('main/unanswered_qs_title', 'main/unanswered_qs_in_x',
                qa_db_unanswered_qs_selectspec(null, 0, null, false, $full, $count)
            );
            break;

 

to:

        case 'unanswered':
            qa_feed_load_ifcategory('main/hot_qs_title', 'main/hot_qs_in_x',
                qa_db_hot_qs_selectspec(null, 0, null, false, $full, $count)
            );
            break;

Now go to Admin panel on your website, and then to RSS and click on "Feed for recent unanswered questions" and see for yourself if the link that is provided, works for hot questions...

commented Jun 16, 2011 by Aslan
Forget it, that didn't work...
0 votes
answered Jun 16, 2011 by gidgreen

You can hack it together by making the following changes to qa-feed.php:

1. Change this in the first big switch {...}:

case 'unanswered':

... to ...

case 'unanswered': case 'hot':

2. Add this in the second big switch {...}:

case 'hot':
  qa_feed_load_ifcategory('main/hot_qs_title', 'main/hot_qs_title',
    qa_db_qs_selectspec(null, 'hotness', 0, null, null, false, $full, $count)
  );
  break;

3. Finally, change:

if ($feedtype!='search')

... to ...

if ( ($feedtype!='search') && ($feedtype!='hot') )

So long as you've enabled the RSS feed for answered questions, this means you can get a feed for hot questions by substituting hot.rss at the end of the feed URL. It won't show up as a link on the 'hot' page though.

commented Jun 27, 2011 by WhyCheese
Thanks it works. Will you implement this feature in next Q2A realease ?
commented Jun 28, 2011 by gidgreen
Yes, I'll aim to roll this into 1.4.1.
...