1
mjz55
Is there a way to add notification options to a module?
  • 2007/7/19 10:56

  • mjz55

  • Quite a regular

  • Posts: 298

  • Since: 2007/1/18


I'm running gallery 2 module. It has an RSS feed option for users but doesn't have the add notification options that most of all XOOPS modules have. Is there a way to add this to this module? I'm running XOOPS 2.0.16.

2
christian
Re: Is there a way to add notification options to a module?
  • 2007/7/19 11:25

  • christian

  • Just can't stay away

  • Posts: 401

  • Since: 2002/2/24


Look this documentation for developers.

3
mjz55
Re: Is there a way to add notification options to a module?
  • 2007/7/19 12:32

  • mjz55

  • Quite a regular

  • Posts: 298

  • Since: 2007/1/18


Thanks Christian. WOW. A bit complicated possibly for a non php, scripter like myself.

I saw in ext gallery they have almost the same thing..IE pasted below: Gallery 2 seems to use (_XG2_MI_DESCRIPTION) which is the _XG2_ before everything. Would I just replace _MI_EXTGAL_NEW_PHOTO_NOTIFY to look like _XG2_MI_NEW_PHOTO_NOTIFY, etc?

$modversion['hasNotification'] = 1;

$modversion['notification']['category'][1]['name'] = 'global';
$modversion['notification']['category'][1]['title'] = _MI_EXTGAL_GLOBAL_NOTIFY;
$modversion['notification']['category'][1]['description'] = _MI_EXTGAL_GLOBAL_NOTIFYDSC;
$modversion['notification']['category'][1]['subscribe_from'] = '*';
$modversion['notification']['category'][1]['item_name'] = '';

$modversion['notification']['category'][2]['name'] = 'album';
$modversion['notification']['category'][2]['title'] = _MI_EXTGAL_ALBUM_NOTIFY;
$modversion['notification']['category'][2]['description'] = _MI_EXTGAL_ALBUM_NOTIFYDSC;
$modversion['notification']['category'][2]['subscribe_from'] = 'public-album.php';
$modversion['notification']['category'][2]['item_name'] = 'id';

$modversion['notification']['category'][3]['name'] = 'event';
$modversion['notification']['category'][3]['title'] = _MI_EXTGAL_PHOTO_NOTIFY;
$modversion['notification']['category'][3]['description'] = _MI_EXTGAL_PHOTO_NOTIFYDSC;
$modversion['notification']['category'][3]['subscribe_from'] = 'public-photo.php';
$modversion['notification']['category'][3]['item_name'] = 'photoId';
$modversion['notification']['category'][3]['allow_bookmark'] = 1;

$modversion['notification']['event'][1]['name'] = 'new_photo';
$modversion['notification']['event'][1]['category'] = 'global';
$modversion['notification']['event'][1]['title'] = _MI_EXTGAL_NEW_PHOTO_NOTIFY;
$modversion['notification']['event'][1]['caption'] = _MI_EXTGAL_NEW_PHOTO_NOTIFYCAP;
$modversion['notification']['event'][1]['description'] = _MI_EXTGAL_NEW_PHOTO_NOTIFYDSC;
$modversion['notification']['event'][1]['mail_template'] = 'global_new_photo';
$modversion['notification']['event'][1]['mail_subject'] = _MI_EXTGAL_NEW_PHOTO_NOTIFYSBJ;

$modversion['notification']['event'][2]['name'] = 'new_photo_pending';
$modversion['notification']['event'][2]['category'] = 'global';
$modversion['notification']['event'][2]['title'] = _MI_EXTGAL_NEW_PHOTO_PENDING_NOTIFY;
$modversion['notification']['event'][2]['caption'] = _MI_EXTGAL_NEW_PHOTO_PENDING_NOTIFYCAP;
$modversion['notification']['event'][2]['description'] = _MI_EXTGAL_NEW_PHOTO_PENDING_NOTIFYDSC;
$modversion['notification']['event'][2]['mail_template'] = 'global_new_photo_pending';
$modversion['notification']['event'][2]['mail_subject'] = _MI_EXTGAL_NEW_PHOTO_PENDING_NOTIFYSBJ;
$modversion['notification']['event'][2]['admin_only'] = 1;

$modversion['notification']['event'][3]['name'] = 'new_photo_album';
$modversion['notification']['event'][3]['category'] = 'album';
$modversion['notification']['event'][3]['title'] = _MI_EXTGAL_NEW_PHOTO_ALBUM_NOTIFY;
$modversion['notification']['event'][3]['caption'] = _MI_EXTGAL_NEW_PHOTO_ALBUM_NOTIFYCAP;
$modversion['notification']['event'][3]['description'] = _MI_EXTGAL_NEW_PHOTO_ALBUM_NOTIFYDSC;
$modversion['notification']['event'][3]['mail_template'] = 'album_new_photo';
$modversion['notification']['event'][3]['mail_subject'] = _MI_EXTGAL_NEW_PHOTO_ALBUM_NOTIFYSBJ;

4
mjz55
Re: Is there a way to add notification options to a module?
  • 2007/7/19 13:03

  • mjz55

  • Quite a regular

  • Posts: 298

  • Since: 2007/1/18


I tried adding that to the xoops_version.php of the gallery 2 module and nothing happened. What does the
 and 
mean?

5
Tobias
Re: Is there a way to add notification options to a module?
  • 2007/7/22 5:45

  • Tobias

  • Not too shy to talk

  • Posts: 172

  • Since: 2005/9/13




The _MI_ stuff are just language constants, for translation. That won't do a thig to notify anyone.

So this is way off, I'm afraid.

Login

Who's Online

310 user(s) are online (233 user(s) are browsing Support Forums)


Members: 0


Guests: 310


more...

Donat-O-Meter

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

Latest GitHub Commits