Smartfeed

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
38
76%
Very Good
7
14%
Good
5
10%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 50

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

Post by MarkDHamill »

wonko the sane wrote: Im trying to figure out how to remove the '(reply)' on the end and the forum name which is displayed in the feed - anyone know?

Also it would be cool to have a way to limit the number of posts :)


On the first item, it's easy to do. In lang_smartfeed.php you can edit this line, which by default is:

$lang['smartfeed_reply'] = '(reply)';

Make it a null and it won't show up.

Posts can be limited to go back a certain amount of time (a day, for example). RSS 0.91 is hardcoded to show no more than 15 topics, since that's what's required to validate it.

To limit it to the last X posts though begs other questions, because posts are sorted in various ways. Presumably you would want messages only the most recent X messages. That is hard to do with the sort criteria choices. However, it is an idea for an enhancement and I will give it some consideration.

swduncan
Registered User
Posts: 3
Joined: Tue May 02, 2006 11:01 pm

Post by swduncan »

I've got a question regarding Smartfeed...

What's to prevent someone with access to private forums from creating a URL with the purpose of giving it to someone else?

I see how the IP checking would do that, but it's a user-selectable thing, and there doesn't seem to be any way of requiring it.

Anyone have ideas on how to fix this?

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

Post by MarkDHamill »

dkinzer wrote: I installed this mod on my forum and ran into a couple of problems. The origin of the problem is that my phpBB configuration file is not named config.php and is not located in the phpBB forum directory. In my common.php, I have modified the include for the configuration file so that the forum works correctly.

Anyway. at line 178 of smartfeed_ur.php and at line 138 of smartfeed.php the code reads:

Code: Select all

  include($phpbb_root_path . 'config.'.$phpEx);
I don't think that these lines are necessary since common.php has been included much earlier in the file and, consequently, the configuration file has already been read. Anyway, I just commented out these two lines and the PHP code executes with no problems.

That said, I can't seem to get the generated URL to work with Feedreader 3.0. I am a total novice when it comes to RSS so I may be doing something wrong. Here is the URL for my forum's SmartFeed.

[Update] If the generated URL contains a limit specification like "limit=6%20HOUR", then when I attempt to use the generated URL I get a message from smartfeed.php that says:
There is an error in the URL you used to retrieve this newsfeed. 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 <a href="http://zbasic.net/forum/smartfeed_url.php">this program</a> to create a URL that can be used with SmartFeed. The error is: Limit parameter is not a recognized value.


I am guessing that you are using a phpBB integration, perhaps with postNuke or something. In a vanilla phpBB installation config.php is in the root phpBB folder in config.php. Like all mods I support an out of the box phpBB installation.

The database password is used as an encryption key and is unique to each forum, so it is harder to crack. That's why I used that value.

I am getting connection timeouts when I try to run smartfeed.url, although smartfeed_url.php worked fine but is not reloading. I assume you are having a transient server issue.

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

Post by MarkDHamill »

richey wrote: Is there a way to avoid being replies listed several times?
I get huge lists displayed every day in a quite active board, and sometimes one third of the pulldown list of the "Live Bookmark" is just filled by the numerious replies to ONE topic ... :?

thanks!


The problem here is that the post subject is usually left blank. If it is not blank, it is used as the item title. Otherwise I default to the topic title. I suppose I could embed the post id in the subject, but that wouldn't be too meaningful. I could also change the title to something like "User xxx reply to: topic title". What smartfeed really needs is an easier way to tailor the item subject field in the newsfeed. It's a change worth pondering.

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

Post by MarkDHamill »

wonko the sane wrote: Below is the reply I pulled from the beta thread and moved over here:
From what I've seen and read Adsense is probably the most popular. There's a couple different ways adsense is being used for the forums currently. the most popular way seems to be displaying an ad block below the first post. In a feed, if it can be done I'd guess top or bottom would be more than sufficient. I'd probably run it at the bottom, but some might like it at the top.

Not really seeing a difference. Whether it's 1 word, 10, or 50, it seems to be pulling the same amount of information. Perhaps it's my news reader.

In any case after playing with your feed it looks like most news readers only pull the topic title and link back to the actual message anyway regardless of whether or not you ask to pull the entire message, which is all that I think is needed. I tried it with myyahoo using RSS2.0 and got the same effect as I did with newsfox. Pulls the topic titles as links which is cool.

Thanks for looking into it.


I have been looking at AdSense. It's a great idea, but it suffers from one big problem: Google is still in Beta mode on integratng RSS with Adsense. I can't even apply for the Beta program. There are some non-phpBB hacks out there which demonstrate a way to do it now, but it could change when Google makes their integration official. So I am reluctant to persue it.

However, I think it's a good idea to allow optional feed messages at the top, bottom and every X items in the newsfeed, which could be advertisements. That's why I'm wondering how many people have integrated phpAdsNew with phpBB. I did on one of my other forums. phpAdsNew is terrific software, and for boards where money is the game and there are paying customers it is the way to go. Integrating content from phpAdsNew into a newsfeed should not be a big deal, but of course it depends on having a critical mass of people using it for phpBB.

