1
goffy
Help with notification needed
  • 2019/1/27 14:55

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi

can someone help me with implementation of notification system in my new module?
https://github.com/ggoffy/wggallery

I tried a lot but do not get it running

2
Mamba
Re: Help with notification needed
  • 2019/1/27 20:22

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


What kind of notifications do you want to have?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
goffy
Re: Help with notification needed
  • 2019/1/27 22:16

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


only a few notifications, e.g when
- a new album is created
- an album is modified or deleted
- images are uploaded

4
Mage
Re: Help with notification needed
  • 2019/1/28 7:17

  • Mage

  • Core Developer

  • Posts: 206

  • Since: 2009/8/2 1


I work on notifications on my modules. If you want, I can integrate notifications to your module. I do not know if I have the time today but tomorrow should be fine.

5
Mamba
Re: Help with notification needed
  • 2019/1/28 9:26

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


I just ran some tests, and two things:

1) it looks like in file /albums.php for "globals" in triggerEvent() the item_id should be 0, i.e.

if ( $albNew ) {
                
$notificationHandler xoops_getHandler('notification');
//                $notificationHandler->triggerEvent('global', $newAlbId, 'album_new');
                
$notificationHandler->triggerEvent('global'0'album_new');
            } else {
                
$notificationHandler xoops_getHandler('notification');
//                $notificationHandler->triggerEvent('global', $albId, 'album_modify');
                
$notificationHandler->triggerEvent('global'0'album_modify');
            }


2) Somehow it seems that after each run (i.e. new album or modify album) the notification is being deleted, so the user never gets it, but I didn't figure yet out, why is it being deleted and where - I just saw in the database.

I might not have the time now to finish it, but hopefully this will help you to find the problem.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

6
Mage
Re: Help with notification needed
  • 2019/1/28 9:48

  • Mage

  • Core Developer

  • Posts: 206

  • Since: 2009/8/2 1


I will look at why it does not work but it will take time. The last time I worked on notifications, it was for tdmdownlods ... It's been a long time ...

7
Mamba
Re: Help with notification needed
  • 2019/1/28 11:30

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


OK, it works for me:

1) the delete was because the Default Notification Mode was set to: "Notify me only once"
But it didn't have any impact in.

2) The issue was that your file in /include was:
notifications.inc.php

instead of
notification.inc.php

In English there were no templates in: /language/english/mail_template/
In German, you've missed the template "global_alb_modify_notify.tpl"

Now the notifications work for me without any problems.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

8
goffy
Re: Help with notification needed
  • 2019/1/28 20:07

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hi Michael

see my comments athttps://github.com/ggoffy/wggallery/pull/7

Login

Who's Online

129 user(s) are online (80 user(s) are browsing Support Forums)


Members: 0


Guests: 129


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits