[BETA] Smartfeed

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
MarkDHamill
Registered User
Posts: 3954
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[BETA] Smartfeed

Post by MarkDHamill » Thu Jan 05, 2006 6:41 pm

phpBB forums may contain restricted forums that should not normally be exposed as a newsfeed. Smartfeed is a phpBB modification, derived from my phpBB Email Digest modification, that allows users to get a newsfeed for selected forums, including restricted forums if they have the privilege. This is done by using an interface program called smartfeed_url.php which creates a URL that authenticates the user with phpBB. Smartfeed is smart enough to keep users out of forums for which they do not have access, even if they hack parameters on the URL field. Authentication is reasonably sophisticated. Those who are not registered can access in the newsfeed only those forums that can be read by the public.

The URL generated by smartfeed_url.php is then copied and pasted by the user into their newsreader. The user needs to be smart enough to specify a newsfeed that their newsreader can interpret. RSS 0.91, RSS 1.0, RSS 2.0 and ATOM 1.0 newsfeeds are supported.

Download at: http://www.potomactavern.org/tavern/smartfeed.zip.

To test without installing as a non-registered user use this URL:

http://www.potomactavern.org/smartfeed_url.php

To test without installing as a registered user, log into my phpBB forum using "smartfeed" as both the ID and the password. Then call the smartfeed_url link above. You will notice a couple more options, along with forums that the public cannot see.

To test the newsfeed, call the URL created in smartfeed_url.php in your favorite newsreader, such as Sage if using Firefox.

Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame » Fri Jan 06, 2006 10:42 pm

Thanks! Will try it out!

User avatar
MHobbit
Former Team Member
Posts: 4761
Joined: Thu Mar 18, 2004 5:32 pm
Location: There and Back Again

Post by MHobbit » Fri Jan 06, 2006 10:48 pm

Wait, I've seen more than one Smartfeed thread. Here, for example.

[EDIT] Oh. There's no need to create a new thread once a MOD moves into beta, however, as you can simply rename your topic. :wink:
Former phpBB MOD Team member
No private support is offered.
"There’s too many things to get done, and I’m running out of days..."

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

Post by MarkDHamill » Fri Jan 06, 2006 11:01 pm

Sorry about that. I didn't know I could rename the topic. You would think I would know that!

bf2taz
Registered User
Posts: 8
Joined: Tue Jan 03, 2006 3:06 pm

I have checked my id10t standards :)

Post by bf2taz » Mon Jan 09, 2006 5:08 pm

Hey Mark,


I am pretty versed with computer hardware and our security applications, but I am an extreme virgin when it comes to php and hosting web sites, and I know absolutley nothing about news feed software. I am learning, slowly.

I found your post through the search utility. I was looking for a mod, that would allow users to select forums that they want to be notified of new posts. Kind of like belonging to a Yahoo users group, but better. This mod sounds like it does this.

Currently you know the way phpbb works, and if a new users signs up for a site, but does not visit the forums, and reply to a topic, and tell it to notify them of any replies, that user will never know if anything is going on in the site.

My problem is I am not sure weather smartfeed is to work in conjuction with your earlier mod called Digest mod, or if it is separate. When I opened the zip package, it looks like a normal php-nuke type mod, but I know all about how looks can be deceiving. :)

I don't see any installation instructions so I am being cautious. We like phpbb, and right now are using it in conjunction with a php-nuke application called Imagination-nuke. All that is working fine, but my boss is worried people will post messages and because there is no notification going out to users of the forums (unless they are moderators) that this board won't function effectivley as does the yahoo. I don't tend to agree with his idea here, I hate Yahoo, and most peope in our users group hate it because a lot of times posts have nothing to do with what they are interested in. With that said, I understand his concern. My biggest problems is implementation, and then support.

I would have to get the smartfeed working, know how to use it with some type of news reader and then be able to educate my users, all to alleviate this issue.

Any help would be GREATLY appreciated, I am willing to offer reasonable financial support if requested.

Thanks for you time,
Chris Vetter
(407)319-2232

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

Post by MarkDHamill » Mon Jan 09, 2006 9:39 pm

Smartfeed is still in Beta, so it's not ready for prime time yet. It is however real easy to deploy if you have a virgin phpBB 2.0.19 site. It has not been tested with integrations like phpNuke, nor will it be by me.

The EMail Digests mod sends periodic emails of new posting on a user selected forum basis. My version is nearly two years old but send them at a time of day requested. Some other developers have extended my original mod and have gotten really fancy with it. It's practically a new application. But again, it's not integrated with phpNuke, but perhaps someone has done it. So if you don't like my plain vanilla version, visit the forums at:

http://www.dormlife.us

