[MODDB] Smartfeed for phpBB 3

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
nobrell
Registered User
Posts: 30
Joined: Mon Mar 17, 2008 3:47 pm

Re: [RC10] Smartfeed for phpBB 3

Post by nobrell »

MarkDHamill wrote:I don't understand it either. However, I kind of have to leave it in or it is likely the mod will not get approved.
np, I understand. Hope you get it approved

User avatar
elsinor
Registered User
Posts: 24
Joined: Sun Apr 20, 2008 4:06 pm
Location: RU, Ekaterinburg
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by elsinor »

Some validation problems in 2.2.9, check this please

Code: Select all

<b>Fatal error</b>:  Cannot redeclare login_db() (previously declared in /var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php:27) in <b>/var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php</b> on line <b>233</b><br />
also bad looking ;)
I'm from Russia and it's all about my English :)
My phpBB3 forum

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

The problem seems to be the link tag. I am guessing it would prefer & instead of & although I don't think that has been a problem in the past.

I assume Russian renders in UTF-8. It does on my screen.

I wonder if the problem goes away if you try RSS 2.0 or ATOM 1.0.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

User avatar
elsinor
Registered User
Posts: 24
Joined: Sun Apr 20, 2008 4:06 pm
Location: RU, Ekaterinburg
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by elsinor »

By replacing with & i got
http://www.tuningster.ru/smartfeed.php? ... style=HTML
With
An error occurred running phpBB Smartfeed
An error occurred running phpBB Smartfeed. As a result, no content can be returned. Use this error information as a guide to correcting the problem. Please note that you must use this program to create a URL that can be used with phpBB Smartfeed. The error is: phpBB Smartfeed does not accept the feed_type parameter value given or the feed_type parameter is absent.
I'm from Russia and it's all about my English :)
My phpBB3 forum

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

In the earlier problem, it said at the bottom:

Code: Select all

<b>Fatal error</b>:  Cannot redeclare login_db() (previously declared in /var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php:27) in <b>/var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php</b> on line <b>233</b><br />
Not sure what is going on here, but my mod does not modify auth_db.php. Could this be a result of another modification that you applied?

Code: Select all

http://www.tuningster.ru/smartfeed.php?&limit=1_DAY&sort_by=standard&feed_type=&feed_style=HTML
Clearly there is no value assigned to the feed_type parameter. These are stored in /language/en/mods/smartfeed.php. Perhaps they should be moved into /includes/constants_smartfeed.php. This may be an oversight on my part. If you have a Russian translation for this page, make sure these constants are in the file and as specified in the English version.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

User avatar
snkhan
Registered User
Posts: 110
Joined: Sun Aug 03, 2003 6:34 pm
Location: United Kingdom
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by snkhan »

Hi Mark,

Thank you for your wonderful work on this MOD. I've just installed it on a development board, and had a couple of questions, which I hope you might be able to help with!

I'm currently running phpBB 2 on my live board, and use a different RSS builder. Similar to your MOD, it allows users to 'roll their own' feed and then subscribe to it. An example feed (already parsed) is here. The builder is here.

Couple of questions:

1. How do I create a feed which contains the last x amount of new/updated posts? So for instance, if I call for the last 50 posts, they should all relate to different threads (this makes more sense when you check out my example page above);

2. Would it be relatively straightforward to add the total posts (in that specific thread) into the RSS feed?

3. How about a setting which creates just the the feed titles, with a link to that topic? So without any post body at all?

I guess I'm trying to massage a feed to that it looks like
MyGallery in General
Last post by ftangdude55, Thursday 7 May 2009 (38 Replies)
Thanks again for your help,

Saj
snkhan.co.uk

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

There is a maximum posts in feed parameter that will handle question #1.

#2 would not be easy to do by hacking smartfeed.php. However, #2 and #3 can be done with some PHP programming which consumes the RSS feed. RSS and Atom are just instances of XML documents, so they should be easily parsed and thus sliced and diced programatically. For example you could use the SimpleXML parser to read the feed into objects. Since posts are contained inside topics, it should be possible to easily generate PHP to get the number of posts per topic by counting the number of elements in the associated array.

For more see http://us2.php.net/simplexml.
Last edited by MarkDHamill on Mon May 18, 2009 5:17 pm, edited 1 time in total.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

User avatar
snkhan
Registered User
Posts: 110
Joined: Sun Aug 03, 2003 6:34 pm
Location: United Kingdom
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by snkhan »

Thanks for responding Mark. But the maximum posts field will often return the same thread. What I was hoping for was a setting which returned unique threads.

