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: 3956
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Thu Aug 31, 2006 8:53 pm

ppcsurfr wrote:
MarkDHamill wrote:Not yet, but this sounds like a feature that I should add in a subsequent version.

phpBB itself converts the post time to your local timezone based on your profile. That is why it matches your clock. phpBB stores posts date times I believe in Universal Time. The +8 hours that you are seeing is your board's offset from GMT set in the Administrator Control Panel. Without using localization in a profile, the simplest way was simply to report all posts in the board time zone.


I would settle for a correct time stamp even if included the offset.

If ou'll see my previous post, my actual post which already converts it to my timezone shows that the post was made at Posted: 25 Aug 2006 02:20 am my local time. The correct universal time with offset should have shown as 24 August 18:20 pm GMT +0800 in the Smartfeed result, but it shows this instead.

Code: Select all

<description><em>ppcsurfr</em> wrote at <em>24 Aug 2006 11:20 AM GMT + 8 Hours</em>
It shows two converted times... first, the time as it is posted in Smartfeed and the second, hidden in the XML as published date.

I'm experiencing double time conversions. Is there a way to fix this?


There is a philosophical issue of what is the correct timestamp. With RSS and Atom I believe date/time fields per the specification are supposed to follow RFC 822, which I believe means convert the time to GMT. When showing a post as an item in a newsfeed, then the time showing there becomes a matter of taste. I agree that seeing it in the user's natural timezone as defined as their timezone in their profile is preferred, and clearly I didn't think about that before. I will add it to a future version.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Post by MarkDHamill » Thu Aug 31, 2006 8:54 pm

Fridmarr wrote: Has anyone had any luck using this mod with the Plus version of phpbb? When I click on the Generate URL button I get a few Javascript errors, mostly "object expected" stuff.

EDIT: I also noticed that if I'm not logged in, it works fine.


I don't know what the Plus version of phpBB is. There are many variants. This one, like all official mods, was developed off the current phpBB baseline with no modifications.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Fridmarr
Registered User
Posts: 11
Joined: Fri Jun 24, 2005 9:43 pm

Post by Fridmarr » Thu Aug 31, 2006 9:24 pm

MarkDHamill wrote:
Fridmarr wrote:Has anyone had any luck using this mod with the Plus version of phpbb? When I click on the Generate URL button I get a few Javascript errors, mostly "object expected" stuff.

EDIT: I also noticed that if I'm not logged in, it works fine.


I don't know what the Plus version of phpBB is. There are many variants. This one, like all official mods, was developed off the current phpBB baseline with no modifications.


Well of course, which is why my question was stated as it was. The plus version, www.phpbb2.de, is pretty much just a heavily premodded version of phpbb with a pseudo portal front page. Most of the original architecture is still intact, but the templates are a bit different.

Fridmarr
Registered User
Posts: 11
Joined: Fri Jun 24, 2005 9:43 pm

Post by Fridmarr » Thu Aug 31, 2006 9:29 pm

There is a philosophical issue of what is the correct timestamp. With RSS and Atom I believe date/time fields per the specification are supposed to follow RFC 822, which I believe means convert the time to GMT. When showing a post as an item in a newsfeed, then the time showing there becomes a matter of taste. I agree that seeing it in the user's natural timezone as defined as their timezone in their profile is preferred, and clearly I didn't think about that before. I will add it to a future version.


You should send it in GMT, it's the reader's responsiblity to modify it to the local timezone. If you modify it, you risk it being converted twice and the end user sees bad data, as opposed to correct data that is simply unformatted.

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

Post by MarkDHamill » Sat Sep 16, 2006 11:16 pm

Bug found

Since this code is based off my Digests mod, and a bug turned up there, it also could potentially effect this mod.

Surprised I haven't seen this one before. In some cases when you add forums after the Smartfeed software is first deployed, the new forums may not show up.

To fix, change line 132 in smartfeed_url.php from:

Code: Select all

	if (!(($j>0) && ($cat_orders[$j] == $cat_orders[$j-1]) && ($forum_orders[$j] == $forum_orders[$j-1]))) 
to:

Code: Select all

	if (!(($j>0) && ($cat_orders[$j] == $cat_orders[$j-1]) && ($forum_orders[$j] == $forum_orders[$j-1]) && ($forum_names[$j] == $forum_names[$j-1]))) 
Will add this bug fix to the next version.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Mon Sep 18, 2006 7:03 pm

Fridmarr wrote:
MarkDHamill wrote:
Fridmarr wrote:Has anyone had any luck using this mod with the Plus version of phpbb? When I click on the Generate URL button I get a few Javascript errors, mostly "object expected" stuff.

EDIT: I also noticed that if I'm not logged in, it works fine.


I don't know what the Plus version of phpBB is. There are many variants. This one, like all official mods, was developed off the current phpBB baseline with no modifications.


Well of course, which is why my question was stated as it was. The plus version, www.phpbb2.de, is pretty much just a heavily premodded version of phpbb with a pseudo portal front page. Most of the original architecture is still intact, but the templates are a bit different.


Not that it helps much but I've got exactly the same issue on 4WM - which runs IntegraMod. Again it works fine if not logged in, but if logged in I get java errors on two lines which look just fine.

Now as far as I know all was fine until the installation of the recent batch of security fixes.

Any chance you can take a look Mark as it looks like it is happening across a fair number of Modded sites.

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

Post by MarkDHamill » Mon Sep 18, 2006 9:40 pm

Sorry, there are SO many mods out there I really don't have the time to develop work arounds even for the most likely ones out there. I'd have to configure a whole new board just to test it. Others are welcome to give it a try.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Mon Sep 18, 2006 9:49 pm

Feel free to register on my site, try to generate the feed as a registered user and see if the errors mean anyhting to you. At least that might help us all out, if not I'll have to drop Smartfeed and go back to a basic feed again :(

GalaKev
Registered User
Posts: 26
Joined: Thu Jan 05, 2006 4:43 pm
Contact:

Post by GalaKev » Wed Sep 20, 2006 10:33 am

Great Mod & It works just fine, with me trying it out with another moderator.

One problem is stopping me going live with it. I dont use the standard sub-silver, but use FFS template. I copied the templates files into the FFS directory as well.

When I run smarteed_url.php. All looks fine and comes through in colours, as per the forum. Its the generate URL line I have problems with.

My main body of text is white, gold titles, black background and a two tone grey table boxes.

The box which brings up the URL is white and with white text it does not show until double clicked on.

Now I tried to change all the colours to try and get this box to change, so I can see the white text, but I have not been able to do so.

The funny thing I noticed is that if I use any other colour for the text, when I generate url the URL is black. Whether that be gold, red or any other colour.

I am really confussed and spent days trying to change this little box or at least get the url text to come through in another colour.

I don't really want to change the main body of text from white as this fits in with the rest of the website.

Any help would be greatly appreciated.

If I don't make sense, please look at http://www.berwickforums.co.uk/phpBB2/smartfeed_url.php It should hopefully make sense from seeing it.

Thanks in Advance
Kev

Rebell
Registered User
Posts: 93
Joined: Tue Nov 08, 2005 8:31 am
Contact:

Post by Rebell » Wed Sep 20, 2006 11:32 am

Hello,

its not workin anymore for me...
http://forum.deltaforceteam.de/smartfeed_url.php
The error is: Limit parameter is not a recognized value.

:?:
OLDSKOOLDEMOMAKER FORUMS : http://kickme.to/osdm
make demos like in the good old days on amiga or c64 without programming knowledge !

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

Post by MarkDHamill » Wed Sep 20, 2006 11:35 am

smartfeed_url_body.tpl is of course based on the subSilver theme but it should work fine for any theme, because it doesn't carry any code that displays specific colors. It does carry certain tag attributes like class="row2" and class="gen" that assume your theme has an underlying and attached cascading style sheet that will render appropriate colors that match your theme.

Here is the code that generates the text box where the URL appears:

Code: Select all

	  <tr>
		<td colspan="2" align="center" class="row1" style="padding: 5px;"><span class="gen"><input type="text" name="url" id="url" size="120" maxlength="3000" /></span></td>
	  </tr>
I would check your theme's cascading style sheet to see how it renders class="row1" and class="gen". The problem is likely there. You might want to overwrite the template to specify the colors and background colors you want.

A good reference for style sheets is:

http://www.w3schools.com/css
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Fridmarr
Registered User
Posts: 11
Joined: Fri Jun 24, 2005 9:43 pm

Post by Fridmarr » Wed Sep 20, 2006 11:02 pm

tekguru wrote: Feel free to register on my site, try to generate the feed as a registered user and see if the errors mean anyhting to you. At least that might help us all out, if not I'll have to drop Smartfeed and go back to a basic feed again :(


If you are getting the exact same error I was, it is just a matter of uncommenting those lines in the template. I think the code block that Mark posted will fix it. I'm not sure how I got a template that had those lines commented out, as I did download them from the link he provided. I'm not on the machine I downloaded them too so I can't verify it at the moment, but when I get a chance I'll examine the original zip file and FTP logs and see if there was a problem of some sort.

noobnight
Registered User
Posts: 8
Joined: Fri Sep 22, 2006 4:21 pm

Post by noobnight » Fri Sep 22, 2006 8:14 pm

Hi how can i show only the first Post i dont need replay posts.
Sort by t.topic_id desc ??? please help..

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

Post by MarkDHamill » Fri Sep 22, 2006 10:10 pm

The only thing you can do is show new topics only. If you select by Post Date/Time that should retrieve the first message as well as any replies for new topics only. However, it won't limit it to JUST the first post of the new topic.

However, if you are integrating the feed into something else you could write a little program, say using the MagpieRSS parser, to only pick the first item.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Post by MarkDHamill » Sat Sep 23, 2006 2:35 am

Serious bug found

Another one of these where I am scratching my head wondering how no one has seen this before, including me.

Private forums can potentially be seen and selected. This happens because the phpbb_groups table creates a group for every user to maintain referential integrity. Most rows in this table have a column where group_single_user = 1. These have to be filtered out.

So in smartfeed_url.php starting at line 96 replace:

Code: Select all

	$sql = 'select distinct a.forum_id, f.forum_name, c.cat_order, f.forum_order, f.auth_read
		from ' . AUTH_ACCESS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
		where ug.user_id = ' . $userdata['session_user_id']
		. ' and ug.user_pending = 0 
		and a.group_id = ug.group_id and 
		a.forum_id = f.forum_id and f.cat_id = c.cat_id';

with:

Code: Select all

	$sql = 'select distinct a.forum_id, f.forum_name, c.cat_order, f.forum_order, f.auth_read
		from ' . AUTH_ACCESS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c, ' . GROUPS_TABLE . ' g
		where ug.user_id = ' . $userdata['session_user_id']
		. ' AND ug.user_pending = 0 
		AND a.group_id = ug.group_id AND ug.group_id = g.group_id AND g.group_single_user <> 1 AND 
		a.forum_id = f.forum_id AND f.cat_id = c.cat_id';
Similarly, in smartfeed.php at line 220 replace:

Code: Select all

			$sql = 'SELECT DISTINCT a.forum_id, f.forum_name, c.cat_order, f.forum_order
				FROM ' . AUTH_ACCESS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c
				WHERE ug.user_id = ' . $user_id
				. ' AND ug.user_pending = 0 
				AND a.group_id = ug.group_id AND 
				a.forum_id = f.forum_id AND f.cat_id = c.cat_id';

with:

Code: Select all

			$sql = 'SELECT DISTINCT a.forum_id, f.forum_name, c.cat_order, f.forum_order
				FROM ' . AUTH_ACCESS_TABLE . ' a, ' . USER_GROUP_TABLE . ' ug, ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c, ' . GROUPS_TABLE . ' g
				WHERE ug.user_id = ' . $user_id
				. ' AND ug.user_pending = 0 
				AND a.group_id = ug.group_id AND ug.group_id = g.group_id AND g.group_single_user <> 1 AND
				a.forum_id = f.forum_id AND f.cat_id = c.cat_id';
Changes will be made to subsequent versions, of course.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

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