assign( 'AllowComm_Group', array( 'group_options'=> $groups, 'group_selected' => $AllowComm ) ); //Template initialization for validated group for comments $template->assign( 'ValidComm_Group1', array( 'group_options'=> $groups, 'group_selected' => $ValidComm1 ) ); //Template initialization for validated group for comments $template->assign( 'ValidComm_Group2', array( 'group_options'=> $groups, 'group_selected' => $ValidComm2 ) ); // Template initialization for forms and data $themeconf=$template->get_template_vars('themeconf'); $CM_theme=$themeconf['id']; $template->assign( array( 'CM_PATH' => CM_PATH, 'CM_CFA' => $conf['comments_forall'], 'CM_VALIDATION' => $conf['comments_validation'], 'CM_VERSION' => $conf_CM[0], 'CM_NO_COMMENT_ANO_TRUE' => $conf_CM[1]=='true' ? 'checked="checked"' : '' , 'CM_NO_COMMENT_ANO_FALSE' => $conf_CM[1]=='false' ? 'checked="checked"' : '' , 'CM_GROUPCOMM_TRUE' => $conf_CM[2]=='true' ? 'checked="checked"' : '' , 'CM_GROUPCOMM_FALSE' => $conf_CM[2]=='false' ? 'checked="checked"' : '' , 'CM_ALLOWCOMM_GROUP' => $conf_CM[3], 'CM_GROUPVALID1_TRUE' => $conf_CM[4]=='true' ? 'checked="checked"' : '' , 'CM_GROUPVALID1_FALSE' => $conf_CM[4]=='false' ? 'checked="checked"' : '' , 'CM_VALIDCOMM1_GROUP' => $conf_CM[5], 'CM_GROUPVALID2_TRUE' => $conf_CM[6]=='true' ? 'checked="checked"' : '' , 'CM_GROUPVALID2_FALSE' => $conf_CM[6]=='false' ? 'checked="checked"' : '' , 'CM_VALIDCOMM2_GROUP' => $conf_CM[7], ) ); // +-----------------------------------------------------------------------+ // | errors display | // +-----------------------------------------------------------------------+ if (isset ($errors) and count($errors) != 0) { $template->assign('errors',array()); foreach ($errors as $error) { array_push($page['errors'], $error); } } // +-----------------------------------------------------------------------+ // | templates display | // +-----------------------------------------------------------------------+ $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/admin.tpl'); $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); ?>