[ABD] RSS Feed 2.2.4

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

[ABD] RSS Feed 2.2.4

Postby chyduskam » Sun Jan 09, 2005 8:17 pm

Code: Select all

##############################################################
## MOD Title: RSS Feed
## MOD Author: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A
## MOD Description: Post-centric forum syndication using RSS
## MOD Version: 2.2.4
##
## Installation Level: Easy
## Installation Time: 2 Minute
## Files To Edit: n/a
## Included Files: rss.php,rss_config.php, rss_functions.php, rss.xsl,
##               rss_body.tpl, atom_body.tpl
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Mod Features:
## Support HTTP headers: If-Modified-Since and If-None-Match,
## gzip compression,WWW-Authenticate for private forums,
## RSS 2.0 and Atom 0.3 formats,
## Last Visit MOD and Who Viewed topic Mod
## Special thanks to Xpert for his help while developing this mod.
##
## For URL's the following arguments may be optionally passed (as applicable):
##
## f=x - forum id. Use data only from this forum to output RSS.
## t=1 - only new topics (first messages in topic). Default - 0.
## c=x - feed items count. If omitted, the value of DEFAULT_ITEMS constant (defined in mod's code) will be used. Admin can limit the maximal possible value of x by setting MAX_ITEMS constant at the beginning of mod's code.
## topic=x - view topic 'x' only
## nolimit - turn off "If-Modified-Since" record limit (by default)
## styled - use XSLT style for RSS feed
## atom - generate atom 0.3 feed instead of rss 2.0
## login - turn WWW-Authenticate on. May not work on some hosts.
## uid=x - set user id for WWW-Authenticate. Use it instead of "login" for Opera or Mozilla for cyrillic nicknames. You could than use any text for login but correct password in dialog box.
## Examples of Usage and Syntax:
## rss.php
## Last 25 or less messages from public forums
## rss.php?login&atom
## Last 25 records from allowed forums in Atom 0.3 format
## rss.php?login&f=1&c=10
## Last 10 records from private forum number 1
##
## Fine tuning
##
## You will be able to configure this MOD by setting some constants at rss_config.php.
##
## If you use MOD Last visit [2.0.10/EM] http://mods.db9.dk/
## change define('LV_MOD_INSTALLED',false); to define('LV_MOD_INSTALLED',true);
##
## To reduce server's payload on huge and large forums this mod uses only records from last 2 week by default.
## (see MAX_WEEKS_AGO constant comments in mod's code)
##
## On some Apache servers PHP is running as CGI, meaning that Apache variables
## $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] are empty,
## and the credentials are not transmitted to the script.
##
## In this case you can try to modify the .htaccess file and add following text:
##
## <IfModule mod_rewrite.c>
##   RewriteEngine on
##    RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
## </IfModule>
##
## This directive states, if mod_rewrite is available, that credentials get from
## the HTTP header Authorization are put into the $_SERVER['REMOTE_USER'] variable.
##
## More info @ http://naklon.info/rss/about.htm
##############################################################
## MOD History:
##
##   2005-11-23 - Version 2.2.4
##   Changed files: rss_functions.php
##   - update to phpBB 2.0.18 code
##   - clear temporary rss session after exit
##   - add мemory usage value to page stats
##   2005-04-16 - Version 2.2.3
##   Changed files: rss.php, rss_functions.php
##   - update to phpBB 2.0.14 code
##   - add new key 'topic'
##   2005-03-25 - Version 2.2.2
##   Changed files: rss.php, rss_config.php
##   - minor fix, cosmetic only
##   2005-03-10 - Version 2.2.1
##   Changed files: rss.php,rss_functions.php, rss.xsl
##   - formating post data in RSS using user preference
##   - phpBB languages auto detect and set in RSS
##   - some fix in code 
##   2005-03-04 - Version 2.2.0
##    Changed files: rss.php, rss.xsl
##    New files: rss_config.php, rss_functions.php
##   - Split code in 3 files for future Add-On
##   - Add Page Generation time MOD by Smartor support
##   - WWW-Authorization now is work then PHP is installed as CGI
##   - Fix HTTP headers "304 OK" then PHP is installed as CGI
##   - English and Russian languages support in XSLT transformation
##   2005-02-04 - Version 2.1.4
##     Changed files: rss.php, rss.xsl, rss_body.tpl
##    - Fix compatibility with PHP 3.0
##     - Include new key 'styled'
##     - Fix problem with non-ascii chars in message
##     - Optimise some SQL
##     - Allow/disallow login using cookie (Allow by default)
##     - Admin can disallow any forum for syndication
##   2005-01-15 - Version 2.1.3
##       - Fix compatibility with PHP 4.0-4.3 by exclude using html_entity_decode function in MOD
##   2005-01-14 - Version 2.1.2
##       - Fix bug with non well-formed XML then use '&' char in title
##     - Fix bug with f- key for Admin
##     - Fix bug in RSS Autodiscovery Add-On
##   2005-01-12 - Version 2.1.0
##       - Some fix
##     - Allow cache
##   2005-01-09 - Version 2.0.1
##       - Add time limit for RSS posts
##   2005-01-08 - Version 2.0.0
##    - All code is rewrited and speed up in 2 or more times
##    - Support users ban list
##       - some bugs fixed.
##   2004-12-19 - Version 1.1.0
##      - Support for Last Visit Mod and Who viewed a topic Mod
##        Support Auth from Opera and Mozilla with Russian nicknames. Use uid=number
##     in command string nor login ant type any english login
##   2004-11-05 - Version 1.0.5
##      - gzip now use settings from phpBB, some minor fix
##   2004-11-03 - Version 1.0.4
##      - some minore changes in feeds and programs.
##   2004-10-26 - Version 1.0.3
##      - add atom 0.3 support. Use rss.php?atom to get atom feed
##   2004-10-24 - Version 1.0.2
##      - initial release of this modified iteration of the "RSS Content Syndicator" MOD
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ COPY ]------------------------------------------
#
copy rss.php to rss.php
copy includes/rss_config.php to includes/rss_config.php
copy includes/rss_functions.php to includes/rss_functions.php
copy templates/rss.xsl to templates/rss.xsl
copy templates/subSilver/rss_body.tpl to templates/subSilver/rss_body.tpl
copy templates/subSilver/atom_body.tpl to templates/subSilver/atom_body.tpl
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


