[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
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC5] Smartfeed for phpBB 3

Post by IPB_Refugee »

Thanks for explanation, Mark!

At the moment I cannot reproduce the bug but I'll keep your words in mind. :) I really like your MOD!

Regards
Wolfgang
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC5] Smartfeed for phpBB 3

Post by IPB_Refugee »

Hi Mark,

is it dangerous to have lots of bogus sessions? Or will I just get a new highscore of "visitors"? I ask because I deactivated the function kill_sessions() now.

A suggestion: Please change the $smartfeed_time_limit_unregistered part in smartfeed language file or the <option value="{L_NO_LIMIT_VALUE}"> part in the template file because URLs with white spaces (like &limit=1%20MONTH) are soo nasty.

Thanks in advance! (I'm really looking forward to RC6.) :)
Wolfgang
User avatar
MarkDHamill
Registered User
Posts: 4353
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

Wolfgang, yes seeing %20 characters in URLs is a bit ugly, but I did the same thing in my phpBB 2 version and you are the first to complain.

I don't think there is anything necessarily dangerous about showing bogus sessions, it just gives an artificial impression of who is accessing the board and suggests people are logged in who are not actually logged in. Perhaps it would be better to have an ACP switch where administrator can choose whether or not to kill Smartfeed sessions automatically.
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
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC5] Smartfeed for phpBB 3

Post by IPB_Refugee »

MarkDHamill wrote:Wolfgang, yes seeing %20 characters in URLs is a bit ugly, but I did the same thing in my phpBB 2 version and you are the first to complain.
Yes, I am a very special Bonobo. ;) If you want, I can help you to improve the code regarding this issue. That should not be too difficult. (I stumbled upon it because I wanted to add a 3-day-limit but then I decided not to make too many changes on my own because that makes it more difficult to update MODs.)
MarkDHamill wrote:I don't think there is anything necessarily dangerous about showing bogus sessions, it just gives an artificial impression of who is accessing the board and suggests people are logged in who are not actually logged in. Perhaps it would be better to have an ACP switch where administrator can choose whether or not to kill Smartfeed sessions automatically.
Good idea. But the best solution would be when people didn't get logged out unintentionally. Unfortunately I don't have an idea how to realize that at the moment.

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

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

Well, I suppose I could add it as an option. But it removes the session only. If you are logged in to the board and walk away for an hour, you would be logged out too unless you had your settings set to log you in automatically.

Anyhow, I am being asked by the phpBB Mod Team to move things like 1 HOUR into constants. I could replace spaces with underscores easily enough, but in general I strive for backwards compatibility.
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.
Jos12
Registered User
Posts: 5
Joined: Sat Jul 26, 2008 2:28 pm

Re: [RC5] Smartfeed for phpBB 3

Post by Jos12 »

MarkDHamill wrote:The syntax error is there somewhere, just hiding.

I suggest commenting out blocks of inserted code and rerunning and see if that helps isolate where the error is occurring. It sounds like the problem is in the ACP, so I would start first with changes to the language files and see if that makes any difference. Pages may come up with blank text, but it will at least isolate the problem. Then narrow the range of comments until you get a blank screen. This will eventually point to the line with the syntax error.

In my experience, it is always something stupid that is staring you in the face causing these problems.
Thanks for the suggestion, you're right: I've had made an kind of mega-stupid mistake. :oops: I've overlooked the "));" part in acp/board.php. Thanks a lot for you help & guidance! :)
User avatar
IPB_Refugee
Registered User
Posts: 1290
Joined: Fri Jul 07, 2006 2:25 pm
Location: Austria
Name: Wolfgang Weber

Re: [RC5] Smartfeed for phpBB 3

Post by IPB_Refugee »

MarkDHamill wrote:Well, I suppose I could add it as an option. But it removes the session only. If you are logged in to the board and walk away for an hour, you would be logged out too unless you had your settings set to log you in automatically.
That's strange. I have automatically login enabled and I use cookies, but nonetheless I had been logged out...
MarkDHamill wrote:I could replace spaces with underscores easily enough, but in general I strive for backwards compatibility.
Yes, pleeease! :) Forget backwards compatibility (uh, phpBB-3 is not compatible with phpBB-2 at all...) and write your code as good as possible. ;)

Thank & have a nice weekeend!
Wolfgang
Darthmat
Registered User
Posts: 114
Joined: Mon Jun 23, 2008 4:08 pm

Re: [RC5] Smartfeed for phpBB 3

Post by Darthmat »

Your FAQ is messed up.

Code: Select all

// Begin Smartfeed Mod
	,
	array(
		0 => '--',
		1 => 'Newsfeeds'
	),
	array(
		0 => 'Are your forums accessible as a newsfeed using RSS and Atom protocols?',
		1 => 'Yes. This site has installed the Smartfeed phpBB modification for phpBB 3, which allows access to both our public and private forums. Accessing private forums requires appropriate authorizations. <a href="' . append_sid("{$phpbb_root_path}smartfeed_url.$phpEx") . '">Learn more</a>.'
	),
	// End Smartfeed Mod
Should be

Code: Select all

// Begin Smartfeed Mod
	array(
		0 => '--',
		1 => 'Newsfeeds'
	),
	array(
		0 => 'Are your forums accessible as a newsfeed using RSS and Atom protocols?',
		1 => 'Yes. This site has installed the Smartfeed phpBB modification for phpBB 3, which allows access to both our public and private forums. Accessing private forums requires appropriate authorizations. <a href="' . append_sid("{$phpbb_root_path}smartfeed_url.$phpEx") . '">Learn more</a>.'
	),
	// End Smartfeed Mod
