Page 1 of 1

NMS - Newsletter Made Simple

Posted: Mon Jan 15, 2007 5:33 am
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?

Re: NMS - Newsletter Made Simple

Posted: Mon Jan 15, 2007 1:59 pm
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

Re: NMS - Newsletter Made Simple

Posted: Mon Jan 15, 2007 9:46 pm
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