Page 1 of 1

[solved] Module Notifications does not send parameters

Posted: Tue Mar 18, 2014 9:36 am
by reinhardmohr
Hi,
I hope someone can give me a little help with the nice module notifications (thanks for making it!).

I have CMSms 1.11.4 and Notifications 1.1.
I read all the help for the module, watched the movie, searched and read all the threads in the forum – and didn't get it to work.

I have NewsletterMadeSimple and I would like t send an email notification to my customer whenever a new subscriber registers. The email should contain the subscribers name and email address.

In Notifications I chose OnNewUser as event. This event has the parameters email, username, lists.

I tried to enter code like this into the html mail and into the plain text mail:

Code: Select all

{$eventparams.email}
{$eventparams.username}
or

Code: Select all

{$eventparams->email}
{$eventparams->username}
The notification arrived immediately, but it was empty or only contained the number "1".
I also tried to show available parameters with

Code: Select all

{$eventparams|print_r}
or

Code: Select all

{$eventparams.content->Show()}
but this didn't result in anything.

In the forum I read about a bit more advanced programming but without help I can't get it to work.

I am really very thankful if somebody could give me a hint or push me in the right direction.

Thanks for helping

Reinhard

Re: Module Notifications – can't configure it to send parame

Posted: Tue Mar 18, 2014 12:35 pm
by zaidcrowe
hey Reinhard - thinks the variables available from an event are stored in $params - unless you've reassign this to $eventparams, {$params|print_r} should work...

Re: Module Notifications – can't configure it to send parame

Posted: Tue Mar 18, 2014 9:06 pm
by Stikki
Yo,

Yeah i changed that when inline mode was invented, so it's not really event params, as it can be any params coming into module.

This was mentioned in changelog, if im wrong, correct me.

Don't see point changing it in future tho. feels about right now.

Re: Module Notifications – can't configure it to send parame

Posted: Tue Mar 18, 2014 9:40 pm
by reinhardmohr
Hi,
thanks a lot for helping!
It's really $params and no longer $eventparams!
Now everything works and things are getting much clearer. It's indeed mentioned in the changelog. But for a beginner with this module I was not sure yet what meant what.

The biggest problem however was the German translation: It still said
Bemerkung: {$notification} und {$eventparams} sind in diesen Feld verfügbar
as labels above the subject and the body fields. So I was encouraged to try it with $eventparams.

Maybe someone could correct this in the German translation. I never did a translation for CMSms before but maybe I try it myself tomorrow.

Thanks again everybody for the module and for the ongoing help and support

Reinhard

Re: Module Notifications – can't configure it to send parame

Posted: Tue Mar 18, 2014 9:47 pm
by Stikki
Usually translations are out dated in help sections (unfortunately).

So there is link that you can force to english, which is usually correct and updated by developer.

If you want to do any translations to CMSMS or it's modules you might want to register our forge and this project: http://dev.cmsmadesimple.org/projects/german

After that you can login with your forge account into our translation center and translate any available module or core systems to your favorite language.

If you seek help how it works, contact our Translation Team leader: René Helminsen

Better info can be found from Dev Team section.

Best regards

Stikki