I think at the moment, if 50 responses are made in a thread, then the RSS feed will be populated by those 50 responses. Is there a way to create the feed so that irresponsive of the number of replies, you only get a single link back for that thread in the feed? (Sorry if this doesn't make sense)!

The "First posts of topics only" setting - does this return only newly created threads, or any thread which has recently been created/responded to? I've tested the feed locally with limited data in the forum so am having some problems checking this.

Thanks again Mark.
snkhan.co.uk

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

The maximum post option cuts off Smartfeed so it shows no more than X posts. This is a useful feature because often people want to use Smartfeed to highlight newest posts on another web page. However, it is somewhat arbitrary where posts get cut off. Basically this sets a LIMIT statement in the SQL.

The first posts of topics only returns the first posts only if the post is within the data range requested. So if you requested one day, you will only see first posts where the first post date falls within the last 24 hours. So it won't repeat the first post if it was made 48 hours ago and there were replies within the last 24 hours.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

MarkDHamill wrote:In the earlier problem, it said at the bottom:

Code: Select all

<b>Fatal error</b>:  Cannot redeclare login_db() (previously declared in /var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php:27) in <b>/var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php</b> on line <b>233</b><br />
Not sure what is going on here, but my mod does not modify auth_db.php. Could this be a result of another modification that you applied?

Code: Select all

http://www.tuningster.ru/smartfeed.php?&limit=1_DAY&sort_by=standard&feed_type=&feed_style=HTML
Clearly there is no value assigned to the feed_type parameter. These are stored in /language/en/mods/smartfeed.php. Perhaps they should be moved into /includes/constants_smartfeed.php. This may be an oversight on my part. If you have a Russian translation for this page, make sure these constants are in the file and as specified in the English version.
Correction. The feed_type parameter is a configuration variable. So if this is blank, you may have not run the SQL needed to create the necessary config variables for Smartfeed, or did not purge the cache.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

User avatar
snkhan
Registered User
Posts: 110
Joined: Sun Aug 03, 2003 6:34 pm
Location: United Kingdom
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by snkhan »

Just a small change needs to be done to correct the title attribute of the 'Compact' radio button from
Compact will removing formatting, BBCode, signatures and collapse paragraphs.
to
Compact will remove formatting, BBCode, signatures and collapse paragraphs.
To correct this before the next version is released, go to

root > language > %language% > mods > smartfeed.php

And make the necessary correction on line 162.

Hope this helps,

Saj
snkhan.co.uk

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

Thanks. Should go out in next release.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

Fisch.666
Registered User
Posts: 221
Joined: Sat Jul 30, 2005 10:58 am

Re: [RC10] Smartfeed for phpBB 3

Post by Fisch.666 »

Hi!
MarkDHamill wrote:In the earlier problem, it said at the bottom:

Code: Select all

<b>Fatal error</b>:  Cannot redeclare login_db() (previously declared in /var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php:27) in <b>/var/www/vhosts/tuningster.ru/httpdocs/includes/auth/auth_db.php</b> on line <b>233</b><br />
Not sure what is going on here, but my mod does not modify auth_db.php. Could this be a result of another modification that you applied?
I have the same problem since i've updated smartfeed from 2.2.7 to 2.2.9. After downgrading back to 2.2.7 the error is gone. Do you know what happens here and how we can fix this?

Thanks in advance for an reply.

User avatar
MarkDHamill
Registered User
Posts: 4152
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC10] Smartfeed for phpBB 3

Post by MarkDHamill »

Possible areas to check include the change to TripleDES.php:

Code: Select all

if (file_exists('DES.php'))
{
	include ('DES.php');
}
replacing with:

Code: Select all

require_once 'DES.php';
This caused a problem for one user.

I don't see much else except in 2.2.9 I changed the logic at the Mod Team's request for determining the allowed forums.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.

Fisch.666
Registered User
Posts: 221
Joined: Sat Jul 30, 2005 10:58 am

Re: [RC10] Smartfeed for phpBB 3

Post by Fisch.666 »

Hi!

First thanks for your reply.

I have done some tests:

Upgraded Smartfeed to 2.2.8 -> No errors
Upgraded Smartfeed to 2.2.9 -> auth_db errors

There are no errors when i use the updated files from 2.2.9 and the smartfeed.php from 2.2.8. Only when i use the updated smartfeed.php from 2.2.9 the auth_db errors appears in the logfile, so there must be a problem in the smartfeed.php from 2.2.9.

Locked

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