Download(ver 2.2.4): http://naklon.info/talk/download.php?id=2
Russian support: http://www.phpbbguru.net/community/viewtopic.php?t=1292
More info about program (Russian/English): http://naklon.info/rss/about.htm
Last edited by MHobbit on Sat Feb 23, 2008 7:49 pm, edited 15 times in total.
Reason: Updated topic prefix to [ABD].

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Postby beggers » Mon Jan 10, 2005 9:19 am

Is there any way to select multiple forums, such as 1, 3 and 5?

Bryan

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Mon Jan 10, 2005 3:54 pm

For the present moment is probably reception all accessible forums in one feed or reception of news by forums, as described above. It is connected to convenience of use of the basic RSS-Agregators, such as Abilon, Newz Crawler and so on.

You can be able to create 3 news channels in RSS-agregator in one group:
...../rss.php?f=1
...../rss.php?f=3
...../rss.php?f=5
in your case.
IMHO selected multiple forums like:...../rss.php?f=1,2,5 is not need in real use

User avatar
rhs98
Registered User
Posts: 78
Joined: Thu Jan 29, 2004 7:00 pm
Location: UK

Postby rhs98 » Mon Jan 10, 2005 4:13 pm

Check out this for efficent rss feeds - each forum is listed.

http://www.phpbb.com/phpBB/viewtopic.php?t=254829



Soon each category and more will be "grouped".


:wink:


(When I say efficent - the database is not used except when a post is updated, inserted, deleted or settings changed - its just a static file ;) )

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Mon Jan 10, 2005 5:25 pm

rhs98,
I see your MOD.
1) Your feeds isn't valid and, IMHO, will be not work on some hosts.

2) I use RSS autodiscowery too in my forum,but noor 1 - at 3 ways.
Like you, OPML and feed protocol. :) Now I test add-on and, if it will be released on phpbbguru.net, I place it in this mod.

3) Your MOD dosn't support private forums and have strange description in RSS.
(number of replies but nor real message)

User avatar
rhs98
Registered User
Posts: 78
Joined: Thu Jan 29, 2004 7:00 pm
Location: UK

Postby rhs98 » Mon Jan 10, 2005 6:09 pm

chyduskam wrote:1) Your feeds isn't valid and, IMHO, will be not work on some hosts.


They are valid, according to;

http://rss.scripting.com/?url=http%3A%2 ... orum_1.rss

If you've noticed any invalidness I'd love to hear!

I just fixed the mimetype error... :roll: oooops! :lol:

chyduskam wrote:2) I use RSS autodiscowery too in my forum,but noor 1 - at 3 ways.
Like you, OPML and feed protocol. :) Now I test add-on and, if it will be released on phpbbguru.net, I place it in this mod.


Cool

3) Your MOD dosn't support private forums and have strange description in RSS (number of replies but nor real message)


