|  | 
  Robert Bryan Davis - 2011-01-20 20:19:34Hi Mr. Lemos,  Have you updated the forms class to work with Smarty version 3?  The code on the phpclasses web site seems to only work with Smarty version 2.  Thanks.  Bryan Davis
  Manuel Lemos - 2011-01-21 04:42:53 - In reply to message 1 from Robert Bryan DavisNo, actually I do not use Smarty, so before you asked I was not even aware there was a newer version.
 Now that you mentioned, I could take a look but it will take me some time. What stopped working?
  Robert Bryan Davis - 2011-01-21 12:11:37 - In reply to message 2 from Manuel LemosHi,  several of the smarty method names have changed. (getTemplateVars() ). Not sure of the other one now.  Once I changed the few method names I found, i received an 'unable to load template' error.  Not sure what is causing it.  I think the prefilter needs to be tweaked, in addition to changing these calls with getTemplateVars().
 function smarty_insert_formaddinputhiddenpart($params, &$smarty)
 {
 if(method_exists($smarty,'getTemplateVars'))
 {
 $tpl_vars=&$smarty->getTemplateVars();
 $form=&$tpl_vars['form'];
 }
 else
 $form=&$smarty->_tpl_vars['form'];
 $form->AddDataPart($params['data']);
 $form->AddInputHiddenPart($params['input']);
 return '';
 }
 
 
 RBD
  Robert Bryan Davis - 2011-01-21 12:12:40 - In reply to message 2 from Manuel LemosI am curious...do you use a template system like smarty?  which one?
 rbd
  Manuel Lemos - 2011-01-30 08:30:05 - In reply to message 4 from Robert Bryan DavisI have not yet had time to look into this, but I hope I can check it this upcoming week.
 I do not use any specific template solution. I often have template classes that implement context specific layouts. Those classes may have functions like header(), footer(), etc.. Template classes are separated from other logic classes but are called from those logic classes.
 
 As for forms, there are plug-ins that implement generic layouts like the form_paged_layout and form_vertical_layout. The default HTML and CSS is defined inside the class but may be overriden.
  Manuel Lemos - 2011-02-07 08:11:42 - In reply to message 3 from Robert Bryan DavisI just uploaded a separate version of the Smarty plug-in files that can works with Smarty 3. Just let me know if it does not work correctly. |