FEUSEr invalid e-mail adress when I change settings template

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am
Location: Chile

FEUSEr invalid e-mail adress when I change settings template

Post by Ruben_c »

FEUSER 1.12
CMSMS 1.7.1
Hi!!, first of all sorry for my english. ;D
I'm trying to divide the change settings templates and put it in diferent pages, but an error message of "invalid e-mail address array" show up, even if I don't send a email , I'm not a progamer, but this is the code :P :

Code: Select all

<!-- change settings template -->

<!-- start with loggin (username, password, email) -->
{if $smarty.get.page == edit}
{$title}
{if $message != ''}
  {if $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
 {if $controlcount > 0}
  <center>
  <table width="75%">
     {foreach from=$controls item=control name=name}
{if $smarty.foreach.name.index  <=3 } <!-- just de first fields corresponding to the loggin-->
  <tr>
     <td>{$control->hidden}<font color="{$control->color}">{$control->prompt}{$control->marker}</font></td>
     <td>
       {if isset($control->image)}{$control->image}<br/>{/if}
       {$control->control}{$control->addtext}
       {if isset($control->control2)}{$control->prompt2} {$control->control2}<br/>{/if}
     </td>
  </tr>
{/if}
 {/foreach}
  </table>
  </center>
 {/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}
{/if}

<!-- then, personal data (name, last name, etc -->

{if $smarty.get.page == "personal-data"}
{$title}
{if $message != ''}
  {if $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
 {if $controlcount > 0}
  <center>
  <table width="75%">
     {foreach from=$controls item=control name=name}
{if ($smarty.foreach.name.index  >=4) and ($smarty.foreach.name.index  <=8) }
  <tr>
     <td>{$control->hidden}<font color="{$control->color}">{$control->name}{$control->marker}</font></td>
     <td>
       {if isset($control->image)}{$control->image}<br/>{/if}
       {$control->control}{$control->addtext}
       {if isset($control->control2)}{$control->prompt2} {$control->control2}<br/>{/if}
     </td>
  </tr>
{/if}
 {/foreach}
  </table>
  </center>
 {/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}
{/if}

<!-- and so on.... -->
but even if a I use the next way (that I found here), the email error message appear:

Code: Select all

<!-- change settings template -->
{$title}
{if $message != ''}
  {if $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
 {if $controlcount > 0}
  <center>
  <table width="75%">
     {foreach from=$controls item=control}
  {assign var=$control->name value=$control}

 {/foreach}
Name: {$name->control}<br/>
Last name: {$lastname->control }<br/>


  </table>
  </center>
 {/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}
<!-- change settings template -->
and I also added some in function.user_changesettings.php

Code: Select all

 
  $onerow->name = $defn['name'];	<!--to avoid the prompt-->
  $onerow->labelfor = $id.$prop['name'];
  $onerow->type = $defn['type'];
  $onerow->length = $defn['length'];
  $onerow->maxlength = $defn['maxlength'];
  $onerow->prompt = $defn['prompt'];
  $rowarray[$prop['name']] = $onerow;
but if I delete that, the error still showing.

Just work with the default template :'(
Last edited by Ruben_c on Mon Aug 16, 2010 11:25 pm, edited 1 time in total.
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am
Location: Chile

Re: FEUSEr invalid e-mail adress when I change settings template

Post by Ruben_c »

Nobody? I can't touch nothing about the template becouse the validation of the fields in the file: action.do_userchangesettings.php  don't let me do. Even if a send all variables ($params) the validation show me an error.
Last edited by Ruben_c on Sat Aug 21, 2010 4:10 am, edited 1 time in total.
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
Ruben_c
Forum Members
Forum Members
Posts: 35
Joined: Thu Jun 17, 2010 3:12 am
Location: Chile

Re: FEUSEr invalid e-mail adress when I change settings template

Post by Ruben_c »

Well, finally I use an accordeon panel ;D, I hope that this code will be usefull for somebody

Code: Select all

{$title}
{if $message != ''}
  {if $error != ''}
    <p><font color="red">{$message}</font></p>
  {else}
    <p>{$message}</p>
  {/if}
{/if}
{$startform}
 {if $controlcount > 0}
 
     {foreach from=$controls item=control}
  {assign var=$control->name value=$control}

 {/foreach}
<div class="applemenu">
<div class="silverheader"><a href="#">Datos de Ingreso</a></div>
	<div class="submenu">
	<table>
  <tr>
    <th scope="row">Usuario</th>
    <td>{$username->control }</td>
  </tr>
  <tr>
    <th scope="row">Clave</th>
    <td>{$password->control }</td>
  </tr>
  <tr>
    <th scope="row">Clave</th>
    <td>{$password->control }</td>
  </tr>
   <tr>
    <th scope="row">Email</th>
    <td>{$e_mail->control }</td>
  </tr>
  </table>
	</div>
<div class="silverheader"><a href="#" >Datos Personales</a></div>
	<div class="submenu">
	<table>
  <tr>
    <th scope="row">Nombre</th>
    <td>{$nombre->control }</td>
  </tr>
  <tr>
    <th scope="row">Apellidos</th>
    <td>{$apellidos->control }</td>
  </tr>
  <tr>
    <th scope="row">Foto</th>
    <td>{if isset($control->image)}{$control->image}<br/>{/if}{$foto->control }</td>
  </tr>
  <tr>
    <th scope="row">Telefono</th>
    <td>{$telefono->control }</td>
  </tr>
  <tr>
    <th scope="row">Celular</th>
    <td>{$celular->control }</td>
  </tr>
  <tr>
    <th scope="row">Estilo</th>
    <td>{$estilo->control }</td>
  </tr>
  </table>
	</div>
<div class="silverheader"><a href="#">Presentacion</a></div>
	<div class="submenu">
	<table>
  <tr>
  <tr>
    <th height="91" valign="top" scope="row">Presentacion</th>
    <td>{$presentacion->control }</td>
  </tr>
  <tr>
    <th height="96" valign="top" scope="row">Descripcion</th>
    <td>{$descripcion->control }</td>
  </tr>
  </table>

	</div>
<div class="silverheader"><a href="#">Mis Imagenes</a></div>
	<div class="submenu">
	Some random content here<br />
	
	</div>
</div>
{/if}
 {$hidden}{$hidden2}{$submit}{$cancel}
{$endform}

and you can find any Tab menu or accordion menu and change de DIV class for your CSS and add the js script if you need it. Or take it from dynamicdrive.com
A simple template that you can do with CMS Made simple.

http://www.octoporos.cl
Post Reply

Return to “Developers Discussion”