[CDB] Smartfeed 3.0.4

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
MarkDHamill
Registered User
Posts: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[CDB] Smartfeed 3.0.4

Post by MarkDHamill » Sun Oct 04, 2015 1:56 am

Smartfeed is now an approved extension. Get it here.

Extension Name: Smartfeed
Author: MarkDHamill

Image
Extension Description: Provides RSS 1.0, RSS 2.0 or Atom 1.0 customized newsfeeds. Users select forums they want, including protected forums if they can access them. There are myriad options to customize the feed. The following features that were in the phpBB 3.0.x modification are not available in the extension: ability to integrate external feeds, ability for users to access posts in non-public forums if mcrypt is not compiled with PHP, the ability to hide Smartfeed sessions, the ability to make the feed work with a specified IP, and the ability to generate a new Smartfeed key. The URL for smartfeed has changed. The URL argument names are different and more concise, so an old Smartfeed URL will not work. IPV6 support is now supported.

Extension Version: 3.0.3

Extension Download: https://phpbbservices.com/smartfeed/sma ... _3.0.3.zip

To speed development of the extension, some features in the 3.0 modification were dropped. They may reappear in future versions. Some major differences between the Smartfeed modification for phpBB 3.0 and the Smartfeed extension for phpBB 3.1 are:

Features removed:
  • Integration of external feeds into the newsfeed are not currently supported.
  • You cannot hide Smartfeed sessions. In most cases Smartfeed sessions will show up as guest sessions.
  • You cannot specify a proxy IP. If you want to use the IP authentication feature, it will apply only to your IP at the time you generated the URI. If your IP changes you will have to regenerate the URI using the Smartfeed user interface.
  • You cannot generate a new Smartfeed key.
  • You lose the ability to see protected forums if mcrypt is not compiled into PHP. Fortunately, it usually is compiled into PHP so it’s probably not a concern. As a result the PHP Secure Communications library is not part of the extension.
  • The feedcreator class is no longer used. Instead, phpBB’s template engine is used to generate Atom, RSS 1.0 and RSS 2.0 feeds.
Features changed:

Code: Select all

// These constants are used to identify URI key/value pair associations. Note these have changed since the phpBB 3.0 mod so URIs will be shorter.

define('SMARTFEED_BOOKMARKS', 'b'); // was bookmarks
define('SMARTFEED_ENCRYPTION_KEY', 'e'); // unchanged
define('SMARTFEED_FEED_STYLE', 'd'); // was feed_style
define('SMARTFEED_FEED_TYPE', 'y'); // was feed_type
define('SMARTFEED_FILTER_FOES', 'ff'); // was filter_foes
define('SMARTFEED_FIRST_POST', 'fp'); // was firstpostonly
define('SMARTFEED_FORUMS', 'f'); // was forum
define('SMARTFEED_LAST_VISIT', 'l'); // was lastvisit
define('SMARTFEED_MARK_PRIVATE_MESSAGES', 'k'); // was pms
define('SMARTFEED_MAX_ITEMS', 'x'); // was count_limit
define('SMARTFEED_MAX_WORDS', 'w'); // was max_word_size
define('SMARTFEED_MIN_WORDS', 'i'); // was min_word_size
define('SMARTFEED_PRIVATE_MESSAGE', 'm'); // was pms
define('SMARTFEED_REMOVE_MINE', 'r'); // was removemine
define('SMARTFEED_SORT_BY', 's'); // was sort_by
define('SMARTFEED_TIME_LIMIT', 't'); // was limit
define('SMARTFEED_USER_ID', 'u'); // unchanged
Features added:
  • Supports IPV6
GitHub
This being my very first extension I am sure there are lots of issues and things I missed, so obviously don't use it in a production environment.
Last edited by MarkDHamill on Thu Jun 23, 2016 1:57 pm, edited 13 times in total.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
david63
Registered User
Posts: 16093
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Smartfeed 3.0.0

Post by david63 » Sun Oct 04, 2015 7:47 am

A couple of initial observations.

You do not need the ext.php file unless you plan adding something in there later.

You should not be using global declarations - these should be in your construct function (the extension will probably be denied for using globals)

define('SMARTFEED_GENERATOR', 'Smartfeed Extension for phpBB 3.1'); // Does not need to be language specific
Unless this line is not displayed anywhere (in which case why include it?) then it does have to be translatable.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: [DEV] Smartfeed 3.0.0

Post by MuhClaren » Sun Oct 04, 2015 11:19 am

Great effort, Mark. I was wondering when you'd share this. ;)

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

Re: [DEV] Smartfeed 3.0.0

Post by MarkDHamill » Sun Oct 04, 2015 1:19 pm

Me too. My phpBB consulting sucks up most of my time and pays real money so this work gets done when the consulting slows down. Also, the first extension for any extension writer is a slow learning process. The documentation helps but there are lots of things you have to puzzle through not in the documentation. Fortunately, the help from other extension team members got me past most hurdles.

The extension architecture is new and fancy but so much more object oriented. I haven't done a whole lot of object oriented programming so that was also a hurdle.

Hope it works well. Looking for feedback.
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: 3790
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [DEV] Smartfeed 3.0.0

Post by MarkDHamill » Sun Oct 04, 2015 1:22 pm

david63 wrote:A couple of initial observations.

You do not need the ext.php file unless you plan adding something in there later.

