[2.0.6] RSS Content Syndicator

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
119
64%
Very Good
41
22%
Good
13
7%
Fair
5
3%
Poor
7
4%
 
Total votes: 185

n00bf0rce
Registered User
Posts: 9
Joined: Tue May 24, 2005 2:51 am

Post by n00bf0rce »

Quimbly wrote:
i would advice you to have a look at the rss 2.0 specifications, i also have rss 2.0 template that i submitted with a new version of this mod, but it still needs to be validated by the mod-team. you could always have a look at this feed if you would be curious
http://www.jocdirksen.be/rss.php


Any ideas on how I could hack the .php code to include the forum name in the feed title?

it shouldn't be that hard, i'll let you know when i have it

User avatar
Minoesj
Registered User
Posts: 158
Joined: Thu Feb 13, 2003 2:39 pm
Location: Belgium
Contact:

Post by Minoesj »

Does nobody have an idea how to make it work with the Categories Hierarchy (sub-forums) mod ( http://www.phpbb.com/phpBB/viewtopic.php?t=265040 )

Please Help !!!!

I really loved this mod and would like to use it again.
Animal Rights Concerns offering Animal Rights and Vegan Resources.
Go Vegan and start a more compassionate lifestyle today!

tomythius
Registered User
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK
Contact:

My mods

Post by tomythius »

Great mod, 5/5.
I have some additions I'd like to share.
To allow people to see hits on the feed as distinct from hits on the forum index I changed:

Code: Select all

$userdata = session_pagestart($user_ip, PAGE_INDEX);
to

Code: Select all

 $userdata = session_pagestart($user_ip, PAGE_RSS);
And then made the relevant entries into lang_main.php and the various pages that display whos online (admin/index.php and viewonline.php spring to mind).
My first mod (not yet released) kinda does the opposite to this one. It includes the first article of any RSS feed into a post. To stop the two being called recursively I inserted the following into 'rss.php' after the session management:

Code: Select all

// Check not being called recursively in forum
global $HTTP_SERVER_VARS;
if ((strpos($HTTP_SERVER_VARS['HTTP_REFERER'], 'itde.vccs.edu') != 0)) return  'null';
//
What do you think?
Tom says so, QED.

User avatar
Quimbly
Registered User
Posts: 123
Joined: Tue May 17, 2005 5:56 pm

Post by Quimbly »

I've been modifying the rss_body.tpl file a little.

In the <channel> item, I swapped:

Code: Select all

<title>{BOARD_TITLE}</title>
...for...

Code: Select all

<title>{BOARD_TITLE} :: {post_item.FORUM_NAME}</title>
But {post_item.FORUM_NAME} is returning nothing here, even though the post variables (include FORUM_NAME) are working fine later on in the xml file, in the item xml item:

e.g.

Code: Select all

<!-- BEGIN post_item -->
<item>
	<title>{post_item.FORUM_NAME} :: {post_item.TOPIC_TITLE}</title>
Bwaaah?! Anyone have any idea why?! I can't figure it out...

tomythius
Registered User
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK
Contact:

Post by tomythius »

Quimbly wrote: I've been modifying the rss_body.tpl file a little.

In the <channel> item, I swapped:

Code: Select all

<title>{BOARD_TITLE}</title>
...for...

Code: Select all

<title>{BOARD_TITLE} :: {post_item.FORUM_NAME}</title>

In the channel section FORUM_NAME is undefined because the channel refers to your whole phpBB feed, including many forums, all with different names.
This is a guess, I've not checked it out myself, but this is what I would expect.
Tom says so, QED.

cuzui
Registered User
Posts: 7
Joined: Thu Jun 02, 2005 3:56 pm

Post by cuzui »

Hi everyone

I want to display the news on my web page from this http://www.businessweek.com, but I can't make it. I follow the instruction and I got this codes, http://chungminh.com/forums/rss.php I don't see any link and feature from the businessweek. Do I miss any step?
What should I do next after I got this page http://chungminh.com/forums/rss.php ? Do I have to do anything else in order to make my web page display the news from the businessweek or any news web site?


Thanks in advance

Saoshyant
Registered User
Posts: 77
Joined: Thu Feb 03, 2005 3:35 pm
Location: Portugal

Post by Saoshyant »

cuzui wrote: Hi everyone

I want to display the news on my web page from this http://www.businessweek.com, but I can't make it. I follow the instruction and I got this codes, http://chungminh.com/forums/rss.php I don't see any link and feature from the businessweek. Do I miss any step?
What should I do next after I got this page http://chungminh.com/forums/rss.php ? Do I have to do anything else in order to make my web page display the news from the businessweek or any news web site?


Thanks in advance


You have to provide a link to the RSS Feed, either a standard <a href=""> (with a notice it is for news readers) or using the <link rel="alternate" type="application/rss+xml" charset="utf-8" title="RSS" href="./rss.php" /> tag in <head>. Both options need a edit on overall_header.tpl file. This mod is to be used for your users to see the new posts on the forum in a faster way, not to do anything automatically. However, since this is RSS you can do a lot more things with it if you have the how-to.

tomythius
Registered User
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK
Contact:

Wrong mod?

Post by tomythius »

cuzui wrote: I want to display the news on my web page from this http://www.businessweek.com, but I can't make it.


So you want to display an external RSS feed on your board? Or you want to display your RSS feed on their site?
If it's the first (which is what it sounds like to me) then this is the wrong mod.
Tom says so, QED.

User avatar
Quimbly
Registered User
Posts: 123
Joined: Tue May 17, 2005 5:56 pm

Post by Quimbly »

Ok, I've figured it out:

The mod below will include the forum title along with the site name in the feed title. This is very useful if you have users that are subscribing to more than one feed from your site, but not the feed for the entire board. The current mode has the site name as the feed title in each case.

#-----[ OPEN ]------------------------------------------
#
rss_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<title>{BOARD_TITLE}</title>

#
#-----[ REPLACE WITH ]------------------------------------------
#
<title>{BOARD_TITLE} :: {PERSISTANT_FORUM_NAME}</title>

#
#-----[ OPEN ]------------------------------------------
#
rss.php

#
#-----[ FIND ]------------------------------------------
#
'L_POST' => $lang['Post'])

