[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!
Suggested Hosts
covex
Registered User
Posts: 21
Joined: Fri May 04, 2007 7:12 am

Re: [BETA] simple syndication

Post by covex »

OK, the problem with the guid and link I also found and fixed myself, but does anybody know how to fix this <br /> problem? It seems this script is incorrectly parsing the post and feed has s syntax problems then.. this leads to that some feedreaders display incomplete posts.
covex
Registered User
Posts: 21
Joined: Fri May 04, 2007 7:12 am

Re: [BETA] simple syndication

Post by covex »

Here is (hopefully) how to fix the problem with <br /> etc.
It seems the problem is in function rss_prepare_message(&$message) in its regexp, but it is not. When this regexp parses the $message it does not contain the <br /> tags yet as those (and also other) are added in function parse_message, which is called AFTER rss_prepare_message. My fix is now remove

Code: Select all

($type != 'atom') ? rss_prepare_message($row['post_text']) : '';
from the main and
modify function parse_message

Code: Select all

function parse_message($row, $bbcode_options, $bbcode_uid, $bbcode_bitfield)
{                                                                                                    
        global $board_url;
        $row = html_entity_decode(generate_text_for_display($row, $bbcode_uid, $bbcode_bitfield, $bbcode_options));                                                                                                                  
        ($type != 'atom') ? rss_prepare_message($row) : '';
        // smilies contain relative URL, we need it to be absolute
        return str_replace('<img src="./', '<img src="' . $board_url . '/', $row);
}
to do this rss_prepare_message.
wouterv
Registered User
Posts: 265
Joined: Wed Jan 02, 2008 10:22 am
Location: The Netherlands
Name: Wouter

Re: [BETA] simple syndication - template

Post by wouterv »

I use the default Prosilver template, with some slight changes.
I know how to refresh the template to activate the header and footer changes I made.
With "simple syndication" came two templates (syndication_rss2.xml and syndication_atom.xml).
The board works as expected with these stored templates.
Now I liked to make a little change in these syndication templates: how do I refresh the board to reflect changes to these syndication templates?
If I download a modified syndication template, refresh does not result in an updated template, if I remove them and initiate a template refresh, the board generates an error about the missing files.
In other words, these syndication templates seems to be not fully integrated in the phpbb template mechanism.

I want to modify the syndication templates, to include a stylesheet reference...the reason to add a stylesheet is to try to be able to view the feed contents with IE6.
Maybe that is worth another question ;-) Why does IE6 not open the syndication.php? It does not even show the code (as usual with Webfeeds).
daemoncel
Registered User
Posts: 6
Joined: Mon Dec 12, 2005 4:49 pm

Re: [BETA] simple syndication

Post by daemoncel »

The change quoted below doesn't work for me either, I've played around with changing other areas to see if i can get the rss to go to most recent post with no success.

I have my syndication.php set to

Code: Select all

// only topic first post
if ($topics_only == 1) 
And still get the error quoted at the bottom of this post.
Tom Keels wrote:I finally got this to work the way I wanted in phpBB3 Gold. This is similar to how another PHPBB2 rss mod I had before. Here is the way it worked and how I liked it.

Showed the last 30 active Topics - Title Only
Link in the reader takes you to the last post in the topic, not the first post as is in this mod.

Here's what needs changing:

Find

Code: Select all

$sql = 'SELECT p.poster_id, p.post_subject,
Find Inline

Code: Select all

p.poster_id
Before Add

Code: Select all

t.topic_last_post_id, p.post_id,

Find

Code: Select all

		'LINK'			=> append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
		'IDENTIFIER'	=> append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),

Replace with

Code: Select all

      		'LINK'         => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']. '&p=' . $row['post_id'] .'#p' . $row['topic_last_post_id']),
      		'IDENTIFIER'   => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']. '&p=' . $row['post_id'] .'#p' . $row['topic_last_post_id']),

This may not be the way you want it to work, but it works for me and it's how I like it.

Enjoy!
This is the error i recieve:
General Error
SQL ERROR [ mysqli ]

Unknown column 't.topic_last_post_id' in 'field list' [1054]

SQL

SELECT t.topic_last_post_id, p.post_id, 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, f.forum_desc_options, u.username FROM phpbb3_posts as p, phpbb3_forums as f, phpbb3_users as u WHERE (u.user_id = p.poster_id) AND p.post_approved = 1 AND (f.forum_id = p.forum_id) ORDER BY post_time DESC LIMIT 30

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/db/mysqli.php
LINE: 185
CALL: dbal_mysqli->sql_query()

FILE: includes/db/dbal.php
LINE: 157
CALL: dbal_mysqli->_sql_query_limit()

