[MODDB] simple syndication

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
Locked
User avatar
PCGUY112887
Registered User
Posts: 502
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Re: [BETA] simple syndication

Post by PCGUY112887 »

Jeffro2pt0 wrote:Disregard all of my posts. I have spent $85.00 today on something that shouldn't be mentioned here :o
Someone bought a half? :D
RdJ1
Registered User
Posts: 119
Joined: Thu Oct 25, 2007 8:18 am
Location: The Netherlands

Re: [BETA] simple syndication

Post by RdJ1 »

I have a problem with bbcodes and smilies.
When I use bbcodes like code or quote, I only get:
feed wrote:Quote:
.....
It's the same when I use code.
When I use bbcodes like youtube and embed (both added by myself), I get nothing.

When I add smilies, the feed gets a error!
Jeffro2pt0
Registered User
Posts: 11
Joined: Sat Nov 03, 2007 7:58 am
Contact:

Re: [BETA] simple syndication

Post by Jeffro2pt0 »

PCGUY112887 wrote:Someone bought a half? :D
More like I bought a years worth :P

By the way, the last time the mod author visited the PHPBB forums was
Last visited: - I think this means they have disappeared.
Please visit my blog about stuff at Jeffro2pt0.com
User avatar
PCGUY112887
Registered User
Posts: 502
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Re: [BETA] simple syndication

Post by PCGUY112887 »

bUmPoRz!?!

So far the only RSS mods I know of are this one and this...

http://www.phpbb.com/community/viewtopi ... 0&t=596879

And their both dead in the water!
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Re: [BETA] simple syndication

Post by saaiberke »

PCGUY112887 wrote:http://www.phpbb.com/community/viewtopi ... 0&t=596879

And their both dead in the water!
You don't know what you are saying man!!! The above mod is in full development, you just have to be patient and don't start bumping topics.

Nic
googleandroid
Registered User
Posts: 40
Joined: Fri Nov 09, 2007 12:24 am

Re: [BETA] simple syndication

Post by googleandroid »

does this work with phpbb3 RC7? And is it going to work with RC8?
moifest
Registered User
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm

Re: [BETA] simple syndication

Post by moifest »

Using the Simple Syndication on my RC8 forum and working fine.
Colin Kaminski
Registered User
Posts: 55
Joined: Wed Jun 09, 2004 4:06 pm
Contact:

Re: [BETA] simple syndication

Post by Colin Kaminski »

I am using it with RC8 and it does the generated link with out the topic regardless if it is the first post or not. I think this is the code that generates the link:

// only topic first post
if ($topics_only == 1)
{
$sql_where = 'AND p.post_id = t.topic_first_post_id';
$sql_from = 'FROM ' . POSTS_TABLE . ' as p, ' . FORUMS_TABLE . ' as f, ' . USERS_TABLE . ' as u, ' . TOPICS_TABLE . ' as t';
}
else
{
$sql_from = 'FROM ' . POSTS_TABLE . ' as p, ' . FORUMS_TABLE . ' as f, ' . USERS_TABLE . ' as u';
}

But I never get the topic part.

Now that we are going gold perhaps more work will be done on this mod.
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [BETA] simple syndication

Post by stokerpiller »

This seems to be working just fine with Gold :D
Exept the atom

Just what I've been looking for.
I am done with phpBB
User avatar
dpaanlka
Registered User
Posts: 286
Joined: Wed May 10, 2006 6:48 pm
Location: Chicago, USA
Contact:

Re: [BETA] simple syndication

Post by dpaanlka »

I'm a little confused about what I'm doing wrong.

I want the feed to just show the topics from all forums. If I go to feed://forums.info-mac.org/syndication.php it doesn't show anything at all.

But if I go to feed://forums.info-mac.org/syndication.php?fid=4,5,6,7,8,9,11,12,13,18,19,20,211,212,214,217,220,221,222 it shows stuff. But that is a really long URL and doesn't have all of my forums anyway. Help!
I am a Chicago trance DJ and in my humble opinion I play the best trance music in Chicago :D
wlx
Registered User
Posts: 7
Joined: Thu May 24, 2007 8:45 am

Re: [BETA] simple syndication

Post by wlx »

stokerpiller wrote:This seems to be working just fine with Gold :D
Exept the atom

Just what I've been looking for.
The atom content exists, but does not displayed in firefox, so maybe template's problem?
REVELAT10N
Registered User
Posts: 45
Joined: Fri Jun 01, 2007 7:53 pm
Contact:

Re: [BETA] simple syndication

Post by REVELAT10N »