#
#-----[ REPLACE WITH ]------------------------------------------
#
'L_POST' => $lang['Post'],
'PERSISTANT_FORUM_NAME' => $forum_name)

#
#-----[ FIND ]------------------------------------------
#
$author = make_clickable($author);

#
#-----[ AFTER, ADD ]------------------------------------------
#
$forum_name = htmlspecialchars($post['forum_name']);

#
#-----[ FIND ]------------------------------------------
#
$template->assign_vars(array(
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'BOARD_URL' => $index_url,
'BOARD_TITLE' => $site_name,
'BOARD_DESCRIPTION' => $site_description,
'BOARD_MANAGING_EDITOR' => $board_config['board_email'],
'BOARD_WEBMASTER' => $board_config['board_email'],
'BUILD_DATE' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
'L_AUTHOR' => $lang['Author'],
'L_POSTED' => $lang['Posted'],
'L_TOPIC_REPLIES' => $l_topic_replies,
'L_POST' => $lang['Post'],
'PERSISTANT_FORUM_NAME' => $forum_name)
);

#
#-----[ CUT ]------------------------------------------ (paste in next step)
#
$template->assign_vars(array(
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'BOARD_URL' => $index_url,
'BOARD_TITLE' => $site_name,
'BOARD_DESCRIPTION' => $site_description,
'BOARD_MANAGING_EDITOR' => $board_config['board_email'],
'BOARD_WEBMASTER' => $board_config['board_email'],
'BUILD_DATE' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
'L_AUTHOR' => $lang['Author'],
'L_POSTED' => $lang['Posted'],
'L_TOPIC_REPLIES' => $l_topic_replies,
'L_POST' => $lang['Post'],
'PERSISTANT_FORUM_NAME' => $forum_name)
);

#
#-----[ FIND ]------------------------------------------
#
//
// END "item" loop
//

