NMS - Newsletter Made Simple

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
alessandra

NMS - Newsletter Made Simple

Post by alessandra »

Hi

I am running CMS 1.0.2, PHP Version 5.2.0
I have installed NMS Version: 1.0.1 and created a content page which only contains the following code:

{cms_module module='NMS'}

I have created one public list and a message as well,

but when I select this content page I get the following output:


smarty->assign('prompt_email',$this->Lang('emailaddress')); $this->smarty->assign('error',$params['error']); $this->smarty->assign('submitbtn', $this->CreateInputSubmit($id, 'submit', $this->Lang('submit'))); $template = 'nms_subscribeform'; $mode = 'subscribe'; if(isset($params['mode']) && $params['mode'] != '') { $mode = $params['mode']; } switch( $mode ) { case 'usersettings': { $this->smarty->assign('error',$params['error']); $this->smarty->assign('formstart', $this->CreateFrontendFormStart($id, $returnid, 'usersettings_email' )); $this->smarty->assign('formend',$this->CreateFormEnd()); $this->smarty->assign('email', $this->CreateInputText($id, 'email','',30, 150 )); $this->smarty->assign('formhidden', $this->CreateInputHidden($id, 'usersettings')); $template = 'usersettings_form'; } break; case 'unsubscribe': { $this->smarty->assign('error',$params['error']); $this->smarty->assign('formstart',$this->CreateFrontendFormStart($id, $returnid, 'unsubscribe_email')); $this->smarty->assign('formend',$this->CreateFormEnd()); $this->smarty->assign('email', $this->CreateInputText($id, 'email','',30, 150 )); $this->smarty->assign('formhidden', $this->CreateInputHidden($id, 'unsubscribe')); $template = 'nms_unsubscribeform'; } break; case 'subscribe': { if( isset( $params['displayform'] ) && $params['displayform'] == 0 ) { // nothing } else { $lists = ""; if( isset( $params['select'] ) && $params['select'] != "" ) { $ar = explode(",",$params['select']); $lists = '("'.implode('","',$ar).'")'; } $email = ''; if( isset( $params['email'] ) && $params['email'] != "" ) { $email = $params['email']; } $username = ''; if( isset( $params['username'] ) && $params['username'] != "" ) { $username = $params['username']; } $db = &$this->cms->db; $result = array(); $temparray = array(); $query = "SELECT * FROM ".cms_db_prefix().$this->table_prefix."list WHERE active = ? AND public = ?"; if( $lists != "" ) { $query .= " AND name IN ".$lists; } $query .= " ORDER BY listid"; $dbresult = $db->Execute($query,array(1,1)); if ($dbresult && $dbresult->RecordCount() > 0) { $oneonly = ($dbresult->RecordCount() == 1); while ($row = $dbresult->FetchRow()) { $extratext = ''; if( $oneonly ) { $hidden .= $this->CreateInputHidden($id,"lists[]",$row['listid']); $extratext = 'checked="checked" disabled="true"'; } $temparray[] = " " . $this->CreateInputCheckbox($id, "lists[]",$row['listid'],"",$extratext). $row['name'] . " - " . $row['description'] . ""; } $this->smarty->assign('listids',$temparray); $this->smarty->assign('formstart',$this->CreateFrontendFormStart($id, $returnid, 'do_create_new_user','post','',true,'',$params)); $this->smarty->assign('formend',$this->CreateFormEnd()); $this->smarty->assign('email', $this->CreateInputText($id, 'email',$email,30, 150 )); $this->smarty->assign('prompt_username',$this->Lang('name')); $this->smarty->assign('username', $this->CreateInputText($id, 'username', $username, 30, 150 )); $this->smarty->assign('formhidden', $hidden ); } else { $message = $this->Lang('nolists'); } } } break; default: $this->_DisplayErrorPage($id,$params,$returnid, $this->Lang('invalidparam')); return; } // Display the populated template $smarty->assign('message',$message); echo $this->ProcessTemplateFromDatabase($template); ?>

Can anyone please help me?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: NMS - Newsletter Made Simple

Post by RonnyK »

allesandra,

seems like the problem is the same as in the following post. This might help.

http://forum.cmsmadesimple.org/index.php/topic,5918.0.html


Best regards,

Ronny
alessandra

Re: NMS - Newsletter Made Simple

Post by alessandra »

Hi Ronny

Thank you so much. That did fix my problem and I didn't even have to tear my hair out!

Alessandra
Locked

Return to “CMSMS Core”