Looks like I'm back once again... LOL. Anyhow, this MOD worked well in RC7 and RC8 but once I upgraded to Gold the feed died. Has anyone else experienced this? I noticed that the recent changes from RC8 to Gold had an update to the posting.php file so I am suspecting the problem resides there; although I can not determine what it is. If anyone has any luck, please let me know as I use this mod to kick posts out to a Flash component on my website.

EDIT
OK... I got ahead of myself again. Ever forget to do something and want to slap yourself in the head for it? My problem resulted from updating my template to Gold and not placing the xml files in the template folder. Once I did everything worked fine. Leaving my original post in place in case someone else forgets to do the same. MOD still works on Gold! You can view my site to see how Flash is pulling in the feeds from my forums. Currently pulling in 3 different feeds.
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [BETA] simple syndication

Post by stokerpiller »

REVELAT10N wrote:Looks like I'm back once again... LOL. Anyhow, this MOD worked well in RC7 and RC8 but once I upgraded to Gold the feed died. Has anyone else experienced this? I noticed that the recent changes from RC8 to Gold had an update to the posting.php file so I am suspecting the problem resides there; although I can not determine what it is. If anyone has any luck, please let me know as I use this mod to kick posts out to a Flash component on my website.

EDIT
OK... I got ahead of myself again. Ever forget to do something and want to slap yourself in the head for it? My problem resulted from updating my template to Gold and not placing the xml files in the template folder. Once I did everything worked fine. Leaving my original post in place in case someone else forgets to do the same. MOD still works on Gold! You can view my site to see how Flash is pulling in the feeds from my forums. Currently pulling in 3 different feeds.
I have looked at Your feed.
Why does only headline show sometimes and no text?
Example: LOA Ranked 270 in GH3
I am done with phpBB
REVELAT10N
Registered User
Posts: 45
Joined: Fri Jun 01, 2007 7:53 pm
Contact:

Re: [BETA] simple syndication

Post by REVELAT10N »

I had to make some minor changes to the MOD to perform specific functions for my Flash component to pull the headlines. I am telling my Flash component to pull the headlines and about 200 characters of text to display in the "news" field of the website. A link then directs users to the forums should they choose to read the entire article. I had to play around with the component a bunch to get the desired results. It had to strip links, smilies and any bbc code used. After a little trial and error I got it to work. I understand many people who use or want to use this MOD are not looking for the same results I am but it my personal case this MOD saves me a ton of time. What you are noting may have something to do with the changes I have made to the MOD. Everything displays fine when my component pulls it up in Flash - so I am not sure why the feed does not show the info. I will try to do some digging and figure it out.
ibelphegor
Registered User
Posts: 453
Joined: Wed Oct 24, 2007 8:37 am

Re: [BETA] simple syndication

Post by ibelphegor »

hello, i have the old simple rss and need some help.

1) how can i align to the right?
2) i can see image, it show me link "http://tukinfo.com/images/smilies/53.gif "
3) i change the Maximum chars to "50" and it is not work:
$chars = request_var('chars', 50);
4) link to post not work "http://http//tukinfo.com\/viewtopic.php?f=15&t=1116"

live: http://tukinfo.com/rss.php

my code:

Code: Select all

