[MODDB] Smartfeed for phpBB 3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Locked
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

It's in the archive. The instructions are in the /contrib folder and the template itself is in /contrib/subsilver/template.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
User avatar
Ratmaster
Registered User
Posts: 163
Joined: Sun Feb 12, 2006 3:14 pm
Location: New Jersey, USA

Re: [RC5] Smartfeed for phpBB 3

Post by Ratmaster »

Oh, nevermind, sorry.
I must have not seen the file.
Thanks!

P.S. If a user who does not have permissions to view a hidden forum types in forum=# that equals the ID of a hidden forum, will they see feeds from that forum?
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

That should not happen. The code in smartfeed.php is quite extensive to make sure that people can only select from forums where they have read permissions, even if they hack the URL parameters.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
User avatar
Ratmaster
Registered User
Posts: 163
Joined: Sun Feb 12, 2006 3:14 pm
Location: New Jersey, USA

Re: [RC5] Smartfeed for phpBB 3

Post by Ratmaster »

Great, thanks! :D
xenador
Registered User
Posts: 89
Joined: Wed Nov 22, 2006 1:27 am

Re: [RC5] Smartfeed for phpBB 3

Post by xenador »

does the update logic only show to the admin or does it show to all users?
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

Not sure what you mean. If you mean the code showing the current version, that appears only to administrators.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
KO Dave
Registered User
Posts: 41
Joined: Fri Mar 28, 2008 8:07 am

Re: [RC5] Smartfeed for phpBB 3

Post by KO Dave »

I get the follow error when I try to modify my Smartfeed setting in my ACP:

Code: Select all

General Error
SQL ERROR [ mysqli ]

Duplicate entry 'sf_require_ip_authentication' for key 1 [1062]

SQL

INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('sf_require_ip_authentication', 0, 0)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/functions.php
LINE: 156
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_board.php
LINE: 445
CALL: set_config()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_board->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
Anyone know whats going on?
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

It sounds like you ran the installation SQL twice.

You can use this SQL in phpMyAdmin to see the smartfeed config variables, then compare with what's in the installation instructions and see if anything is missing.

Code: Select all

select * from phpbb_config where config_name like 'sf_%';
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
KO Dave
Registered User
Posts: 41
Joined: Fri Mar 28, 2008 8:07 am

Re: [RC5] Smartfeed for phpBB 3

Post by KO Dave »

Thanks, I was able to clear it out and reset things.

Now I am getting this error when I try to set up a feed

Code: Select all

The error is: limit parameter is either not present or is not an allowed value.
The limit I set in the admin settings is 90 days, which is what I select when trying to set up my feed. The max number of posts is 100 and I only want 20 for the feed. Regardless of what I put or don't put in the minimum word count box, it still gives me the error.

What am I doing wrong?
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

This can happen if the Smartfeed URL was edited to remove the limit parameter (ex: limit=1%20DAY) or if the limit parameter was hacked to be something than one of the defaults (ex: limit=XYZ). It can also occur if you are trying to use the limit=LF parameter as a public user.

These are the allowed values, and get embedded in smartfeed_url.php in the HTML:

Code: Select all

// Begin -- Do NOT Change these keys or values when writing a language translation!
// These constants should be moved from the language file!!!
$smartfeed_time_limit_unregistered = array(
	'SMARTFEED_NO_LIMIT_VALUE'			=> 'NO_LIMIT',
	'SMARTFEED_LAST_QUARTER_VALUE'		=> '3 MONTH',
	'SMARTFEED_LAST_MONTH_VALUE'		=> '1 MONTH',
	'SMARTFEED_LAST_TWO_WEEKS_VALUE'	=> '14 DAY',
	'SMARTFEED_LAST_WEEK_VALUE'			=> '7 DAY',
	'SMARTFEED_LAST_DAY_VALUE'			=> '1 DAY',
	'SMARTFEED_LAST_12_HOURS_VALUE'		=> '12 HOUR',
	'SMARTFEED_LAST_6_HOURS_VALUE'		=> '6 HOUR',
	'SMARTFEED_LAST_3_HOURS_VALUE'		=> '3 HOUR',
	'SMARTFEED_LAST_1_HOURS_VALUE'		=> '1 HOUR',
	'SMARTFEED_LAST_30_MINUTES_VALUE'	=> '30 MINUTE',
	'SMARTFEED_LAST_15_MINUTES_VALUE'	=> '15 MINUTE',
);

$smartfeed_time_limit_registered = array_merge($smartfeed_time_limit_unregistered, array(
	'SMARTFEED_SINCE_LAST_VISIT' => 'LF',
));
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
KO Dave
Registered User
Posts: 41
Joined: Fri Mar 28, 2008 8:07 am

Re: [RC5] Smartfeed for phpBB 3

Post by KO Dave »

I'm trying to use it as a public user because I'm trying use the feed to be displayed on my website. Is there a way around this? I used an older release of this mod as a public user for the same purpose in the past.

This is the feed I'm trying to get to work:

http://www.thenafw.com/forum/smartfeed. ... _size=6000

Code: Select all

http://www.thenafw.com/forum/smartfeed.php?forum=4&firstpostonly=1limit=3%20MONTH&count_limit=20&sort_by=standard_desc&min_word_size=1&feed_type=RSS2.0&feed_style=HTML&max_word_size=6000
KO Dave
Registered User
Posts: 41
Joined: Fri Mar 28, 2008 8:07 am

Re: [RC5] Smartfeed for phpBB 3

Post by KO Dave »

I figured it out, I think...

When the script generates the URL, it leaves out an "&" symbol before the limit parameter.

So this...

Code: Select all

http://www.thenafw.com/forum/smartfeed.php?forum=4&firstpostonly=1limit=3%20MONTH&count_limit=20&sort_by=standard_desc&min_word_size=1&feed_type=RSS2.0&feed_style=HTML&max_word_size=6000

Code: Select all

http://www.thenafw.com/forum/smartfeed.php?forum=4&firstpostonly=1&limit=3%20MONTH&count_limit=20&sort_by=standard_desc&min_word_size=1&feed_type=RSS2.0&feed_style=HTML&max_word_size=6000
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

The bug is probably here in /style/template/smartfeed_body.html:

Code: Select all

		// Add the time limit - Do we want to put nothing for no limit? Or limit=no_limit? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		if (logged_in)
		{
			url = url + "&limit=" + news_id.post_limit.value;
		}
		else
		{
			url = url + "limit=" + news_id.post_limit.value;
		}
Should be:

Code: Select all

		// Add the time limit - Do we want to put nothing for no limit? Or limit=no_limit? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		if (logged_in)
		{
			url = url + "&limit=" + news_id.post_limit.value;
		}
		else
		{
			url = url + "&limit=" + news_id.post_limit.value;
		}
This is only manifest when not logged in.

Will correct in the next version. Meanwhile, please make the change and refresh the template for the style.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: [RC5] Smartfeed for phpBB 3

Post by EXreaction »

Why have you set this up so that in page_header you are calling $user->setup? :|
User avatar
MarkDHamill
Registered User
Posts: 4349
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

EXreaction wrote:Why have you set this up so that in page_header you are calling $user->setup? :|
The code change is:

Code: Select all

	// BEGIN Smartfeed 2.0 Modification
	$user->setup('mods/smartfeed');
	// END Smartfeed 2.0 Modification
So all this does is add some new language variables needed for the mod. In this case they are used because changes are made to overall_header.html that reference new language variables.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. eBook and paper versions available.
Locked

Return to “[3.0.x] MODs in Development”