TOP RSS Feed

If you have a suggestion for the forum, post your idea here with an appropriate poll and a fair time limit: the majority wins.

RSS or ARSSE?

Poll ended at Wed Apr 16, 2008 11:25 am

I use RSS feeds a lot and would benefit from a TOP one
5
24%
I don't use RSS feeds but might do if we had a TOP one
6
29%
I use RSS feeds but wouldn't use a TOP one
7
33%
I don't use RSS feeds and I'm not interested in starting now
2
10%
zomgrsswtflolzrickastley
1
5%
 
Total votes: 21

Joe
Posts: 5098
Joined: Sun Mar 18, 2007 5:40 pm

TOP RSS Feed

Postby Joe » Wed Apr 02, 2008 11:25 am

I don't know if it's possible, but can you add an RSS feed to a phpbb3 forum?

I'd find it useful for keeping track of new posts without actually having to visit the forum and spunk a couple of minutes browsing for stuff.

I'm just getting into Flock at the moment and love the way I have information converging from social bookmarks, media portals and newsfeeds all in a bunch of handy sidebars that don't interrupt my browsing or work going on in the main window. I just thought it would be great to have forum updates there as well.

So, if it's possible, do we think it'd be a nice addition for those of us who might use it?

Dan
Posts: 4105
Joined: Sun Mar 18, 2007 11:00 pm

Re: TOP RSS Feed

Postby Dan » Wed Apr 02, 2008 11:52 am

I use the odd RSS feed, but probably wouldn't use on on here. I can look into adding one though, if the poll comes out in that direction.

User avatar
nomis
Site Admin
Posts: 1412
Joined: Sun Mar 18, 2007 4:50 pm
Tag: Hasn't realised that there are custom ranks yet
Contact:

Re: TOP RSS Feed

Postby nomis » Wed Apr 02, 2008 12:23 pm

Isn't a poll a little redundant for this?
I mean on the basis that it's something that would be invisible to people that don't use it - so the number of people who vote to say they wouldn't use it doesn't mean they mind the functionality being there.

If you see what I mean.

Joe
Posts: 5098
Joined: Sun Mar 18, 2007 5:40 pm

Re: TOP RSS Feed

Postby Joe » Wed Apr 02, 2008 12:28 pm

True, I was just conforming to the forum guidelines by adding a poll.

The question is more for Dan, as he's the one who'll have to add it and I'm sure he'll want to see if it's worth the effort.



On a related note, free buttsex if you add RSS Dan.

wub x

User avatar
Blak
Tech Moderator
Posts: 1759
Joined: Mon Mar 19, 2007 12:07 pm
Tag: Hasn't realised that there are custom ranks yet
Contact:

Re: TOP RSS Feed

Postby Blak » Wed Apr 02, 2008 12:38 pm

Voted "I use RSS feeds but wouldn't use a TOP one" but I'd be interested to see one implmented as they're not exactly invasive :P

An rss feed for what anyway?
- all forums
- a single section of forums (The Other Place / Government)
- a single forum
- a single thread
Are all valid possibilities.

User avatar
Chuck Steak
Posts: 5317
Joined: Mon Mar 19, 2007 11:06 am
Tag: poo

Re: TOP RSS Feed

Postby Chuck Steak » Wed Apr 02, 2008 12:39 pm

I don't use RSS, but I really should.

Sounds like a good idea.
It might look like I'm doing nothing, but at the cellular level I'm really quite busy.

User avatar
Tinlad
Tech Moderator
Posts: 3345
Joined: Sun Mar 18, 2007 4:54 pm
Tag: Dog food scientist.
Location: Leeds
Contact:

Re: TOP RSS Feed

Postby Tinlad » Wed Apr 02, 2008 12:53 pm

Blak wrote:Voted "I use RSS feeds but wouldn't use a TOP one" but I'd be interested to see one implmented as they're not exactly invasive :P

+1

I use RSS a lot but I probably wouldn't use a TOP one. It would depend on how it were implemented.
Image

Mr.Clark
Posts: 4435
Joined: Mon Mar 19, 2007 8:57 am

Re: TOP RSS Feed

Postby Mr.Clark » Wed Apr 02, 2008 12:55 pm

I'd never use it. The way PHPBB3 handles unread stuff is good enough for me.

I only have 3 RSS feeds anyway (+ torrent one)

User avatar
DCUK7
Posts: 1402
Joined: Mon Mar 19, 2007 8:59 pm

Re: TOP RSS Feed

Postby DCUK7 » Wed Apr 02, 2008 1:05 pm

