[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.
Locked
JustAQuestion
Registered User
Posts: 7
Joined: Wed Mar 17, 2004 7:10 pm

Post by JustAQuestion »

I have a little question...


When I receive new posts via RSS the posts become read in my forum. Meaning if I log in to the forum and click the "view new posts" link I get an empty result.

Now is it possible to configure the mod somehow that the via rss received posts don´t become marked read?

Thanks...

JustAQuestion
Registered User
Posts: 7
Joined: Wed Mar 17, 2004 7:10 pm

Post by JustAQuestion »

uh...

hello?


help please!? :roll:

User avatar
TimG
Registered User
Posts: 121
Joined: Sun Jun 23, 2002 8:52 pm
Location: Germany

No feed login on new server

Post by TimG »

Hi Chy!

I just moved my forum to a new server, temporarily under a new domain name. Almost everything is working: Normal feeds with the mod work fine but login feeds requiring a password no longer work. If I try to set up the feed in FeedDemon or Opera it doesn't accept the user name and password, even though they are correct.

The user details I am trying to use to log in are correct and are working fine for logging in to the forum. Any ideas what the problem could be?
Regards,
Tim

User avatar
TimG
Registered User
Posts: 121
Joined: Sun Jun 23, 2002 8:52 pm
Location: Germany

Post by TimG »

JustAQuestion wrote: Now is it possible to configure the mod somehow that the via rss received posts don´t become marked read?

Looks like Chyduskam isn't answering at the moment. You can do this quite easily, but if you do it you should NOT use the "autologin" feature.

Locate this code in rss_functions.php:

Code: Select all

$session_id = md5(uniqid($user_ip)); 
   $sql = "INSERT INTO " . SESSIONS_TABLE . " 
         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) 
         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)"; 
      if ( !$db->sql_query($sql) ) 
      { 
            ExitWithHeader("500 Internal Server Error","Error creating new session"); 
      } 
      $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; 
      $sql = "UPDATE " . USERS_TABLE . " SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit "; 
        if(LV_MOD_INSTALLED) $sql.= ",user_lastlogon=$current_time, user_totallogon=user_totallogon+1"; 
      $sql .=" WHERE user_id = $user_id"; 
      if ( !$db->sql_query($sql) ) 
      { 
          ExitWithHeader("500 Internal Server Error",'Error updating last visit time'); 
      } 
and comment it out with a /* at the beginning and a */ at the end, so that it looks like this:

Code: Select all

/* 	
$session_id = md5(uniqid($user_ip)); 
   $sql = "INSERT INTO " . SESSIONS_TABLE . " 
         (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) 
         VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)"; 
      if ( !$db->sql_query($sql) ) 
      { 
            ExitWithHeader("500 Internal Server Error","Error creating new session"); 
      } 
      $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; 
      $sql = "UPDATE " . USERS_TABLE . " SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit "; 
        if(LV_MOD_INSTALLED) $sql.= ",user_lastlogon=$current_time, user_totallogon=user_totallogon+1"; 
      $sql .=" WHERE user_id = $user_id"; 
      if ( !$db->sql_query($sql) ) 
      { 
          ExitWithHeader("500 Internal Server Error",'Error updating last visit time'); 
      } 
*/
Regards,
Tim

User avatar
TimG
Registered User
Posts: 121
Joined: Sun Jun 23, 2002 8:52 pm
Location: Germany

Re: No feed login on new server

Post by TimG »

TimG wrote: Normal feeds with the mod work fine but login feeds requiring a password no longer work.

Now I found out the reason for this and the solution. It happens when Apache is running as CGI, then the server doesn't automatically pass the variables for the user and the password. You need to add the following code to the .htaccess file in the forum directory to make it work:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
</IfModule>
Found this on the Naklon website for the mod here:

http://naklon.info/rss/about.htm
Regards,
Tim

JustAQuestion
Registered User
Posts: 7
Joined: Wed Mar 17, 2004 7:10 pm

Post by JustAQuestion »

Thx TimG!


Works fine!

User avatar
The Suite
Registered User
Posts: 617
Joined: Sat Jul 30, 2005 11:11 am
Location: NYC, USA
Contact:

Post by The Suite »

Hey guys,

How do I set this up to show just the post headers rather than all the post info in the feed?

Please advise.
Much appreciloved,

The Suite
Thank you :-)
The IT Security Information Center

jerics99
Registered User
Posts: 14
Joined: Wed Feb 22, 2006 11:49 pm

Questions about admin GUI and Release plans

Post by jerics99 »

Hi,

I think this mod looks really interesting!

I have two questions:
When is this Mod planned for validated/release?

