xoops forums

goffy

Quite a regular
Posted on: 1/27 14:55
goffy
goffy (Show more)
Quite a regular
Posts: 336
Since: 2010/12/27
#1

Help with notification needed

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

Mamba

Moderator
Posted on: 1/27 20:22
Mamba
Mamba (Show more)
Moderator
Posts: 10676
Since: 2004/4/23
#2

Re: Help with notification needed

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

goffy

Quite a regular
Posted on: 1/27 22:16
goffy
goffy (Show more)
Quite a regular
Posts: 336
Since: 2010/12/27
#3

Re: Help with notification needed

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

Mage

Core Developer
Posted on: 1/28 7:17
Mage
Mage (Show more)
Core Developer
Posts: 179
Since: 2009/8/2 1
#4

Re: Help with notification needed

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.

Mamba

Moderator
Posted on: 1/28 9:26
Mamba
Mamba (Show more)
Moderator
Posts: 10676
Since: 2004/4/23
#5

Re: Help with notification needed

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.9 | Docs | Modules | Bugs

Mage

Core Developer
Posted on: 1/28 9:48
Mage
Mage (Show more)
Core Developer
Posts: 179
Since: 2009/8/2 1
#6

Re: Help with notification needed

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 ...

Mamba

Moderator
Posted on: 1/28 11:30
Mamba
Mamba (Show more)
Moderator
Posts: 10676
Since: 2004/4/23
#7

Re: Help with notification needed

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.9 | Docs | Modules | Bugs

goffy

Quite a regular
Posted on: 1/28 20:07
goffy
goffy (Show more)
Quite a regular
Posts: 336
Since: 2010/12/27
#8

Re: Help with notification needed

Hi Michael

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