That extra comma makes the FAQ a total blank page, and makes the FAQ Manager no longer work.
For people wishing to fix this, open /language/en/help_faq.php.
Find the original code (at the top of my post) and replace it with the latter code.
Mickey14
Registered User
Posts: 88
Joined: Sat Mar 05, 2005 10:45 am

Re: [RC5] Smartfeed for phpBB 3

Post by Mickey14 »

I think the extra comma is indeed needed, because the previous entry (in the original, pre-mod faq) does not end with one.
Darthmat
Registered User
Posts: 114
Joined: Mon Jun 23, 2008 4:08 pm

Re: [RC5] Smartfeed for phpBB 3

Post by Darthmat »

Try looking at your FAQ with the comma there. :)
Mickey14
Registered User
Posts: 88
Joined: Sat Mar 05, 2005 10:45 am

Re: [RC5] Smartfeed for phpBB 3

Post by Mickey14 »

I did, it looks good; I only have a blank page when I remove the comma

Here is the code:

Code: Select all

	array(
		0 => 'Why isn’t X feature available?',
		1 => 'This software was written by and licensed through phpBB Group. If you believe a feature needs to be added, please visit the phpbb.com website and see what phpBB Group have to say. Please do not post feature requests to the board at phpbb.com, the group uses SourceForge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for a feature and then follow the procedure given there.'
	),
	array(
		0 => 'Who do I contact about abusive and/or legal matters related to this board?',
		1 => 'Any of the administrators listed on the “The team” page should be an appropriate point of contact for your complaints. If this still gets no response then you should contact the owner of the domain (do a <a href="http://www.google.com/search?q=whois">whois lookup</a>) or, if this is running on a free service (e.g. Yahoo!, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that the phpBB Group has <strong>absolutely no jurisdiction</strong> and cannot in any way be held liable over how, where or by whom this board is used. Do not contact the phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter <strong>not directly related</strong> to the phpBB.com website or the discrete software of phpBB itself. If you do e-mail phpBB Group <strong>about any third party</strong> use of this software then you should expect a terse response or no response at all.'
	)
	// Begin Smartfeed Mod
	,
	array(
		0 => '--',
		1 => 'Newsfeeds'
	),
	array(
		0 => 'Are your forums accessible as a newsfeed using RSS and Atom protocols?',
		1 => 'Yes. This site has installed the Smartfeed phpBB modification for phpBB 3, which allows access to both our public and private forums. Accessing private forums requires appropriate authorizations. <a href="' . append_sid("{$phpbb_root_path}smartfeed_url.$phpEx") . '">Learn more</a>.'
	),
	// End Smartfeed Mod
Please notice that before " // Begin Smartfeed Mod" there is no comma, hence the reason to add one...
Darthmat
Registered User
Posts: 114
Joined: Mon Jun 23, 2008 4:08 pm

Re: [RC5] Smartfeed for phpBB 3

Post by Darthmat »

O_o

I have a comma before //Begin. Same difference.
User avatar
MarkDHamill
Registered User
Posts: 4353
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC5] Smartfeed for phpBB 3

Post by MarkDHamill »

I could probably do it better but if one is meticulous and follows the instructions carefully it should work. I do a full install on a new board to test the instructions before I package them.
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
MarkDHamill
Registered User
Posts: 4353
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Version 2.2.3 available for download

Post by MarkDHamill »

The mod is still going through phpBB Mod Team review. I incorporated their feedback but haven't heard from them in a couple weeks. Anyhow, here is a new version with quite a few bug fixes and a couple new features.

Download Here

Summary of changes:

* ACP contains a new switch that will not kill Smartfeed sessions, if desired. In addition, administrator Smartfeed sessions are no longer killed. The assumption is that if an administrator is using Smartfeed, it is for testing purposes.
* When ACP Smartfeed changes are made, they are now properly logged.
* Certain items which were language variables are now constants, including URL parameter values. Parameter values that used to contain a space (ex: 1 MONTH) now use an underscore. Constants are in a new file called /includes/constants_smartfeed.php
* Fixed bug in remove foes logic.
* Tightened criteria for retrieving posts so only approved posts are shown in feed.
* Blank post replies are now handled better, avoiding the ugly :: :: for the item title that previously occurred.
* truncate_words now returns exactly the number of words requested, not one less than the number requested.
* Fixed version logic so if there is no 4th level of a Smartfeed version, it does not trigger a PHP Notify.
* At request of phpBB Mod Team, fixed language/en/mods/smartfeed.php to move sprintf logic.
* 3 months returns 90 days, not 91 days.
* Fixed bug in Javascript in smartfeed_url_body.html that resulted in a badly formatted limit parameter when authentication is not used.
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.
Mickey14
Registered User
Posts: 88
Joined: Sat Mar 05, 2005 10:45 am

Re: [RC6] Smartfeed for phpBB 3

Post by Mickey14 »

Hi, Mark, I am upgrading my 2.1.1 installation, and I found this in the "2.1.0 to 2.2.2" upgrade instructions, "DIY Instructions" section:

Code: Select all

(...)
/language/en/acp/acp_board.php
(...)
=> Should be

Code: Select all

/includes/acp/acp_board.php
Locked

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