本文整理汇总了PHP中cms_utils::get_smarty方法的典型用法代码示例。如果您正苦于以下问题:PHP cms_utils::get_smarty方法的具体用法?PHP cms_utils::get_smarty怎么用?PHP cms_utils::get_smarty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cms_utils
的用法示例。
在下文中一共展示了cms_utils::get_smarty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AdminEditDefaultTemplateForm
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');
}
示例2: module_version
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;
}
示例3: check_compiler
/**
*
* @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