Well, it was really easy to add RSS capability to phpBB2 forums, just by using one simple rss.php file:

Code: Select all

<?php
/***************************************************************************
 *                                rss.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2005 by Lucas van Dijk
 *   email                : lucas@aoe3capitol.nl
 *
 *   $Id: rss.php,v 1.00 2004/07/11 16:46:15 mrlucky Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', 1);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path.'includes/functions_post.php');
include($phpbb_root_path.'includes/bbcode.php');

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

// -------
// Begin Page specific functions
//
function make_xml_compatible($text, $bbcode_uid = '', $use_bbcode = 0)
{
        global $board_config, $base_url;

        if($use_bbcode)
        {
                if($bbcode_uid != '')
                {
                        $text = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($text, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $text);
                }
                else
                {
                        $text = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $text);
                }
                $text = make_clickable($text);
                if($board_config['allow_smilies'])
                {
                        $text = smilies_pass($text);
                        $text = str_replace("./".$board_config['smilies_path'], $base_url.$board_config['smilies_path'], $text);
                }
        }
        $text = nl2br($text);

        $text = str_replace('&pound', '&amp;#163;', $text);
        $text = str_replace('&copy;', '(c)', $text);

        $text = htmlspecialchars($text);

        return $text;
}
//
// End page specific functions
// ------

//
// If running with PHP3
//
if(!is_array($_SERVER))
{
        $_SERVER = $HTTP_SERVER_VARS;
        $_GET = $HTTP_GET_VARS;
}

//
// Get Various vars
//
$forum = isset($_GET[POST_FORUM_URL]) && ctype_digit($_GET[POST_FORUM_URL]) ? $_GET[POST_FORUM_URL] : false;
$topic = isset($_GET[POST_TOPIC_URL]) && ctype_digit($_GET[POST_TOPIC_URL]) ? $_GET[POST_TOPIC_URL] : false;
$post = isset($_GET[POST_POST_URL]) && ctype_digit($_GET[POST_POST_URL]) ? $_GET[POST_POST_URL] : false;

$base_url = ($board_config['cookie_secure'] ? "https://" : "http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);

if(substr($base_url, -1) != "/")
{
        $base_url .= "/";
}

//
// Get topic ID by post id
//
if($post)
{
        $sql = "SELECT topic_id
                FROM ".POSTS_TABLE."
                WHERE post_id = ".$post;
        if(!$result = $db->sql_query($sql))
        {
                message_die(GENERAL_ERROR, "Could not get topic id by post id", '', __LINE__, __FILE__, $sql);
        }

        $row = $db->sql_fetchrow($result);

        $topic = $row['topic_id'];
}

//
// Start RSS output
//
$rss_result = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
<rss version=\"2.0\">
<channel>
  <title>".make_xml_compatible($board_config['sitename'])."</title>
  <link>".$base_url."index.php</link>
  <description>".make_xml_compatible($board_config['site_desc'])."</description>
  <language>".$board_config['default_lang']."</language>
  <copyright>(c) Copyright 2005 by ".make_xml_compatible($board_config['sitename'])."</copyright>
  <managingEditor>".$board_config['board_email']."</managingEditor>
  <webMaster>".$board_config['board_email']."</webMaster>
  <pubDate>".create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])."</pubDate>
  <lastBuildDate>".create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])."</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>".make_xml_compatible($board_config['sitename'])."</title>
    <url>".$board_config['rss_image']."</url>
    <link>".$base_url."</link>
    <description>".make_xml_compatible($board_config['site_desc'])."</description>
  </image>
";

//
// Get latest topics
//
if(!$topic && !$forum)
{
        //
        // This SQL Code selects the latest topics on he forum
        //
        $sql = "SELECT t.topic_title, t.topic_last_post_id, t.forum_id, p.post_time, pt.post_text, pt.bbcode_uid, u.username, u.user_id
                FROM ".TOPICS_TABLE." t, ".POSTS_TABLE." p, ".POSTS_TEXT_TABLE." pt, ".USERS_TABLE." u
                WHERE t.topic_status != 1
                AND p.post_id = t.topic_last_post_id
                AND pt.post_id = p.post_id
                AND u.user_id = p.poster_id
                ORDER BY t.topic_last_post_id DESC
                LIMIT 0, ".intval($board_config['max_rss_topics']);
        if(!$result = $db->sql_query($sql))
        {
                message_die(GENERAL_ERROR, "Could not get Latest topics", '', __LINE__, __FILE__, $sql);
        }

        while($row = $db->sql_fetchrow($result))
        {
                $is_auth = array();
                $is_auth = auth(AUTH_ALL, $row['forum_id'], $userdata);
                if($is_auth['auth_view'] && $is_auth['auth_read'])
                {
                        $description = "
                                      <b>".$lang['Author'].":</b> <a href='".$base_url."profile.php?mode=viewprofile&amp;".POST_USERS_URL."=".$row['user_id']."'>".$row['username']."</a><br />
                                      <b>".$lang['Posted'].":</b> ".create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone'])."<br />
                                      <br />
                                      ".$row['post_text'];

                        $rss_result .= "
                                      <item>
                                        <title>".make_xml_compatible(strip_tags($row['topic_title']))."</title>
                                        <link>".$base_url."viewtopic.php?".POST_POST_URL."=".$row['topic_last_post_id']."#".$row['topic_last_post_id']."</link>
                                        <description>".make_xml_compatible($description, $row['bbcode_uid'], true)."</description>
                                        <comments>".$base_url."viewtopic.php?".POST_POST_URL."=".$row['topic_last_post_id']."#".$row['topic_last_post_id']."</comments>
                                        <author>".make_xml_compatible($row['username'])."</author>
                                        <pubDate>".create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone'])."</pubDate>
                                        <guid isPermaLink=\"true\">".$base_url."viewtopic.php?".POST_POST_URL."=".$row['topic_last_post_id']."#".$row['topic_last_post_id']."</guid>
                                      </item>";
                }
        }
}

if($topic && !$forum)
{
        //
        // This SQL query selects the latest posts of a topic
        //
        $sql = "SELECT p.post_id, p.post_time, pt.post_text, pt.bbcode_uid, pt.post_subject, t.topic_title, t.forum_id, u.username, u.user_id
                FROM ".POSTS_TABLE." p, ".POSTS_TEXT_TABLE." pt, ".TOPICS_TABLE." t, ".USERS_TABLE." u
                WHERE p.topic_id = ".$topic."
                AND pt.post_id = p.post_id
                AND t.topic_id = p.topic_id
                AND u.user_id = p.poster_id
                ORDER BY p.post_time DESC
                LIMIT 0, ".intval($board_config['max_rss_topics']);
        if(!$result = $db->sql_query($sql))
        {
                message_die(GENERAL_ERROR, "Could not get Latest posts", '', __LINE__, __FILE__, $sql);
        }

        $auth_loaded = false;

        while($row = $db->sql_fetchrow($result))
        {
                if(!$auth_loaded)
                {
                        $is_auth = array();
                        $is_auth = auth(AUTH_ALL, $row['forum_id'], $userdata);
                        $auth_loaded = true;
                }
                if($is_auth['auth_view'] && $is_auth['auth_read'])
                {
                        $description = "
                                      ".$lang['Author'].": <a href='".$base_url."profile.php?mode=viewprofile&amp;".POST_USERS_URL."=".$row['user_id']."'>".$row['username']."</a><br />
                                      ".$lang['Posted'].": ".create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone'])."<br />
                                      <br />
                                      ".$row['post_text'];

                        $rss_result .= "
                                      <item>
                                        <title>".make_xml_compatible(strip_tags(($row['post_subject'] != '' ? $row['post_subject'] : "Re: ".$row['topic_title'])))."</title>
                                        <link>".$base_url."viewtopic.php?".POST_POST_URL."=".$row['post_id']."#".$row['post_id']."</link>
                                        <description>".make_xml_compatible($description, $row['bbcode_uid'], true)."</description>
                                        <comments>".$base_url."viewtopic.php?".POST_POST_URL."=".$row['post_id']."#".$row['post_id']."</comments>
                                        <author>".make_xml_compatible($row['username'])."</author>
                                        <pubDate>".create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone'])."</pubDate>
                                        <guid isPermaLink=\"true\">".$base_url."viewtopic.php?".POST_POST_URL."=".$row['post_id']."#".$row['post_id']."</guid>
                                      </item>";
                }
        }
}

if($forum && !$topic)
{
        //
        // This SQL query selects the latest topics of a specific forum
        //
        $sql = "SELECT t.topic_title, t.topic_last_post_id, p.post_time, pt.post_text, pt.bbcode_uid, u.username, u.user_id
                FROM ".TOPICS_TABLE." t, ".POSTS_TABLE." p, ".POSTS_TEXT_TABLE." pt, ".USERS_TABLE." u
                WHERE t.forum_id = ".$forum."
                AND t.topic_status != 1
                AND p.post_id = t.topic_last_post_id
                AND pt.post_id = p.post_id
                AND u.user_id = p.poster_id
                ORDER BY t.topic_last_post_id DESC
                LIMIT 0, ".intval($board_config['max_rss_topics']);
        if(!$result = $db->sql_query($sql))
        {
                message_die(GENERAL_ERROR, "Could not get Latest topics", '', __LINE__, __FILE__, $sql);
        }

        $is_auth = array();
        $is_auth = auth(AUTH_ALL, $forum, $userdata);

        while($row = $db->sql_fetchrow($result))
        {
                if($is_auth['auth_view'] && $is_auth['auth_read'])
                {
                        $description = "
                                      ".$lang['Author'].": <a href='".$base_url."profile.php?mode=viewprofile&amp;".POST_USERS_URL."=".$row['user_id']."'>".$row['username']."</a><br />
                                      ".$lang['Posted'].": ".create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone'])."<br />
                                      <br />
                                      ".$row['post_text'];

                        $rss_result .= "
                                      <item>
                                        <title>".make_xml_compatible(strip_tags($row['topic_title']))."</title>
                                        <link>".$base_url."viewtopic.php?".POST_POST_URL."=".$row['topic_last_post_id']."#".$row['topic_last_post_id']."</link>
                                        <description>".make_xml_compatible($description, $row['bbcode_uid'], true)."</description>
                                        <comments>".$base_url."viewtopic.php?".POST_POST_URL."=".$row['topic_last_post_id']."#".$row['topic_last_post_id']."</comments>
                                        <author>".make_xml_compatible($row['username'])."</author>
                                        <pubDate>".create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone'])."</pubDate>
                                        <guid isPermaLink=\"true\">".$base_url."viewtopic.php?".POST_POST_URL."=".$row['topic_last_post_id']."#".$row['topic_last_post_id']."</guid>
                                      </item>";
                }
        }
}

$rss_result .= "</channel></rss>";

header("Content-type: text/xml", true);
echo $rss_result;

?>


Should be something similar for phpBB3 no?

User avatar
Steve
Posts: 5392
Joined: Sun Mar 18, 2007 5:49 pm
Tag: SSSSSSSSssssssssss
Contact:

Re: TOP RSS Feed

Postby Steve » Wed Apr 02, 2008 1:31 pm

Mr.Clark wrote:I'd never use it. The way PHPBB3 handles unread stuff is good enough for me.

+1

User avatar
gamerfreak
Posts: 6441
Joined: Tue Oct 30, 2007 1:13 am
Tag: Spotted Dick = yummy!
Location: In yer bum'ole
Contact:

Re: TOP RSS Feed

Postby gamerfreak » Wed Apr 02, 2008 2:04 pm

I think it would be really handy. As Joe said, it'd be easier than checking View New Posts or View Your Posts every 5 minutes or so.

Teamxbox.com use one but I don't really post in the forum all that often. I'll give it a go though to see if I really would use a forum's RSS.
Birdshit

User avatar
gamerfreak
Posts: 6441
Joined: Tue Oct 30, 2007 1:13 am
Tag: Spotted Dick = yummy!
Location: In yer bum'ole
Contact:

Re: TOP RSS Feed

Postby gamerfreak » Wed Apr 02, 2008 2:16 pm

Hmm... It's alright. The page source of the RSS has a link to this site.
Birdshit

Dan
Posts: 4105
Joined: Sun Mar 18, 2007 11:00 pm

Re: TOP RSS Feed

Postby Dan » Wed Apr 02, 2008 2:43 pm

I've found a mod to allow doing this - I haven't looked at it in huge detail yet as I'm attempting to unravel some of the worst Java I've ever seen in my life (written by a lecturer :roll:) - but I think it will do the job.

Joe
Posts: 5098
Joined: Sun Mar 18, 2007 5:40 pm

Re: TOP RSS Feed

Postby Joe » Wed Apr 02, 2008 2:48 pm

Brilliant! It'd be ace to see how well it works, as long as you have some time to install it.

User avatar
gamerfreak
Posts: 6441
Joined: Tue Oct 30, 2007 1:13 am
Tag: Spotted Dick = yummy!
Location: In yer bum'ole
Contact:

Re: TOP RSS Feed

Postby gamerfreak » Wed Apr 02, 2008 2:54 pm

If it works here, I might just use it on my forum. Is it definatly compatible with PHPBB3? I can't seem to find any mention, but I'm looking through the posts in reverse order.
Birdshit


Return to “Referendums”

Who is online

Users browsing this forum: No registered users and 1 guest

cron