phpBB Smartfeed

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

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
gs2088c
Registered User
Posts: 243
Joined: Thu Dec 03, 2009 7:09 pm

Re: phpBB Smartfeed

Post by gs2088c » Thu Dec 24, 2009 6:31 am

Two things Mark; the first one is to answer your question, and the second is to point something out, before someone says it was the cause of another issue in another post (not for your mod), so please don't take the second comment as directed to you, OK?

COMMENT TO YOU: It works, it was "my bad"; I have NOSCRIPT add-on for FF; I forgot to allow your site to temporarily run scripts. :oops: As I would say to my son "Sorry Charlie" -- yep, that is his name!

COMMENT TO ANYONE ABOUT MY POST CONCERNING PROBLEM WITH DATABASE_UPDATE.PHP. This does not apply; the site I was upgrading was on the permanent allow list, so it would have not been affected!
Mainframe Computer Operations (8 years)
Mainframe Technical Support (5 years)
Tandem System Admin (8 years)
Tandem DBA (15 years)
What is the one real database? Tandem Non-Stop :mrgreen:

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

Version 2.2.17 ready for download

Post by MarkDHamill » Thu Dec 24, 2009 3:58 pm

Just in time for the holidays!

Download here

Changes in this version:

* Database changes and the ACP module installation are now done using UMIL. At this time, this applies to install only, not changes.
* ACP interface allows an administrator to add an optional list of required forums that must appear in every feed.
* ACP interface allows an administrator to add an optional list of excluded forums that must never appear in any feed.
* Fixed bug with logout method.
* {S_FORM_TOKEN} removed from templates. Not needed as no form is actually submitted resulting in a database change.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
eblom00
Registered User
Posts: 36
Joined: Sat May 21, 2005 5:24 pm
Contact:

Re: phpBB Smartfeed

Post by eblom00 » Thu Dec 24, 2009 10:10 pm

Mark,
Thank you for your extremely useful RSS MOD. I seem to have my site working, but, only after changing the kill_session function as you suggested in August 2009 ( http://www.phpbb.com/community/viewtopi ... #p10548935 ). I don't know much about RSS feeds so I used a feed validator to identify the problem ( http://beta.feedvalidator.org/ ).

Without the changes to the kill_session function I was getting

Code: Select all

[phpBB Debug] PHP Notice: in file smartfeed.php on line 705: include(./includes/auth/auth_logout_db.php) function.include: failed to open stream: No such file or directory
Should I have to modify 2.2.17 in this way?

Thanks,
Eric

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

Re: phpBB Smartfeed

Post by MarkDHamill » Thu Dec 24, 2009 10:17 pm

Which version of Smartfeed are you using?
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
eblom00
Registered User
Posts: 36
Joined: Sat May 21, 2005 5:24 pm
Contact:

Re: phpBB Smartfeed

Post by eblom00 » Thu Dec 24, 2009 10:24 pm

Hi Mark,
Thanks for your reply. I'm using 2.2.17.

Code: Select all

<?php
/** 
*
* @package phpBB3
* @version $Id: smartfeed.php, v 2.2.17 Production 2009/06/10 mark@phpbbservices.com Exp $
* @copyright (c) Mark D. Hamill (mhamill@computer.org, http://phpbbservices.com) 
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License 
*
*/
Eric

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

Re: phpBB Smartfeed

Post by MarkDHamill » Thu Dec 24, 2009 11:18 pm

Please change line 705 in smartfeed.php to:

Code: Select all

		include($phpbb_root_path . 'includes/auth/auth_' . basename(trim($config['auth_method'])) . '.' . $phpEx);
This code does not execute for me so I could not test it. Thanks for finding the bug. I will repack the archive.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
gs2088c
Registered User
Posts: 243
Joined: Thu Dec 03, 2009 7:09 pm

Re: phpBB Smartfeed

Post by gs2088c » Sat Dec 26, 2009 7:57 am

Any idea why I'm getting this?
================================================
Internet Explorer cannot display this feed

This feed contains code errors.
Go back to the previous page.

More information

Only one top level element is allowed in an XML document.
Line: 1292 Character: 2

<br />
================================================
Did 2.2.15 to 2.2.16 then 2.2.17

Thanks.
Mainframe Computer Operations (8 years)
Mainframe Technical Support (5 years)
Tandem System Admin (8 years)
Tandem DBA (15 years)
What is the one real database? Tandem Non-Stop :mrgreen:

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

Re: phpBB Smartfeed

Post by MarkDHamill » Sat Dec 26, 2009 3:22 pm

Can you print out the code around the error?
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
gs2088c
Registered User
Posts: 243
Joined: Thu Dec 03, 2009 7:09 pm

Re: phpBB Smartfeed

Post by gs2088c » Sat Dec 26, 2009 3:53 pm

MarkDHamill wrote:Can you print out the code around the error?
I tried to create a feed, clicked "GENERATE", then "TEST", and I got the error. I hope that is will help!
Mainframe Computer Operations (8 years)
Mainframe Technical Support (5 years)
Tandem System Admin (8 years)
Tandem DBA (15 years)
What is the one real database? Tandem Non-Stop :mrgreen:

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

Re: phpBB Smartfeed

Post by MarkDHamill » Sat Dec 26, 2009 6:01 pm

Please run it in the browser, then do a view source and paste the lines near where the error is occurring.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
gs2088c
Registered User
Posts: 243
Joined: Thu Dec 03, 2009 7:09 pm

Re: phpBB Smartfeed

Post by gs2088c » Sat Dec 26, 2009 11:03 pm

MarkDHamill wrote:Please run it in the browser, then do a view source and paste the lines near where the error is occurring.
Dan:

Here's what you asked for. Here is what I do:

1. I have a "site" on my local PC that I make the changes and test.
2. If they are AOK, I then use beyond compare program (see attached) to open up the files in http://localhost/00phpbbchg/ and http://localhost/offline copy of the online board/, and make the changes there.
3. I make the appropriate DB changes to the offline copy.
4. I test it on the offline copy
5. If they are good, I migrate the changes on line.

This is the best way for me to insure that the on-line site is updates correctly. This is especially true, because I now have more than one site on the internet, and this allows me to make sure that they both are perfect, before updating it on line.

Now, after all the above was said, I was able to determine this:

1. Online, 2.2.15 works AOK in IE8 and FF 3.5.6
2. Offline, 2.2.15 works AOK in IE8 and FF 3.5.6
3. Offline, 2.2.17 works AOK in FF 3.5.6
4. Offline, 2.2.17 doesn't work in IE8 (this is what the below is)

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.8.0-dev (info@mypapit.net)" -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>******00phpbbchg******00phpbbchg******00phpbbchg******</title>
        <description></description>
        <link>http://localhost/00phpbbchg/board2/smartfeed.php?u=2&e=Z-3Jy7_ZE2pLEsSQnpVHo_LCDsAlWMMDACF9XxxhkxWDlWDsGXax4g..&lastvisit=1&limit=LF&count_limit=500&sort_by=user&feed_type=RSS2.0&feed_style=HTML</link>
        <lastBuildDate>Sat, 26 Dec 2009 17:38:43 GMT</lastBuildDate>
        <generator>FeedCreator 1.8.0-dev (info@mypapit.net)</generator>
<atom:link href="http://localhost/00phpbbchg/board2/smartfeed.php?u=2&e=Z-3Jy7_ZE2pLEsSQnpVHo_LCDsAlWMMDACF9XxxhkxWDlWDsGXax4g..&lastvisit=1&limit=LF&count_limit=500&sort_by=user&feed_type=RSS2.0&feed_style=HTML" rel="self" type="application/rss+xml" />
        <image>
            <url>http://localhost/00phpbbchg/board2/styles/prosilver/imageset/site_logo.gif</url>
            <title>******00phpbbchg******00phpbbchg******00phpbbchg******</title>
            <link>http://localhost/00phpbbchg/board2/smartfeed.php?u=2&e=Z-3Jy7_ZE2pLEsSQnpVHo_LCDsAlWMMDACF9XxxhkxWDlWDsGXax4g..&lastvisit=1&limit=LF&count_limit=500&sort_by=user&feed_type=RSS2.0&feed_style=HTML</link>
        </image>
        <language>en-GB</language>
        <pubDate>Sat, 26 Dec 2009 22:38:43 GMT</pubDate>
        <ttl>60</ttl>
    </channel>
</rss>
<br />
<b>Fatal error</b>:  Cannot redeclare login_db() (previously declared in C:\MyData\My Web Sites\00phpbbchg\board2\includes\auth\auth_db.php:27) in <b>C:\MyData\My Web Sites\00phpbbchg\board2\includes\auth\auth_db.php</b> on line <b>196</b><br />
Mainframe Computer Operations (8 years)
Mainframe Technical Support (5 years)
Tandem System Admin (8 years)
Tandem DBA (15 years)
What is the one real database? Tandem Non-Stop :mrgreen:

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

Re: phpBB Smartfeed

Post by MarkDHamill » Sun Dec 27, 2009 12:06 am

Starting around line 687 in smartfeed.php, replace the kill_session function 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']));
	include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);

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

	return;
}
I tried to avoid using include_once. I should not have as phpBB uses it in session.php.

This looks like a big enough bug to repack the archive.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
gs2088c
Registered User
Posts: 243
Joined: Thu Dec 03, 2009 7:09 pm

Re: phpBB Smartfeed

Post by gs2088c » Thu Dec 31, 2009 3:35 am

I finally had a change to test out the changes (above), and it works great. But I do have one question, before final implementation on line (it will be, I just have this question).

When I upgrade SF, what happens with the previous feeds. Are they still good, or will SF make the user recreate the URL?
Mainframe Computer Operations (8 years)
Mainframe Technical Support (5 years)
Tandem System Admin (8 years)
Tandem DBA (15 years)
What is the one real database? Tandem Non-Stop :mrgreen:

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

Re: phpBB Smartfeed

Post by MarkDHamill » Thu Dec 31, 2009 3:45 am

This is not usually a problem. It would only matter if I change the logic for encrypting keys. I can't see that happening any time soon. Generally I put out a notice in the DIY instructions of the mod if there are impacts like this.

If the event, the user will simply get a message in the feed pointing them to the site to upgrade their encryption key.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
gs2088c
Registered User
Posts: 243
Joined: Thu Dec 03, 2009 7:09 pm

Re: phpBB Smartfeed

Post by gs2088c » Thu Dec 31, 2009 5:07 pm

MarkDHamill wrote:This is not usually a problem. It would only matter if I change the logic for encrypting keys.
Thanks for the reply. This got me thinking, and a question comes up. If the Admin adds a required forum after the person gets their Smartfeeed URL generated, what happens then? Do they still get the required forums, or does it just have to wait until they generate it the next time? If they have to wait, it might be a good idea on somehow to check to make sure they are getting the required forums, and if not either send it automatically, or invalidate the feed.
Mainframe Computer Operations (8 years)
Mainframe Technical Support (5 years)
Tandem System Admin (8 years)
Tandem DBA (15 years)
What is the one real database? Tandem Non-Stop :mrgreen:

Locked

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

Who is online

Users browsing this forum: No registered users and 6 guests