<?php
/*
*
* @name rss.php
* @package phpBB3
* @version $Id: rss.php,v 1.0 2006/11/27 22:29:16 angelside Exp $
* @copyright (c) Canver Software
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Begin Configuration Section
$CFG['exclude_forums'] = '';
$CFG['max_topics'] = '10';
// End Configuration Section


// If not set, set the output count to max_topics
$count = request_var('count', 0);
$count = ( $count == 0 ) ? $CFG['max_topics'] : $count;

$forumid = request_var('fid', '');

// Zeichen
$chars = request_var('chars', 50);

//if($chars<0 || $chars>500) $chars=500; //Maximum
//$type = request_var('type', 'latest');

// [+] define path
// Create main board url (some code borrowed from functions_post.php)
// We have to generate a full HTTP/1.1 header here since we can't guarantee to have any of the information
$script_name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
if (!$script_name)
{
	$script_name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
}
$script_path = trim(dirname($script_name));
$script_path = preg_replace('#[\\\\/]{2,}#', '/', $script_path);

$server_name = trim($config['server_name']);
$server_protocol = ( $config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $config['server_port'] <> 80 ) ? ':' . trim($config['server_port']) . '' : '';

$url = $server_protocol . $server_name . $server_port;
$url .= ( $script_path != '' ) ? $script_path . '' : '';

$viewtopic = ( $script_path != '' ) ? $script_path . '/viewtopic.' . $phpEx : 'viewtopic.'. $phpEx;
$index = ( $script_path != '' ) ? $script_path . '/index.' . $phpEx : 'index.'. $phpEx;

$index_url = $server_protocol . $server_name . $server_port . $index;
$viewtopic_url = $server_protocol . $server_name . $server_port . $viewtopic;
// [-] define path


//
// Strip all BBCodes and Smileys from the post
//
function strip_post($text, $uid)
{
	$text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", '', $text); // for BBCode
	$text = preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s(.*?) \-\->#', '', $text); // for smileys
	$text = str_replace('&#', '&#', htmlspecialchars($text, ENT_QUOTES)); // html format

	return $text;
}

// Exclude forums
$sql_where = '';
if ($CFG['exclude_forums'])
{
	$exclude_forums = explode(',', $CFG['exclude_forums']);
	foreach ($exclude_forums as $i => $id)
	{
		if ($id > 0)
		{
			$sql_where .= ' AND p.forum_id != ' . trim($id);
		}
	}
}

if ($forumid != '')
{
	$select_forums = explode(',', $forumid);
	$sql_where .= ( sizeof($select_forums)>0 ) ? ' AND f.forum_id IN (' . $forumid . ')' : '';
}

$output = '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . "\n";
$output .= '<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:annotate="http://purl.org/rss/1.0/modules/annotate/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">' . "\n";
$output .= '<channel>' . "\n";
$output .= '<title>' . strip_tags($config['sitename']) . '</title>' . "\n";
$output .= '<link>' . $index_url . '</link>' . "\n";
//$output .= '<copyright>Copyright ? 2007-present, yourdomain.com</copyright>' . "\n";
$output .= '<generator>phpBB3 RSS Builder</generator>' . "\n";
$output .= '<description>' . strip_tags($config['site_desc']) . '</description>' . "\n";
//$output .= '<language>de</language>' . "\n";
/*
$output .= '<image>' . "\n";
$output .= '<title>infoMantis Logo</title>' . "\n";
$output .= '<url>http://www.infomantis.de/download/logo.gif</url>' . "\n";
$output .= '<link>http://www.infomantis.de/</link>' . "\n";
$output .= '<width>200</width>' . "\n";
$output .= '<height>55</height>' . "\n";
$output .= '<description>infoMantis GmbH</description>' . "\n";
$output .= '</image>' . "\n";
*/

// SQL posts table
$sql = 'SELECT p.poster_id, p.post_subject, p.post_text, p.bbcode_uid, p.bbcode_bitfield, p.topic_id, p.forum_id, p.post_time, f.forum_name, u.username
		FROM ' . POSTS_TABLE . ' as p, ' . FORUMS_TABLE . ' as f, ' . USERS_TABLE . ' as u
		WHERE (u.user_id = p.poster_id)
		AND p.post_approved = 1
		AND (f.forum_id = p.forum_id)
		' . $sql_where . '
		ORDER BY post_time DESC';
$result = $db->sql_query_limit($sql, $count);

while( ($row = $db->sql_fetchrow($result)) )
{
	if (!$auth->acl_get('f_list', $row['forum_id']))
	{
		// if the user does not have permissions to list this forum, skip everything until next branch
		continue;
	}

	// [+] user_id to username
	$poster_u = append_sid("$url/memberlist.$phpEx", 'mode=viewprofile&u=' . $row['poster_id']);
	$poster = '<a href='. $poster_u .'>' . $row['username'] . '</a>';
	// [-] user_id to username

	// [+] forum title
	$forum_title_u = append_sid("$url/viewforum.$phpEx", 'f=' . $row['forum_id']);
	$forum_title = '<a href='. $forum_title_u .'>' . $row['forum_name'] . '</a>';
	// [-] forum title

	$topic_id = $row['topic_id'];
	$forum_id = $row['forum_id'];
	$topic_title = $row['post_subject'];
	$post_time = date('Y-m-d', $row['post_time']);
	$viewtopic = append_sid("$url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']);

	$output .= "<item>\n";
	$output .= "\t<title>$topic_title</title>\n";

	$post_text = $row['post_text'];
	$post_text = censor_text($post_text);
	$post_text = str_replace("\n", '<br />', $post_text);
	$post_text = strip_post($post_text, $row['bbcode_uid']);

	$output .= "\t<description>
	Author: " . $poster . "<br />
	Forum: " . $forum_title . " <br />
	Date: " . $post_time . " <br /><br />" . $post_text . "</description>\n";

	$output .= "\t<link>$viewtopic</link>\n";
	$output .= "</item>\n\n";
}
$output .= "</channel>\n</rss>";

header('Content-Type: text/xml; charset=utf-8');
echo $output;

?>
thanks for the help, have a nice day.
Locked

Return to “[3.0.x] MODs in Development”