Page 1 of 1

How add New notification

Posted: Sun Jun 09, 2019 9:16 am
by Aurelienazerty
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

Re: How add New notification

Posted: Sun Jun 09, 2019 10:06 am
by mrgoldy
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

Re: How add New notification

Posted: Sun Jun 09, 2019 10:20 am
by Aurelienazerty
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 ?

Re: How add New notification

Posted: Sun Jun 09, 2019 10:43 am
by mrgoldy
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.

Re: How add New notification

Posted: Sun Jun 09, 2019 3:51 pm
by Aurelienazerty
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.

Re: How add New notification

Posted: Sun Jun 09, 2019 10:57 pm
by mrgoldy
If you want, I could see if I can write a tutorial if you can't figure it out.