Page 4 of 17

Re: phpBB Smartfeed

Posted: Tue Aug 18, 2009 7:24 pm
by brian3
Out of 511 users, only 4 of them aren't using prosilver, so I only did the code modifications for that theme. Of course my luck would have it that the 2 guinea pigs for the RSS feed both happen to be using subsilver2.

So problem solved. It was my own oversight that backfired. :oops:

Now if only the guys would finish the LastRSS mod so that I can import other websites' RSS feeds into my own forums.....


Anyway, thanks again for the help and for the great mod.

Re: phpBB Smartfeed

Posted: Wed Aug 19, 2009 3:59 am
by MarkDHamill
You can run the Smartfeed interface manually by executing the program smartfeed_url.php from your phpBB root directory.

Re: phpBB Smartfeed

Posted: Fri Aug 21, 2009 1:59 am
by MarkDHamill
sponkey wrote:Thanks for the solution. I changed the line of code suggested, but I'm still getting the same message attached to my RSS feeds. Any further suggestions?
Replace the kill_session function starting around line 649 with the following:

Code: Select all

function kill_session ($new_session=true)
{

	// Kill the sessions we consumed. We don't want to use session_kill() because it updates user_lastvisit,
	// which we don't necessarily want to do since the user may want to visit the board later and see
	// messages in the feed as unread.
	
	global $db, $user, $config, $phpEx, $phpbb_root_path;
	
	$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
			WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
				AND session_user_id = " . (int) $user->data['session_id'];
	$db->sql_query($sql);
	
	// Allow connecting logout with external auth method logout
	$method = basename(trim($config['auth_method']));
	$method = 'logout_' . $method;
	if (!(function_exists($method)))
	{
		include($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
	}
	$method($user->data, $new_session);

	return;
}

Re: phpBB Smartfeed

Posted: Fri Aug 21, 2009 11:47 am
by sponkey
Now I'm getting a different error:

Code: Select all

<b>[phpBB Debug] PHP Notice</b>: in file <b>/smartfeed.php</b> on line <b>667</b>: <b>include(./includes/auth/auth_logout_db.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory</b><br />
<b>[phpBB Debug] PHP Notice</b>: in file <b>/smartfeed.php</b> on line <b>667</b>: <b>include() [<a href='function.include'>function.include</a>]: Failed opening './includes/auth/auth_logout_db.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php')</b><br />
<br />
<b>Fatal error</b>:  Call to undefined function logout_db() in <b>/home/.detour/iggsoft/forums.iggsoft.com/smartfeed.php</b> on line <b>669</b><br />

Re: phpBB Smartfeed

Posted: Fri Aug 21, 2009 11:56 am
by MarkDHamill
Okay, I may get in trouble for this with the phpBB Mod Team, because they don't seem to like include_once, but copying from their own code in session.php this should work. Replace kill_session function in smartfeed.php with this:

Code: Select all

function kill_session ($new_session=true)
{

	// Kill the sessions we consumed. We don't want to use session_kill() because it updates user_lastvisit,
	// which we don't necessarily want to do since the user may want to visit the board later and see
	// messages in the feed as unread.
	
	global $db, $user, $config, $phpEx, $phpbb_root_path;
	
	$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
			WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
				AND session_user_id = " . (int) $user->data['session_id'];
	$db->sql_query($sql);
	
	// Allow connecting logout with external auth method logout
	$method = basename(trim($config['auth_method']));
	include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);

	$method = 'logout_' . $method;
	if (function_exists($method))
	{
		$method($user->data, $new_session);
	}

	return;
}

Re: phpBB Smartfeed

Posted: Fri Aug 21, 2009 12:17 pm
by sponkey
That did the trick - thanks!

Version 2.2.13 available on my web site

Posted: Fri Aug 21, 2009 6:58 pm
by MarkDHamill
I fixed the errors found, principally in the kill_session function. A new version is available on my website here. I will place it in the queue so it will be available on this site also.

Re: phpBB Smartfeed

Posted: Mon Aug 24, 2009 4:29 pm
by MarkDHamill
Version 2.2.13 now includes an updated German translation thoughtfully provided by Aaron Spettl.

Re: phpBB Smartfeed

Posted: Sat Aug 29, 2009 8:40 pm
by Mickroz
i just upgraded to 2.2.13 and now im getting this.
i double checked everything and even reinstalled in fresh, still no change.
Webpage error details

Code: Select all

Message: Syntax error
Line: 357
Char: 2
Code: 0
URI: http://www.psychonights.com/smartfeed_url.php
my page look likes this now.
Image

any ideas?

Re: phpBB Smartfeed

Posted: Sat Aug 29, 2009 8:44 pm
by MarkDHamill
I ran your URL as a public user and had no problems. Is this limited to being logged in?

Re: phpBB Smartfeed

Posted: Sat Aug 29, 2009 9:15 pm
by Mickroz
its ok now, i forgot to delete the old smartfeed_body.html from prosilver SE.
thanks for checking mark, and congrats with the moddb release,keep it up!

Re: phpBB Smartfeed

Posted: Sun Aug 30, 2009 10:03 am
by Mickroz
just 1 thing tho, when going to the faq page i get

Code: Select all

[phpBB Debug] PHP Notice: in file /language/nl/help_faq.php on line 345: Undefined variable: phpbb_root_path
i added

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
to the help_faq.php and now its gone,but i saw on your site that you don't have this error.

Re: phpBB Smartfeed

Posted: Sun Aug 30, 2009 11:45 am
by MarkDHamill
Thanks. I will make this correction in a subsequent version.

Re: phpBB Smartfeed

Posted: Tue Sep 01, 2009 8:27 pm
by JakeL
A wonderful mod - thank you very much !

I suspect the install and setup might be a bit daunting for some users (maybe something to try to automate further in subsequent releases ?) - but it's well worth the effort once you you get everything sorted out.

I ran into several of the challenges mentioned above (and a few of my own), but the 2.1.13 release helped with much of that (I do hope the mod team approves that soon !) and I managed to sort out most of the rest myself.

I'm still 'putting it through the ringer', but a few comments / suggestions so far :
  • - For 'anonymous' (no user / not logged in) feeds, the first 'url parameter' for the generated link will have a 'surplus' ampersand before it - ergo .../smartfeed.php?&limit=1_DAY... (notice the '?&' there); while this still works fine, perhaps a bit 'unpretty'.

    - I do also want to use other styles / templates for my board; toward this end, it would be very helpful if the directions for 'tweaking' proSilver were accompanied by brief explanations of what each change 'does' (or perhaps in a separate document ?) - so the user doesn't have to know the 'inner workings' of phpBB quite so well to adapt them suitably for other styles. (Maybe some day this will be a 'standard mod' that style designers will code for - we can hope ! ; )

    - A (per-feed) option for what all to include in the title - notably whether or not to include forum (and parents) names - would be very handy; as it is, I'll likely end up parsing those out for some feeds.

    - Letting admins set the 'default options' to offer users would be very nice.
Well, back to testing things further prior to rolling this into the 'production server' - but looking good so far !
Very nicely thought out and full featured - well done and thanks again !

Be well & enjoy -

- Jake

Re: phpBB Smartfeed

Posted: Tue Sep 01, 2009 9:43 pm
by MarkDHamill
Thanks for the suggestions, Jake. phpBB will integrate RSS in with version 3.2, or so I have been told, but I am not sure how feature rich it will be. I'll be leery investing too much time adding features until I see where that is going and if it will still be a compelling mod after that feature is released.