A newsfeed is a pull technology, vs. the push technology of email. Similar idea, different format. Email is simpler, although email clients like Outlook can also read newsfeeds. A newsfeed requires a newsreader. This can be a standalone client program like FeedReader for Windows, or a web aggregator site like bloglines.com, or some browsers have integrations. Firefox, for example, has the Sage newsreader.

Your users though have to be smart enough to know what the heck a newsreader is and to want to use one regularly. If they aren't, you'll want to stick with the Email Digest mod.

The .mod file in the Smartfeed.zip file contains installation instructions.

I don't generally do customizations for money because I don't have the time and you probably can't afford my rates. You might be able to talk a developer on dormlife.us into doing a customization for you if their extensive mod does not suffice. Beware that the Email digest mod is a tough one to install and configure. Smartfeed should be simple.

bf2taz
Registered User
Posts: 8
Joined: Tue Jan 03, 2006 3:06 pm

Post by bf2taz » Tue Jan 10, 2006 12:21 am

I appreciate your honesty. Well I'll keep looking around, but will still keep your mod on the side. Like I said, my boss's concern is that people will post messages that just sit because they are no active participants, unlike Yahoo, which sends everything either when it is posted or in a daily digests. I say we just start using it and see. But he is always playing the devils advocate. But, hey that's his job.

I read the digest install files, I have no idea if my host even supports the cron application. I doubt it :) I could probably do it, but I really hate fixing my site from messing it up if you know what I mean. I'll check into those sources. Thanks for your time!
Chris Vetter

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

Post by MarkDHamill » Tue Jan 10, 2006 2:59 am

Cron is a Unix or Linux batch scheduling utility. Every operating system has something similar and if you dig through the digest topics long enough you will discover how many have done it. The file batch_scheduling.txt has some examples of doing it with Windows.

The Digest software has a link on each topic or post allowing for each replies.

bf2taz
Registered User
Posts: 8
Joined: Tue Jan 03, 2006 3:06 pm

Thanks

Post by bf2taz » Tue Jan 10, 2006 2:22 pm

Cron is supported through cpanel, so I may give it a shot. But after thinking about it, I think I'll try your smartfeed first. I would rather try a new technology and learn it than an old one. It's time for my users to get into the 20th century :)

Thanks for your help,
Chris Vetter

bf2taz
Registered User
Posts: 8
Joined: Tue Jan 03, 2006 3:06 pm

Tried install

Post by bf2taz » Tue Jan 10, 2006 4:36 pm

Well I read the mod file, it looked simple enough. I copied the files to their respective location. But I think a standard php board probably runs in the root of the home folder. Mine runs off the root in some sub folders, exactly in /moudles/Forums.

The structure looks the same. But it does not work. I tried running the smartfeed_url.php from it's location, http://www.microkey.biz/moudles/Forums which I know is not standard for a nuke site. I got a blank html page. I tried copying the smartfeed and smartfeed_url to my root and modofying a variable in it to

$phpbb_root_path = '/modules/Forums'

I ran it from the root http:www.microkey.biz/smartfeed_url (not too secure?)

That gave me all kinds of errors like