Yeah its just in testing at the moment, I have no intention of supporting private forums, its for public feeds, and for low load.



I like your mod, its more mature than mind atm, but I can't justify the server load of rendering a file each time someone requests it...this is the main feature of mine :D

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Mon Jan 10, 2005 6:38 pm

rhs98 wrote:I just fixed the mimetype error... :roll: oooops! :lol:

... And remove <pubDateL> item :)

I am sorry, but this thread is not for debuging you mod. ;)

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Tue Jan 11, 2005 9:26 pm

RSS Autodiscovery Add-On for RSS Feed 2.x

Code: Select all

##############################################################
## MOD Title: RSS Autodiscovery Add-On for RSS Feed 2.x
## MOD Author: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A
## MOD Description: RSS Autodiscovery using <link> tag in HTTP <head> section
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 3 Minutes
## Files To Edit: 1
##    includes/page_header.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbbguru.net/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbbguru.net/mods/
##############################################################
## MOD History:
##
##   2005-01-10 - Version 1.0.0
##      - initial release
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]-------------------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]----------------------------------------
#
//
// Parse and show the overall header.
//

#
#-----[ BEFORE, ADD ]----------------------------------
#
// BEGIN RSS autodiscovery
$rss_forum_id =( isset($HTTP_GET_VARS[POST_FORUM_URL]))? intval($HTTP_GET_VARS[POST_FORUM_URL]): 0;
$rss_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$rss_script = ( $rss_path != '' ) ? $rss_path . '/rss.' . $phpEx : 'rss.'. $phpEx;
$rss_server_name = trim($board_config['server_name']);
$rss_server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$rss_server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
$rss_url=$rss_server_protocol . $rss_server_name . $rss_server_port . $rss_script;
if($rss_forum_id!=0){
      $rss_link='<link rel="alternate" type="application/rss+xml" title="RSS" href="'.$rss_url.'?f='.$rss_forum_id.'" />'."\n";
      $rss_link.='<link rel="alternate" type="application/atom+xml" title="Atom" href="'.$rss_url.'?atom&f='.$rss_forum_id.'" />'."\n";
}
else
{
       $rss_link='<link rel="alternate" type="application/rss+xml" title="RSS" href="'.$rss_url.'" />'."\n";
      $rss_link.='<link rel="alternate" type="application/atom+xml" title="Atom" href="'.$rss_url.'?atom'.'" />'."\n";
}
// END RSS autodiscovery

#
#-----[ FIND ]----------------------------------------
#
//
// The following assigns all _common_ variables that may be used at any point
// in a template.

#
#-----[ BEFORE, ADD ]----------------------------------
#
$nav_links_html.=$rss_link; //  RSS autodiscovery

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


RSS Who View Online Add-On for RSS Feed 2.x

Code: Select all

##############################################################
## MOD Title: RSS Who View Online Add-On for RSS Feed 2.x
## MOD Author: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A
## MOD Description: View who read RSS feed online.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 5
##    includes/constants.php
##   language/lang_english/lang_main.php
##   language/lang_russian/lang_main.php
##   viewonline.php
##   admin/index.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbbguru.net/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbbguru.net/mods/
##############################################################
## MOD History:
##
##   2005-01-10 - Version 1.0.0
##      - initial release
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ OPEN ]-------------------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]----------------------------------------
#
define('PAGE_TOPIC_OFFSET', 5000);

#
#-----[ AFTER, ADD ]----------------------------------
#
define('PAGE_RSS', -1139);    // RSS Feed Mod

#
#-----[ OPEN ]-------------------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]----------------------------------------
#
$lang['Viewing_FAQ'] = 'Viewing FAQ';

#
#-----[ AFTER, ADD ]----------------------------------
#
$lang['Viewing_RSS'] = 'RSS feed';         // RSS Feed Mod

#
#-----[ OPEN ]-------------------------------------------------------
#
language/lang_russian/lang_main.php

#
#-----[ FIND ]----------------------------------------
#
$lang['Viewing_FAQ'] = 'Viewing FAQ';

#
#-----[ AFTER, ADD ]----------------------------------
#
$lang['Viewing_RSS'] = 'RSS feed';  // RSS Feed Mod

#
#-----[ OPEN ]-------------------------------------------------------
#
viewonline.php

#
#-----[ FIND ]----------------------------------------
#
            case PAGE_FAQ:
               $location = $lang['Viewing_FAQ'];
               $location_url = "faq.$phpEx";
               break;

#
#-----[ AFTER, ADD ]----------------------------------
#
            // Start add - RSS Feed MOD
            case PAGE_RSS:
               $location = $lang['Viewing_RSS'];
               $location_url = "rss.$phpEx";
               break;
            // End add - RSS Feed MOD

