1
st3wart
Agendax hack: Notification
  • 2004/4/25 14:41

  • st3wart

  • Just popping in

  • Posts: 20

  • Since: 2004/4/25


hello,

This is my hack:

1. Added these in xoops_version.php
$modversion['notification']['category'][1]['name'] = 'agenda';
$modversion['notification']['category'][1]['title'] = "cat_title";
$modversion['notification']['category'][1]['description'] = "cat_desc";
$modversion['notification']['category'][1]['subscribe_from'] = array('index.php');

$modversion['notification']['event'][1]['name'] = 'add_event';
$modversion['notification']['event'][1]['category'] = 'global';
$modversion['notification']['event'][1]['title'] = "event_title";
$modversion['notification']['event'][1]['caption'] = "event_caption";
$modversion['notification']['event'][1]['description'] = "event_desc";
$modversion['notification']['event'][1]['mail_template'] = 'global_newcategory_notify';
$modversion['notification']['event'][1]['mail_subject'] = "event_mailsub";

2. Copied notification_update.php from newsbb to module/agendax directory. Also copy
modules/news/language/english/mail_template/global_newcategory_notify.tpl to
modules/agendax/language/english/mail_template/global_newcategory_notify.tpl
If directory doesn't exist, create it.
You should change the file global_newcategory_notify.tpl that u copied accordingly as this is the mail body.

3. Add the line <{include file='db:system_notification_select.html'}> in modules/agendax/templates/agendax_flatview.html

4. Added lines below in modules/agendax/index.php in (case"addevent")

$notification_handler =& xoops_gethandler('notification');
$tags=array();
$notification_handler->triggerEvent('agenda', 0, 'add_event', $tags);

Now try adding an event using another user. After you subscribed it with the admin user. Now log in as the admin user and check your inbox.

Stewart

2
wjue
Re: Agendax hack: Notification
  • 2004/5/3 16:16

  • wjue

  • Quite a regular

  • Posts: 315

  • Since: 2002/8/3 7


Thank you Stewart, I read your post just now. This is a very interesting add-on feature. I think I will integrate it for next versions.


wjue


3
talon39
Re: Agendax hack: Notification
  • 2005/2/23 22:38

  • talon39

  • Just popping in

  • Posts: 94

  • Since: 2002/6/13


This hack is exactly what I need. Unfortuantely I'm have trouble getting it to work. I'm using version Agenda-x 2.2

1. Added these in xoops_version.php
$modversion
['notification']['category'][1]['name'] = 'agenda';
$modversion['notification']['category'][1]['title'] = "cat_title";
$modversion['notification']['category'][1]['description'] = "cat_desc";
$modversion['notification']['category'][1]['subscribe_from'] = array('index.php');

$modversion['notification']['event'][1]['name'] = 'add_event';
$modversion['notification']['event'][1]['category'] = 'global';
$modversion['notification']['event'][1]['title'] = "event_title";
$modversion['notification']['event'][1]['caption'] = "event_caption";
$modversion['notification']['event'][1]['description'] = "event_desc";
$modversion['notification']['event'][1]['mail_template'] = 'global_newcategory_notify';
$modversion['notification']['event'][1]['mail_subject'] = "event_mailsub";


I cut and pasted the above code exactly.

Quote:
2. Copied notification_update.php from newsbb to module/agendax directory. Also copy
modules/news/language/english/mail_template/global_newcategory_notify.tpl to
modules/agendax/language/english/mail_template/global_newcategory_notify.tpl


I copied notification_update.php exactly as described.

I copied global_newcategory_notify.tpl as described by copying the entire folder mail_template from modules/news/language/english/ to modules/agendax/language/english/

3. Add the line <{include file='db:system_notification_select.html'}> in modules/agendax/templates/agendax_flatview.html


I added the line in the file and in the corresponding template through the XOOPS template manager. I added it at the bottom. However nothing changes when viewing the Calendar in flat view. I even added the word "test" next to it as a test. In flat view I could see "test" but still no notification form. Was there something else I need to modify to get the template to include it?

4. Added lines below in modules/agendax/index.php in (case"addevent")

$notification_handler =& xoops_gethandler('notification');
$tags=array();
$notification_handler->triggerEvent('agenda'0'add_event'$tags);


I was unsure exactly where to add the above code. So I addedit right after line 488, like this

case "addevent":
  {
  
$notification_handler =& xoops_gethandler('notification');
$tags=array();
$notification_handler->triggerEvent('agenda'0'add_event'$tags);


After making the above mods I still have no notification options in my agenda-x module. Any idea what I have missed?

Login

Who's Online

407 user(s) are online (270 user(s) are browsing Support Forums)


Members: 0


Guests: 407


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