• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: CMSMailer example wouldnt work
PostPosted: Fri Jun 22, 2012 11:26 am 
Offline
Power Poster
Power Poster

Joined: Wed Jul 04, 2007 3:39 pm
Posts: 315
In the help section of the module that example would not work:

$cmsmailer = $this->GetModuleInstance('CMSMailer');

should be:

$cmsmailer = cms_utils::get_module('CMSMailer');


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMailer example wouldnt work
PostPosted: Fri Jun 22, 2012 12:29 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8143
Location: Fernie British Columbia, Canada
incorrect.

Both syntaxes are valid.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMailer example wouldnt work
PostPosted: Fri Jun 22, 2012 12:43 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Dec 01, 2009 3:42 pm
Posts: 98
Location: Alsace // France
But
$cmsmailer = $this->GetModuleInstance('CMSMailer');

is not deprecated?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMailer example wouldnt work
PostPosted: Fri Jun 22, 2012 12:56 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8143
Location: Fernie British Columbia, Canada
No it's not deprecated.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMailer example wouldnt work
PostPosted: Fri Jun 22, 2012 1:05 pm 
Offline
Power Poster
Power Poster

Joined: Wed Jul 04, 2007 3:39 pm
Posts: 315
Set up a UDT with the example code, ran it, didn't work. Changed the UDT to use cms_utils::get_module('CMSMailer'), ran it, it worked.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMailer example wouldnt work
PostPosted: Fri Jun 22, 2012 1:09 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8143
Location: Fernie British Columbia, Canada
Of course the example won't work from a UDT. $this->GetModuleInstance() is a module API method.

Issue closed.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting