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
halifax--lad
Registered User
Posts: 47
Joined: Sun Mar 21, 2004 8:23 pm
Contact:

Post by halifax--lad »

Do you BOINC??

See our forum

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

Post by MarkDHamill »

I am trying to figure out why you would see no forums at all. If there are no public forums and EVERY forum is restricted, that could be one reason. But this would mean when you ARE logged in that you would see something.

If when you are logged in you still don't see anything when running smartfee_url.php my guess is that you have some sort of phpBB modification installed at changes the phpBB tables in such a way where the relations return a null set.

You can see an example on my forum:

http://www.potomactavern.org/smartfeed_url.php
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

scott_thewspot
Registered User
Posts: 202
Joined: Mon Dec 05, 2005 4:13 am
Location: Australia
Contact:

Post by scott_thewspot »

Hmm, It doesn't matter if I am logged in or not. I still only see the "Subscribed Forums" option.

Most of the forums are public, and you can see them and even participate in some without being logged in at all.

The only mod I have is "Users of the day" mod which only makes changes to a couple of the headers and footers. Nothing to the DB itself that I can tell.

I supposed it is probably relevant information, so if it allows for any other suggestions, I'm running on IIS6 and M$SQL2000. Perhaps it's a non-M$SQL query problem?

What sort of edits could I make to provide more debugging info? Or which particular SQL query is used to identify the forums that the form then displays?

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

Post by MarkDHamill »

It could be possible that there is something peculiar about the SQL used with MS SQL Server. In particular if it cannot support the IN qualifier you will be in trouble.

The vast majority of installations of course use MySQL, and it was developed with MySQL.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

scott_thewspot
Registered User
Posts: 202
Joined: Mon Dec 05, 2005 4:13 am
Location: Australia
Contact:

Post by scott_thewspot »

I figured since you had installation on offer for MSSQL on your services page that you may have already tested and had it working on MSSQL.

While I can pass as competent in SQL, I know very little about php. I found the SQL I think is the query for the forum list, but I'm n ot sure how to interpret the $auth_restrict variable which I assume is the IN qualifier you are referring to.

For what it's worth, this is the MSSQL reference for the IN statement.
http://msdn.microsoft.com/library/en-us ... z_8him.asp

Has anyone else got this working under MSSQL?

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

Post by MarkDHamill »

No, I did not test it with MS SQL Server, since my hosting environment is limited.

AUTH_ALL corresponds to 0 and AUTH_REG corresponds to 1. So non registered users should see SQL something like this:

Code: Select all

select f.forum_id, f.forum_name, c.cat_order, f.forum_order, f.auth_read
	from phpbb_forums f, phpbb_categories c
	where f.cat_id = c.cat_id and auth_read in (0) 
	order by c.cat_order, f.forum_order;
And registered users would see:

Code: Select all

select f.forum_id, f.forum_name, c.cat_order, f.forum_order, f.auth_read
	from phpbb_forums f, phpbb_categories c
	where f.cat_id = c.cat_id and auth_read in (0,1) 
	order by c.cat_order, f.forum_order;
You can run this SQL outside of phpBB and see what it gives you.

Whatever forums show up, private forums are added to the list, if any. All results are placed in arrays and sorted and try to give a presentation like the main index.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

scott_thewspot
Registered User
Posts: 202
Joined: Mon Dec 05, 2005 4:13 am
Location: Australia
Contact:

Post by scott_thewspot »

Interesting,

Both those queries seem to work fine, so there must be some bug in the way it is handling them as arrays maybe...

One step at a time I guess, but any further debugging tips?

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

Post by MarkDHamill »

This is the code that removed duplicates that may appear in the forum listing. You can try commenting out the lines shown with a // and see if you get a different result.

Code: Select all

	// Don't print if a duplicate

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

	//{    

		switch($auth_read[$j])
		{
			case AUTH_REG:
				$auth_label = $lang['smartfeed_auth_reg_text'];
				break;
			case AUTH_ACL:
				$auth_label = $lang['smartfeed_auth_acl_text'];
				break;
			case AUTH_MOD:
				$auth_label = $lang['smartfeed_auth_mod_text'];
				break;
			case AUTH_ADMIN:
				$auth_label = $lang['smartfeed_auth_admin_text'];
				break;
			default:
				$auth_label = '';
		}
			

		$template->assign_block_vars('forums', array( 
			'FORUM_NAME' => 'forum_' . $forum_ids [$j],
			'FORUM_LABEL' => $forum_names[$j],
			'FORUM_AUTH' => $auth_label));
	//}
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: 4025
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill »

Sorry, posted this in the wrong topic
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

scott_thewspot
Registered User
Posts: 202
Joined: Mon Dec 05, 2005 4:13 am
Location: Australia
Contact:

Post by scott_thewspot »

Not sure if the "removing duplicates" code comments was for me or not, but it doesn't make any difference....

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

Post by MarkDHamill »

I don't have any bright ideas other than doing some heavy debugging. And that's hard to do with the template system.

This is the first time that someone has reported this problem to my knowledge.

The SQL looks fine. Duplicates does not appear to be a problem. That leaves the array processing. It is hard for me to imagine how this would be a problem, since this is fundamental logic built into PHP.

I do need to add a debug switch to a future version that will show the SQL used for tracking down problems like these.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

scott_thewspot
Registered User
Posts: 202
Joined: Mon Dec 05, 2005 4:13 am
Location: Australia
Contact:

Post by scott_thewspot »

I've asked another friend who has strong php skills and also access to my server to help... if he has time and is able to work out the problem then I'll let you know the result.

Hopefully I can get it working as I'm thinking this will be an excellent addition and a much improved RSS service over the basic rss.php mod.

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

Post by MarkDHamill »

Yes, if there is a bug I would like to know about it. I don't know of any others who have installed this mod on MS SQL Server. I assume it is something peculiar to that.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

ppcsurfr
Registered User
Posts: 4
Joined: Mon Aug 07, 2006 11:52 pm

Post by ppcsurfr »

Code: Select all

 <description><em>ppcsurfr</em> wrote at <em>24 Aug 2006 11:20 AM GMT + 8 Hours</em>

Code: Select all

<pubDate>Thu, 24 Aug 2006 18:20:17 +0800</pubDate> 
snippets from a published item...

Time mismatch for the same entry.

This is the date that appears in the forums which is set at +8 GMT... which is correct and exactly the same as the time on my wall clock.

Code: Select all

Posted: 25 Aug 2006 02:20 am
I used the search function in this forum but couldn't find anything on it for Smartfeed.

The forum seems to display the time correctly with the localized time.

Is there a way to have smartfeed show the localized time in addition to the time in GMT with the time offset? Or probably add a timezone selector in Smartfeed for localized time?

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

Post by MarkDHamill »

ppcsurfr wrote: Is there a way to have smartfeed show the localized time in addition to the time in GMT with the time offset? Or probably add a timezone selector in Smartfeed for localized time?


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.
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”