#
#-----[ OPEN ]-------------------------------------------------------
#
admin/index.php

#
#-----[ FIND ]----------------------------------------
#
                  case PAGE_FAQ:
                     $location = $lang['Viewing_FAQ'];
                     $location_url = "index.$phpEx?pane=right";
                     break;

#
#-----[ AFTER, ADD ]----------------------------------
#
            // Start add - RSS Feed MOD
                  case PAGE_RSS:
                     $location = $lang['Viewing_RSS'];
                     $location_url = "index.$phpEx?pane=right";
                     break;
            // End add - RSS Feed MOD
#
#-----[ FIND ]----------------------------------------
#
               case PAGE_FAQ:
                  $location = $lang['Viewing_FAQ'];
                  $location_url = "index.$phpEx?pane=right";
                  break;

#
#-----[ AFTER, ADD ]----------------------------------
#
            // Start add - RSS Feed MOD
               case PAGE_RSS:
                  $location = $lang['Viewing_RSS'];
                  $location_url = "index.$phpEx?pane=right";
                  break;
            // End add - RSS Feed MOD

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Last edited by chyduskam on Fri Jan 14, 2005 4:03 pm, edited 1 time in total.

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Postby Quuipo » Tue Jan 11, 2005 9:46 pm

is it possible to subscribe to different forums with this one as in rhs98's mod?

does it exclude 'member only' area's?

do i read correctly it only updates once every 2 weeks? How does it reduce server load if i want it updated in say every 10 minutes? 2 weeks is very long.

a lot of questions in one time :)

thanks,
Q

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Tue Jan 11, 2005 10:57 pm

Quuipo wrote:is it possible to subscribe to different forums with this one as in rhs98's mod?

Sorry, I misunderstand you.
rss.php?f=x - yes, support

Quuipo wrote:does it exclude 'member only' area's?

It exclude 'member only' area's w/o keys 'login' or 'uid', else it use WWW-Authenticate.
This mod use standart function auth from phpBB and create correct new session for every connect to server.

Quuipo wrote:do i read correctly it only updates once every 2 weeks? How does it reduce server load if i want it updated in say every 10 minutes? 2 weeks is very long.

No. It use data from last 2 week only to generate RSS feeds. You can update every 5 min if U want. But for save server time this program limit data range for find new AND MODIFIED records.

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Postby Quuipo » Tue Jan 11, 2005 11:12 pm

thanks for your quick reply :D

chyduskam wrote:
Quuipo wrote:is it possible to subscribe to different forums with this one as in rhs98's mod?

Sorry, I misunderstand you.
rss.php?f=x - yes, support


i mean as in this picture:
Image


Quuipo wrote:does it exclude 'member only' area's?

It exclude 'member only' area's w/o keys 'login' or 'uid', else it use WWW-Authenticate.
This mod use standart function auth from phpBB and create correct new session for every connect to server.


great :D

Quuipo wrote:do i read correctly it only updates once every 2 weeks? How does it reduce server load if i want it updated in say every 10 minutes? 2 weeks is very long.

No. It use data from last 2 week only to generate RSS feeds. You can update every 5 min if U want. But for save server time this program limit data range for find new AND MODIFIED records.


ah thanks, i understand now :)
Q

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Wed Jan 12, 2005 5:30 am

Quuipo wrote:i mean as in this picture:
--- SKIP---

Yes. If you install "RSS Autodiscovery Add-On for RSS Feed 2.x ". That Add-on MOD use only information from GET string nor any additional SQL will be execute. Forums RSS Autodiscovery will work then user open forum.

P.S. As for me, Mozilla and Opera rss (and XML in all) support is poor and with a lot of buggs.

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Postby Quuipo » Wed Jan 12, 2005 3:59 pm

thanks :)

i've installed it now, seems a lot faster already :D

User avatar
chyduskam
Registered User
Posts: 110
Joined: Thu Oct 28, 2004 9:33 am
Location: Saint Petersburg, Russia
Contact:

Postby chyduskam » Wed Jan 12, 2005 4:30 pm

Quuipo wrote:thanks :)

i've installed it now, seems a lot faster already :D

I see. You forget to remove <language>ru</language> from template or change in to 'en-us' like this:
<language>en-us</language>

It seems to me nobody write at Russian in your forum ;)

User avatar
Quuipo
Registered User
Posts: 191
Joined: Sun May 05, 2002 8:15 pm

Postby Quuipo » Wed Jan 12, 2005 4:44 pm

i have changed it, thanks :)


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

Who is online

Users browsing this forum: No registered users and 5 guests