You should not be using global declarations - these should be in your construct function (the extension will probably be denied for using globals)

define('SMARTFEED_GENERATOR', 'Smartfeed Extension for phpBB 3.1'); // Does not need to be language specific
Unless this line is not displayed anywhere (in which case why include it?) then it does have to be translatable.
I agree on ext.php. I built everything off the Acme demo example so I kind of left it there figuring I might eventually use it.

The constant SMARTFEED_GENERATOR is actually used, but it's markup in the feed itself. The name of the application generating the feed is required metadata in most feed formats. It's rarely seen, however.

I'm still struggling on how to avoid global variables. I assume some sort of dependency injection is needed instead.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
david63
Registered User
Posts: 16093
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Smartfeed 3.0.0

Post by david63 » Sun Oct 04, 2015 1:38 pm

MarkDHamill wrote:I'm still struggling on how to avoid global variables. I assume some sort of dependency injection is needed instead.
Take a look at my FAQ Manager extension which is not dissimilar in structure with its controller
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

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

Re: [DEV] Smartfeed 3.0.0

Post by MarkDHamill » Sun Oct 04, 2015 2:47 pm

So it's okay to have one global statement as you have in your code as long as you move them to private variables inside your class, as in faqmanager_module.php?

Code: Select all

	function main($id, $mode)
	{
		global $user, $template, $request, $config, $phpbb_log, $phpbb_root_path, $phpEx;

		$this->config			= $config;
		$this->request			= $request;
		$this->template			= $template;
		$this->user				= $user;
		$this->phpbb_root_path	= $phpbb_root_path;
		$this->phpEx			= $phpEx;
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
david63
Registered User
Posts: 16093
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] Smartfeed 3.0.0

Post by david63 » Sun Oct 04, 2015 2:57 pm

Sorry - that was the wrong link see this link
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Mick2015
Registered User
Posts: 40
Joined: Sun Feb 02, 2014 9:58 pm
Location: Newcastle
Name: michael lambert
Contact:

Re: [DEV] Smartfeed 3.0.0

Post by Mick2015 » Sat Oct 10, 2015 10:52 pm

thanks for sharing ya extension mate Sub to this topic, but going to wait untill you add feeds from otheirs sites so they on the news page or new forum, is that in the pipeline too ???

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

Re: [DEV] Smartfeed 3.0.0

Post by MarkDHamill » Tue Oct 13, 2015 9:25 pm

I hope to add it at some point. Right now I haven't figured out how to integrate the SimplePie or similar library into the extensions architecture, so it's on a list of things to look at as I get more familiar with it.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Praggle
Registered User
Posts: 64
Joined: Thu Feb 26, 2015 6:07 pm

Re: [DEV] Smartfeed 3.0.0

Post by Praggle » Fri Oct 16, 2015 7:29 am

Hi Mark,

I am very glad, that you are able to spend some time with this project now. Many thanks !

On my Boardinstallation (3.1.6) the feed (app.php/smartfeed/feed?t=2&s=1&y=0&d=3) is showing up only one category (f=12) independant from my choice of categories and also independant from the access rights of the logged user. Although I have rights for all categories the feed allows only f=12 even in guest status (although f=12 doesn't appear as choice in the smartfeed config panel).

Logged in as user with full access (also for f=15)
app.php/smartfeed/feed?f=12&t=2&s=1&y=0&d=3
is working as expected and
app.php/smartfeed/feed?f=15&t=2&s=1&y=0&d=3
brings
Sorry, due to Smartfeed forum exclusions and your forum access privileges, you cannot access any forums
Praggle

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

Re: [DEV] Smartfeed 3.0.0

Post by MarkDHamill » Fri Oct 16, 2015 12:56 pm

Are those forums publicly accessible? Do you see them when you logout? I used pretty much the same code I had in the 3.0 mod to handle access control and I don't believe the permissions system has changed.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Swen
Registered User
Posts: 72
Joined: Sun Oct 04, 2015 5:44 pm

Re: [DEV] Smartfeed 3.0.0

Post by Swen » Sat Oct 17, 2015 7:12 am

Thanks for develop this feature! I need this kind of thing, cause i use it just before php3.0.

I have an issue that i have a loop posts:

http://forum.luftfahrtclubbraunschweig. ... =2&y=2&d=3

How can i fix this? There is only one post and i get eleven of it. :?

I can generate what i want, but nothing changes in within the feed. Thats also a point.
Regards Swen

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

Re: [DEV] Smartfeed 3.0.0

Post by MarkDHamill » Sat Oct 17, 2015 6:59 pm

Not sure what is causing your issue. Perhaps it was installed incorrectly. The extension handshake is not working. The routing.yml file handles the extension. It should not have changed but you can compare it with what you downloaded.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Praggle
Registered User
Posts: 64
Joined: Thu Feb 26, 2015 6:07 pm

Re: [DEV] Smartfeed 3.0.0

Post by Praggle » Wed Oct 28, 2015 10:38 pm

MarkDHamill wrote:Are those forums publicly accessible? Do you see them when you logout? I used pretty much the same code I had in the 3.0 mod to handle access control and I don't believe the permissions system has changed.
Sorry for my late answer!
No, F=12 is not publicly accessible. I have two publicly accessible forums, but their posts arn't showing up in smartfeeed. It seems to have no influence.

Locked

Return to “Extensions in Development”