[howto] Notifications | EventsManager | FEU

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
clemmy
New Member
New Member
Posts: 9
Joined: Tue Aug 04, 2009 2:51 pm

[howto] Notifications | EventsManager | FEU

Post by clemmy »

Hi,

I was experimenting with the new Notification module in combination with EventsManager module and FrontEndUsers module. In particular I wanted to:
  • 1. Receive an email notification every time a FUE register himself to an event (or modify his registration).
  • 2. Have FEU details included in email body.
  • 3. Have event details included in email body.
For #1 no problem: Notification module has already implemented this functionality, so everything I needed was just two click away.

For #2 no problem as well. You can write a custom scrict in the "Advanced" tab of the notification. An example script is given in the Notification module help, so you just need do copy-and-paste it.


On the contrary #3 was very tricky for me, and I spent quite a lot of time before finding a solution: I was not able to retrieve the informations from the EventList module itself because I don't have enough knowledge about those stuff.. I also tried to get the page url without success because it was getting the url of the page with the list of all the events, and not just the one to which the FEU just subscribed.

Finally I figured out a simpler solution: I'm getting the needed information from the template variables. Here is the code.

In the Advanced tab of the notification I added this code:

Code: Select all

// get all assigned template vars
$all_tpl_vars = $smarty->get_template_vars();

// pass the event url to the template
$params = $all_tpl_vars['actionparams'];
$smarty->assign('event',$params['orig_url']);
Now in the email body you can use the new variable {$event} to print the url of the event the FEU just subscribed. Working like a charm!


Hope this will save some time to somebody else ;)
uniqu3

Re: [howto] Notifications | EventsManager | FEU

Post by uniqu3 »

Hi Clemmy,

thank you for this walk through. Appreciate it ;)
Post Reply

Return to “Modules/Add-Ons”