Learn more about phpAdsNew at:

http://www.phpadsnew.com/

For those serving Ads and not using AdSense, what do you use?
Last edited by MarkDHamill on Tue May 02, 2006 11:35 pm, edited 1 time in total.

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

Post by MarkDHamill »

richey wrote: Hi,

this is really not a 'hot topic' (like the one above on limiting the listed items :wink: ), just wanted to let you know:

when I check the resulting RSS file at feedvalidator.org, I get numerous warning messages (most of them related to missing or incorrect header meta tags and too much overhead in the <description> tags).

I will try to figure out how to fix this.


It was pretty extensively tested at feedvalidator.org. I notice certain things will trip it up, but it is usually content in the posts themselves, like non-standard characters such as curled quotes. Depending on the feed type, you may get warnings but I thought I had reconciled all the errors.

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

Post by MarkDHamill »

swduncan wrote: I've got a question regarding Smartfeed...

What's to prevent someone with access to private forums from creating a URL with the purpose of giving it to someone else?

I see how the IP checking would do that, but it's a user-selectable thing, and there doesn't seem to be any way of requiring it.

Anyone have ideas on how to fix this?


You are right. IP validation is selected by the user. I could make it mandatory, or even better configurable by the administrator. I guess you have to trust your users, because they can also give out their phpBB username and passsword to anyone they want to also.

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

Post by MarkDHamill »

Sorry, I haven't been getting notifications, even though I have notify turned on. Sometimes it works and sometimes it doesn't, so I tend to forget to check these topics.

dkinzer
Registered User
Posts: 21
Joined: Mon Sep 05, 2005 3:20 am
Location: Portland, OR

Post by dkinzer »

I am guessing that you are using a phpBB integration, perhaps with postNuke or something. In a vanilla phpBB installation config.php is in the root phpBB folder in config.php. Like all mods I support an out of the box phpBB installation.

Actually not. I just decided to relocate and rename the config.php somewhere that it would be impossible to access via the web. I'm not sure that it provides any extry security but I feel better about it.

However, my point was that it is not necessary to include config.php at the points that I enumerated since the config.php is already included via common.php. I assert that you can delete those includes and your mod will still work perfectly. Having them there is an unnecessary complication.
Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

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

Post by MarkDHamill »

common.php does call config.php, but the variable is unset after it is used, so it should not be available to any program that calls it, such as smartfeed_url.php. It may be placed in a global variable in which case I could substitute this global variable for the need to open config.php.

dkinzer
Registered User
Posts: 21
Joined: Mon Sep 05, 2005 3:20 am
Location: Portland, OR

Post by dkinzer »

common.php does call config.php, but the variable is unset after it is used

Indeed. I forgot about that. Never mind.
Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

swduncan
Registered User
Posts: 3
Joined: Tue May 02, 2006 11:01 pm

Post by swduncan »

MarkDHamill wrote: You are right. IP validation is selected by the user. I could make it mandatory, or even better configurable by the administrator. I guess you have to trust your users, because they can also give out their phpBB username and passsword to anyone they want to also.


Yes, but the difference is that the URL doesn't allow for impersonation, where the user ID and password does.

Would it be a simple modification for me to hard-code my instance to enforce the IP checking?

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

Post by MarkDHamill »

swduncan wrote: Would it be a simple modification for me to hard-code my instance to enforce the IP checking?


That depends on how good you are with PHP. I will likely include it in a future release over the next week or two, if you can wait that long.

swduncan
Registered User
Posts: 3
Joined: Tue May 02, 2006 11:01 pm

Post by swduncan »

MarkDHamill wrote: That depends on how good you are with PHP. I will likely include it in a future release over the next week or two, if you can wait that long.


Done!

Many thanks!

daza
Registered User
Posts: 7
Joined: Mon Oct 18, 2004 7:12 am

Post by daza »

G'day,

Is it possible to change the order of the feeds? In the sense that I have them newest to oldest, rather than oldest to newest? Firefox displays the ATOM 1.0 feed perfeectly, but it shows the oldest first, and the newest last (last being bottom of the drop-down box).

I tried changing

Code: Select all

// Validate the sort by parameter
	if (!$error)
	{
		$order_by = ( !empty($HTTP_GET_VARS['sort_by']) ) ? htmlspecialchars($HTTP_GET_VARS['sort_by']) : '';
		if ($order_by == 'standard')
		{
			$order_by_str = 'c.cat_order, f.forum_order, lp.post_time desc, p.post_time';
to

Code: Select all

// Validate the sort by parameter
	if (!$error)
	{
		$order_by = ( !empty($HTTP_GET_VARS['sort_by']) ) ? htmlspecialchars($HTTP_GET_VARS['sort_by']) : '';
		if ($order_by == 'standard')
		{
			$order_by_str = 'c.cat_order, f.forum_order, lp.post_time asc, p.post_time';
and while it parses properly (doesn't give me an error) nothing seems to change. I have little experience when it comes to this, but can generally find my way if poked in the right direction.

Has anyone else experienced a simmilar issue? I hope that it sholdn't be too difficult to change this.

Thanks for this great mod btw :)

Cheers.

Post Reply

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