#
#-----[ AFTER, PASTE ]------------------------------------------
#
$template->assign_vars(array(
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'BOARD_URL' => $index_url,
'BOARD_TITLE' => $site_name,
'BOARD_DESCRIPTION' => $site_description,
'BOARD_MANAGING_EDITOR' => $board_config['board_email'],
'BOARD_WEBMASTER' => $board_config['board_email'],
'BUILD_DATE' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
'L_AUTHOR' => $lang['Author'],
'L_POSTED' => $lang['Posted'],
'L_TOPIC_REPLIES' => $l_topic_replies,
'L_POST' => $lang['Post'],
'PERSISTANT_FORUM_NAME' => $forum_name)
);


That's it!

It doesn't seem to break anything, and it does the job I wanted. If anyone else has a better solution, please let me know.

Cheers,

User avatar
Quimbly
Registered User
Posts: 123
Joined: Tue May 17, 2005 5:56 pm

Post by Quimbly »

Oops. Double-posted because my ISP was bugging out. Moderator please delete this message.

earlster
Registered User
Posts: 6
Joined: Wed May 11, 2005 8:51 pm
Contact:

Post by earlster »

Quimby,

nice, you got it done before me. However there is one little thing about your solution. If you don't specify a forum_id, but just call rss.php it will set the <TITLE> tag in the xml to myboard.com::NAME_OF_FORUM with the name of the forum that is the last post in the rss/xml stream.

I slightly modified it and am now checking if forum_id is empty, in which case I use the original BOARD_TITLE.

User avatar
Quimbly
Registered User
Posts: 123
Joined: Tue May 17, 2005 5:56 pm

Post by Quimbly »

earlster wrote: Quimby,

nice, you got it done before me. However there is one little thing about your solution. If you don't specify a forum_id, but just call rss.php it will set the <TITLE> tag in the xml to myboard.com::NAME_OF_FORUM with the name of the forum that is the last post in the rss/xml stream.

I slightly modified it and am now checking if forum_id is empty, in which case I use the original BOARD_TITLE.


Ah, yes. Good plan.

Can you show me the code for this modification?

konqi
Registered User
Posts: 4
Joined: Fri Jun 10, 2005 9:23 pm
Contact:

Re: HTTP Authentication

Post by konqi »

4VAlien wrote: The following code snippet is useful for HTTP authentication to see what topics a user can fetch (useful if you have a non public section). I don't intend to continue working on it but perhaps other people can properly fit this into the module.

NOTE: the function bad() should be your error function for bad login and i added sql_escape_string myself as well (is the equivalent php function).


based upon these lines, I've made a Patch for authentication.

http://download.konqi.net/phpBB2/rss_auth.patch

note:
- the bad() function is just changed to a die().
- RSS-Syndication without username/password is no longer possible!
guest/guest is what you should use now!
- the possibility using f=1,2,3 is also included!
- the maximum count is now 100, not 50

PLEASE BE SURE NOT USING THIS OVER A NON SECURE CHANNEL CAUSE YOUR PASSWORD MAY BE SNIFFED!!

Have Fun and thx to 4VAlien for these lines ;)

MfG
marcel

ncy111
Registered User
Posts: 1
Joined: Tue Jun 14, 2005 12:39 am

Post by ncy111 »

great mod!

Strangelove
Registered User
Posts: 41
Joined: Tue Mar 22, 2005 4:30 am
Contact:

Post by Strangelove »

Is there any way to have the RSS feed only display the title of the thread on the output?

I am trying to syndicate my forums RSS on my front page in a phpmodule.

THe problem is that it shows up:

U.G.HQ

* Tempus's Corner :: A64 Memory Overclocking Worklog
* General Hardware :: Apple Gives in to the Dark Side, goes Intel
* Clickable Links :: ATI finally gets a good mobility video chip
* Tempus's Corner :: Making an LCD projector

AND I want it to show up like this:


* A64 Memory Overclocking Worklog
* Apple Gives in to the Dark Side, goes Intel
* ATI finally gets a good mobility video chip
* Making an LCD projector


Any help would be mich appreciated...

Post Reply

Return to “[2.0.x] MOD Database Cleanup”