I far as I understand, this mod include additions to the admin GUI enabling administrators to configure the RSS feeds functionality, is it possible to implement the Mod without the GUI changes and instead administer/configure the functionality through a text file (i.e. as the config .php). This way I would not need to update all my local language files.

Cheers!
Eric

maidenbower
Registered User
Posts: 6
Joined: Tue Jan 07, 2003 10:29 am

Post by maidenbower »

chyduskam wrote: salem
Yes. I am planing to do it in next version. Here you can see two simple way to limit description with 500 characters.
First way may has а litle bbcode mistakes (non critical) and show, for example, if closed tag will be truncated.
In second way first of all we remove all bbCode from message.

#---FIND----
$message = $post['post_text'];
#---REPLACE WITH---
$message = substr($post['post_text'],0,500);

Or you can remove all bbCode from description before truncate it:
#---REPLACE WITH---
$message=preg_replace('/\[(([^\s\]]+\:[0-9a-z]+)|([\/]?url[^\s\]]*))\]/si', '', $post['post_text']);
$message = substr($message,0,500);



This is good stuff but I wanted to limit by word count rather than breaking the mesage part way through a word. The following is based on code from another RSS feed mod


Code: Select all

REPLACE
$message = $post['post_text'];

WITH
$message=preg_replace('/\[(([^\s\]]+\:[0-9a-z]+)|([\/]?url[^\s\]]*))\]/si', '', $post['post_text']); 
$words = explode(" ",$message,20); //get first 20 words 
$message = ""; 
for ($i = 0; $i < (count($words)); $i++) 
{ 
$message .= $words[$i] . " "; //add words back to $message 
} 
$message .= ' <b>...</b>'; //append ... to indicate more text available
The only trouble is you always get the ... even if the message is shorter than 20 words. How would you change it to only append ... when the message truly has been truncated?[/code]

User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post by aboyd »

I was having a very hard time determining which RSS mod to use on my forum. There are a few good ones. Finally, I decided to download the 3 major mods, load them on a test forum, and create a comparison chart for their features. If anyone reading this would find my chart useful, it is here:

http://www.outshine.com/phpbb_rss_mods.php

-Tony

JackDog
Registered User
Posts: 7
Joined: Tue Jun 14, 2005 4:27 pm

Post by JackDog »

Great mod. Easy to configure and utilize.

The only thing missing is Category level rss feeds.

Anyone gotten something like this to work?

Code: Select all

.../rss.php?category=2

User avatar
The Suite
Registered User
Posts: 617
Joined: Sat Jul 30, 2005 11:11 am
Location: NYC, USA
Contact:

Post by The Suite »

aboyd,

Awesome comparison chart, very good work, much appreciloved.

Have a great day.
Much appreciloved,

The Suite
Thank you :-)
The IT Security Information Center

User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post by aboyd »

The Suite wrote: Awesome comparison chart, very good work, much appreciloved.

Thanks. I've done some more work. In the comparison chart, I note that the little "autodiscovery" mod that comes with RSS Feed 2.x is pretty bare-bones. So I've overhauled it, added topic-level feeds, added RSS & Atom icons for the page footer, etc. You can find it (I call it "Autodiscovery Plus") on this page:

http://www.outshine.com/minimods/

Also, you can see the autodiscovery & icons in use on my site:

http://www.publisherdatabase.com/forums/

(You'll see the RSS & Atom icons near the bottom of each forum page, and if you view the source of each page, the revised autodiscovery links are in the header.)

If the original author ever comes back to this topic, he's welcome to add my code into his original product.

-Tony

User avatar
aboyd
Registered User
Posts: 193
Joined: Mon May 10, 2004 7:30 pm
Location: USA
Contact:

Post by aboyd »

Building on some of the previous posts about trimming text in the RSS feed, I created my own little mod to do this. Instead of using the code here, which (seems) to only clean up BBCode, I used some code from another mod of mine (phpBB Blog) that cleans up tags after everything has been converted to HTML. It tries to be sure that no tags are cut off in the middle, and it won't cut off a word right in the middle, either. And it only applies the ellipsis (...) if the post is actually truncated. It's called "Trim RSS Mod Posts," and it's here:

http://www.outshine.com/minimods/

-Tony

trukke
Registered User
Posts: 1
Joined: Wed Apr 05, 2006 11:13 am

Post by trukke »

Hello, i have a problem showing the italian chars (à,è,ì,etc..) of my rss page.
The address is:

http://www.vivereonline.com/rss.php

Using firefox and sage there is no way to show the correct characters.
Some users told me that they have no problem using MacOsx and Safari, so i'd like to know if it is an rss feed problem or a sage problem.

Thank you and Best Regards
Trukke

Locked

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