Esempio n. 1
0
 public static function AdminEditDefaultTemplateForm($id, $returnid, $prefname, $active_tab, $title, $filename, $info)
 {
     $mod = cms_utils::get_module('News');
     $smarty = cms_utils::get_smarty();
     $smarty->assign('defaulttemplateform_title', $title);
     $smarty->assign('info_title', $info);
     $smarty->assign('startform', $mod->CreateFormStart($id, 'setdefaulttemplate', $returnid, 'post', '', false, '', array('prefname' => $prefname, 'active_tab' => $active_tab, 'filename' => $filename)));
     $smarty->assign('prompt_template', $mod->Lang('template'));
     $smarty->assign('input_template', $mod->CreateTextArea(false, $id, $mod->GetPreference($prefname), 'input_template'));
     $smarty->assign('submit', $mod->CreateInputSubmit($id, 'submit', $mod->Lang('submit')));
     $smarty->assign('reset', $mod->CreateInputSubmit($id, 'resettodefault', $mod->Lang('resettodefault')));
     $smarty->assign('endform', $mod->CreateFormEnd());
     echo $mod->ProcessTemplate('editdefaulttemplate.tpl');
 }
 function module_version($name, $assign = '')
 {
     $out = '';
     if (!empty($name)) {
         $obj = cms_utils::get_module($name);
         if (is_object($obj)) {
             $out = $obj->GetVersion();
         }
     }
     if ($assign != '') {
         $smarty = cms_utils::get_smarty();
         $smarty->assign($assign, $out);
         return;
     }
     return $out;
 }
Esempio n. 3
0
 /** 
 *
 * @TODO IMPORTANT, NEED TO APPLY A NEW CONCEPT... if possible
 * @return Smarty Compiler
 */
 
 function check_compiler() {
	  $smarty = cms_utils::get_smarty();
    $thisua = $this->GetMatchingUA();
    //die($thisua);
    $lastua = $this->GetPreference("lastua","none");
        
        if ($lastua != $thisua)
        {
           //die("!".$thisua);
           $smarty->force_compile = true;
           $this->SetPreference("lastua", $thisua);
					
        }
        else{
		    //$smarty->force_compile = false;
						
			// if we have more than 1 template set for pages, the compile must always be true, bah
            $smarty->force_compile = true;
            }

 }//end fn