Hi
I am trying to set email notification using "Notifications Module 1.0"
- Module seems to be working fine but the use of "eventparams" is not clear to me. So - maybe someone with better experience can push me to right direction.
So - I am trying to set very basic notification that fires when user has done content editing and edited content is placed in email note. I am then using Event "Core.ContentEditPost"
- and my code (in Notification Modules html -mail) is:
"{$eventparams.content->content_en}"
.. that gives error "PHP Notice: Undefined property: Content::$content_en in.."
**********
I tried to find the right parameters with UTD "error_log(print_r($params, true));"
- and I get this:
*****************
Array
(
[content] => Content Object
(
[_contentBlocks:protected] => Array
(
[content_en] => Array
(
[type] => text
[id] => content_en
[name] => content_en
[usewysiwyg] => true
[oneline] => false
[default] =>
[label] =>
[size] => 50
[tab] =>
[maxlength] => 255
)
)
[_contentBlocksLoaded:protected] => 1
[doAutoAliasIfEnabled:protected] => 1
[stylesheet:protected] =>
[mId:protected] => 37
[mName:protected] => Pages and navigation
[mType:protected] => content
[mOwner:protected] => 1
[_props:protected] => Array
(
[pagedata] =>
[searchable] => 1
[disable_wysiwyg] => 0
[content_en] => <p>Pages determine the structure of your web-site as seen in the admin Content » Pages page. Think of a web-site as a set of pages. These pages are accessed through a menu. You can also link to a page from within another page</p> ...
*****************
But what ever I try to use as parameter - no results..
- How should I write my code?
Thank You
CMS 1.11.8
PHP 5.4.4
MySQL 5.5.25
Apache 2.2.22
Notifications Module and eventparams
-
Stikki
Re: Notifications Module and eventparams
Howdy,
You would need to have exclusive understanding of our PHP API and how objects work.
properties you are trying to access are protected, means you can't access em like you are trying to.
{$eventparams.content->Show()}
should gain what you want, but before using advanced features of module, make sure you understand how they affect to your system setup, cause each time you use message with different event, you have different stuff in $eventparams array.
Advanced tab features won't automatically assign anything to smarty, it's there so you can do your small PHP magic if required.
You would need to have exclusive understanding of our PHP API and how objects work.
properties you are trying to access are protected, means you can't access em like you are trying to.
{$eventparams.content->Show()}
should gain what you want, but before using advanced features of module, make sure you understand how they affect to your system setup, cause each time you use message with different event, you have different stuff in $eventparams array.
Advanced tab features won't automatically assign anything to smarty, it's there so you can do your small PHP magic if required.
Re: Notifications Module and eventparams
Hi Stikki & thanks
I will try this out and - You are definitely right about the need to understand cmsms deeper. So much to learn and so little time..
Thank You.
I will try this out and - You are definitely right about the need to understand cmsms deeper. So much to learn and so little time..
Thank You.
Re: Notifications Module and eventparams
Hi
{$eventparams.content->Show()} - did the job as expected. I also managed to show edited contents url with "GetURL()"
Is there any "easy" way to find all usable params for particular event?
and - I am also trying to show the editor of the edited content. Username for example. Is this something that needs to configure in Notifications module "Advanced" tab?
Hope someone have time to clear this out.
Thank You
{$eventparams.content->Show()} - did the job as expected. I also managed to show edited contents url with "GetURL()"
Is there any "easy" way to find all usable params for particular event?
and - I am also trying to show the editor of the edited content. Username for example. Is this something that needs to configure in Notifications module "Advanced" tab?
Hope someone have time to clear this out.
Thank You
Re: Notifications Module and eventparams
Well, if you go to Event Manager, you will see a list of all the events registered with the CMSMS system, with a description and a help icon. Clicking on the help icon will take you to a page with the parameters list and more.lumimies wrote:Is there any "easy" way to find all usable params for particular event?
HTH
Other than the parameters listed (which differ from event to event) you have to find out how to get what you want either from Smarty, or through PHP. Go through the documentation, the CMSMS API documentation, and help from module.lumimies wrote:and - I am also trying to show the editor of the edited content. Username for example. Is this something that needs to configure in Notifications module "Advanced" tab?
HTH
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Notifications Module and eventparams
Thank You very much indeed.