Warning: main(): open_basedir restriction in effect. File(/modules/Forums/extension.inc) is not within the allowed path(s): (/home/cvetter/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/cvetter/public_html/smartfeed_url.php on line 34

Warning: main(/modules/Forums/extension.inc): failed to open stream: Operation not permitted in /home/cvetter/public_html/smartfeed_url.php on line 34

Warning: main(): open_basedir restriction in effect. File(/modules/Forums/extension.inc) is not within the allowed path(s): (/home/cvetter/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/cvetter/public_html/smartfeed_url.php on line 34

Warning: main(/modules/Forums/extension.inc): failed to open stream: Operation not permitted in /home/cvetter/public_html/smartfeed_url.php on line 34

Warning: main(): Failed opening '/modules/Forums/extension.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cvetter/public_html/smartfeed_url.php on line 34

Warning: main(): open_basedir restriction in effect. File(/modules/Forums/common.) is not within the allowed path(s): (/home/cvetter/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/cvetter/public_html/smartfeed_url.php on line 35

Warning: main(/modules/Forums/common.): failed to open stream: Operation not permitted in /home/cvetter/public_html/smartfeed_url.php on line 35

Warning: main(): open_basedir restriction in effect. File(/modules/Forums/common.) is not within the allowed path(s): (/home/cvetter/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/cvetter/public_html/smartfeed_url.php on line 35

Warning: main(/modules/Forums/common.): failed to open stream: Operation not permitted in /home/cvetter/public_html/smartfeed_url.php on line 35

Warning: main(): Failed opening '/modules/Forums/common.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cvetter/public_html/smartfeed_url.php on line 35

Fatal error: Call to undefined function: session_pagestart() in /home/cvetter/public_html/smartfeed_url.php on line 41

So I'm kinda stuck. I Wasnt sure either if there was something I needed to do to make phpbb aware of the mod.

Chris

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

Post by MarkDHamill » Tue Jan 10, 2006 6:14 pm

You should not change the phpBB root path.

I don't know how your site is configured, but I don't think you installed it in your phpBB directory. It should go in the same folder as common.php, login.php etc. All files are installed off the phpBB root directory.

Again this mod and all mods are not designed to work with integrations like phpNuke so you are on your own on that.

pdaengeli
Registered User
Posts: 4
Joined: Sat Jan 21, 2006 1:39 am
Location: Stockholm

Post by pdaengeli » Sat Jan 21, 2006 9:15 pm

Hello

Thank you for developing a restriction sensitive RSS solution for phpBB. Indeed you chose a smart way to do this.

I gave the beta a try on one of my forums.
Smartfeed_url.php exactly handles the restrictions (2 forums for non-registered users, more for the different groups of registered users).
But: I experience the same troubles which were described by simonlam earlier
The (SITE_URL) seems return nothing to me when I tried to generate the feed path.It just returned "smartfeed.php?....." I notice it came from smatfeed.php>$siteURL.

You tried to solve this problem by letting $siteURL add a "/" to the end if needed, but this obiously doesn't help in my case.

What I get looks like: "smartfeed.php?feed_type=ATOM1.0&limit=LF&sort_by=standard"

However, if I add "http://www....." manually the resulting feed isn't valid.

I tried the potomactavern feeds, which worked fine with my aggregator (Feed, OSX).

Any help appreciated, thanks!

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

Post by MarkDHamill » Sat Jan 21, 2006 10:23 pm

Okay, thanks for finding a significant bug. Originally I had a $siteURL declared in lang_smartfeed.php. Then I realized it wasn't language specific, so I put the code in smartfeed.php. I should have also put it in smartfeed_url.php.

To fix, in smartfeed_url.php before this line:

Code: Select all

$userdata = session_pagestart($user_ip, PAGE_INDEX);
Insert this code from smartfeed.php:

Code: Select all

// Code from rss.php Mod by Sascha Carlin. Create an absolute URL to the site. 
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
$siteURL = $server_protocol . $server_name . $server_port . $script_name;
// End copied code
if (substr($siteURL,(strlen($siteURL)-1),1) <> '/')
{
	$siteURL .= '/';
}

I will update my archive. Let me know if this doesn't solve your problem.

pdaengeli
Registered User
Posts: 4
Joined: Sat Jan 21, 2006 1:39 am
Location: Stockholm

Post by pdaengeli » Sat Jan 21, 2006 11:09 pm

Thanks for the quick reply.

I inserted the code, which resulted in adding the first part to the URL. The resulting feeds aren't valid, yet.

Feedvalidator.org yields
"line 2, column 0: XML parsing error: <unknown>:2:0: xml declaration not at start of external entity" for simple, non-restricted feeds like http://www.burgundia.ch/phpBB2/smartfee ... y=standard as well as for more sophisticated encrypted ones.

Any further ideas?


Btw: I translated lang_smarfeed.php into proper german. Let me know if there's use for it.

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

Post by MarkDHamill » Sat Jan 21, 2006 11:22 pm

Please reinstall all the files. I created a new archive.

http://www.potomactavern.org/tavern/smartfeed.zip

I've had some issues validating. I have been using feedvalidator.org to validate, but it wants feeds like RSS 1.0 to have a MIME type of type application. Unfortunately, this messes up some browsers like Firefox, that want to download it as a file. So being practical I changed RSS 1.0, RSS 2.0 to a MIME type of text, so you can see the XML in the browser. I also put ATOM 1.0 back to type application/xml.

There are also a couple new features. From the MOD file:

Code: Select all

##   2006-01-21 - Version 0.2 
##      - Fixed bug in smartfeed_url.php. Creates $siteURL value similar to smartfeed.php
##		- User can elect to filter out their own posts, similar to Digest mod
##		- Changed feedcreator.class.php to return RSS 1.0 and RSS 2.0 to have a MIME type of text/xml. While
##		  the validator at feedcreator.org complains it has to be type application/xml if selected from browsers like
##		  Firefox it wants to download it as a file. I think this is too confusing at the moment. ATOM 1.0 MIME type also
##		  returned to type application/xml.
##		- Note: the store cookie feature that stores the last access time still needs some thought. It works fine for browser plug ins
##        like Sage, but otherwise probably won't work. Stand alone feed readers will likely ignore cookies, as will web aggregator sites
##		  like bloglines.com.
##		- If you installed version 0.1 make sure to reinstall all files!
As for the German translation, I'll be glad to include it when it goes into release. For now there may be additional changes to the lang_smartfeed.php file. Note I added one new variable to this file in this release.

Post Reply

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