FILE: syndication2.php
LINE: 134
CALL: dbal->sql_query_limit()
Tom Keels
Registered User
Posts: 30
Joined: Wed Jun 05, 2002 2:29 pm

Re: [BETA] simple syndication

Post by Tom Keels »

Does $topics_only actually equal 1? If not, there is your problem.
daemoncel
Registered User
Posts: 6
Joined: Mon Dec 12, 2005 4:49 pm

Re: [BETA] simple syndication

Post by daemoncel »

yes it does.
Tom Keels
Registered User
Posts: 30
Joined: Wed Jun 05, 2002 2:29 pm

Re: [BETA] simple syndication

Post by Tom Keels »

Code: Select all

Unknown column 't.topic_last_post_id' in 'field list' [1054]

SQL

SELECT t.topic_last_post_id, p.post_id, 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, f.forum_desc_options, u.username FROM phpbb3_posts as p, phpbb3_forums as f, phpbb3_users as u WHERE (u.user_id = p.poster_id) AND p.post_approved = 1 AND (f.forum_id = p.forum_id) ORDER BY post_time DESC LIMIT 30
The SQL statement shown above DOES NOT contain the topics table in the from statement. Add it to the query and you are straight.
User avatar
ipollesion
Registered User
Posts: 140
Joined: Thu Nov 08, 2007 1:54 am

Re: [BETA] simple syndication

Post by ipollesion »

is there anyway to just show the posts title with it linking to the post like it normally does.. but without the content.. just the titles? Thank you.
User avatar
ipollesion
Registered User
Posts: 140
Joined: Thu Nov 08, 2007 1:54 am

Re: [BETA] simple syndication

Post by ipollesion »

nevermind i got it... just go to syndication and find 'TEXT' and // before it. ;)
stokerpiller
Registered User
Posts: 1934
Joined: Wed Feb 28, 2007 8:06 pm

Re: [BETA] simple syndication

Post by stokerpiller »

angelside wrote:MOD Title: simple syndication
MOD Description: phpBB 3.0 rss/atom content syndicator
MOD Version: 1.1.1b

MOD Download: http://downloads.sourceforge.net/canver ... .1b.tar.gz

Demo Board: http://www.phpbbturkiye.net/syndication.php?fid=20&t=1


changelog from 1.0.0b
* fix minor error
* add new parameter for show topic only first post


Updated on: 2007-06-20 - Version 1.1.1b
Lets hear from You Angelside.
I can see You have several working Feeds on Your Froum 8-)
I am done with phpBB
User avatar
Lim-Dul
Registered User
Posts: 18
Joined: Tue Jan 01, 2008 6:53 pm
Location: Europe->Germany->Frankfurt

Re: [BETA] simple syndication

Post by Lim-Dul »

I have the script (with all the patches) up and running on the forum I'm managing and it works just fine.

http://www.gry-planszowe.pl/forum/rss.php

HOWEVER I have a question:

Could someone who, unlike me, knows PHP and MySQL well tell me how to automatically enclose quotes with <blockquote> tags? They're hard to read now and I imagine that it wouldn't be too hard since they always begin with <div class="quotetitle"> for the title and <div class="quotecontent"> for the message... Would it be possible to make them appear even better than by using blockquotes? I don't really know much about RSS syndication either. ;-)
Well, as long as there are <blockquotes> I'll be happy, VERY happy and the person to implement them will have my eternal gratitude. :-D
War does not determine who is right - only who is left. - Bertrand Russell
User avatar
lukak
Registered User
Posts: 47
Joined: Mon Jun 04, 2007 3:12 pm
Location: Piran, Slovenia

Re: [BETA] simple syndication

Post by lukak »

works for me perfectly :D
Image
chandlerou
Registered User
Posts: 233
Joined: Thu May 24, 2007 3:32 am

Re: [BETA] simple syndication

Post by chandlerou »

@Lim-Dul: Can you please upload your files for download? or PM them to me?
We are looking for talented stylers to join our team! PM Me for Details!
Current Project: Aphotic Umbra: Age of Conan
jimwillsher
Registered User
Posts: 51
Joined: Thu Mar 18, 2004 9:54 am

Re: [BETA] simple syndication

Post by jimwillsher »

Yes, it would be great to get a copy of your script please?



Jim
User avatar
Lim-Dul
Registered User
Posts: 18
Joined: Tue Jan 01, 2008 6:53 pm
Location: Europe->Germany->Frankfurt

Re: [BETA] simple syndication

Post by Lim-Dul »

It's not my script. ;-)

It's the exact same script posted in this topic but in a version that is apparently working... I only patched it up as described by Tom Keels, covex et alii.

http://www.codclan.org/junk/simple_synd ... _1.1.1b.7z

I'm still waiting for some more experienced PHP coder to change the quote behaviour...
War does not determine who is right - only who is left. - Bertrand Russell

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