How add New notification

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Aurelienazerty
Registered User
Posts: 154
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

How add New notification

Post by Aurelienazerty » Sun Jun 09, 2019 9:16 am

Hi all,

I'm trying to make extension using phpBB notification system. But I have not finding a simple tutorial.

So how it works ?

I think that there is :
  • work for adding a New notification in the phpBB notification system
  • work for adding template for showing it
  • Work for spread the notification when the trigger comes
So if someone can help me, it should be Nice.

Thanks

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1047
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: How add New notification

Post by mrgoldy » Sun Jun 09, 2019 10:06 am

There are various steps to take when adding a notification to your extension.
Enabling, disabling and purging in the ext.php.
Declaring and tagging it in your services.yml.
Create the actual notification file in your extension and then trigger it from somewhere.

The Skeleton extension has a working example you can work off: https://www.phpbb.com/customise/db/offi ... _skeleton/

There is also a tutorial of sorts written by rxu that can help you out: viewtopic.php?f=461&t=2259916#p13718356

And you can always look how other extensions handle notifications, such as the Board Rules extension. https://github.com/phpbb-extensions/boardrules
phpBB Studio / ''Proud member of the Studio"

User avatar
Aurelienazerty
Registered User
Posts: 154
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: How add New notification

Post by Aurelienazerty » Sun Jun 09, 2019 10:20 am

Thanks for the link. The tutorial of sorts written by rxu is for phpBB 3.1, I saw that many change occurs with 3.2, is it deprecated ?

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1047
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: How add New notification

Post by mrgoldy » Sun Jun 09, 2019 10:43 am

Ah, should of read it more carefully, yes it is rather outdated indeed.
I would suggest looking at how other extensions do it.
And use the Skeleton Extension, tick the Notification box and create the extension, it will give you a working example of your own.
phpBB Studio / ''Proud member of the Studio"

User avatar
Aurelienazerty
Registered User
Posts: 154
Joined: Sat Jan 08, 2005 8:21 pm
Contact:

Re: How add New notification

Post by Aurelienazerty » Sun Jun 09, 2019 3:51 pm

I made a up ping to rxu's tutorial, maybe he have an update.

I start it here https://github.com/Aurelienazerty/siteNotification with the help of Skeleton.

For now, I try to do some reverse engineering for over extension, but it's not very simple (finding what's about notification, what's about extension stuff).

phpBB notification system is very great, quite "new" (for user like me who doing modification since phpBB 2.0) and it's the only feature who have so few documentation. That very sad.

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1047
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: How add New notification

Post by mrgoldy » Sun Jun 09, 2019 10:57 pm

If you want, I could see if I can write a tutorial if you can't figure it out.
phpBB Studio / ''Proud member of the Studio"

Post Reply

Return to “Extension Writers Discussion”