本文整理汇总了PHP中XoopsTpl::load_filter方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsTpl::load_filter方法的具体用法?PHP XoopsTpl::load_filter怎么用?PHP XoopsTpl::load_filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsTpl
的用法示例。
在下文中一共展示了XoopsTpl::load_filter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
} elseif ($category > 0) {
$crit_top = new CriteriaCompo(new Criteria("cat_id", $category));
$crit_top->add(new Criteria("forum_id", "(" . implode(", ", $valid_forums) . ")", "IN"));
$forums_top = $forum_handler->getIds($crit_top);
$valid_forums = array_intersect($forums_top, $valid_forums);
}
if (count($valid_forums) == 0) {
newbb_trackback_response(1, _NOPERM);
}
$charset = 'UTF-8';
header('Content-Type:text/xml; charset=' . $charset);
$tpl = new XoopsTpl();
$tpl->caching = 2;
$tpl->cache_lifetime = $xoopsModuleConfig['rss_cachetime'] * 60;
if (!empty($xoopsConfig['rewrite'])) {
$tpl->load_filter('output', 'xoRewriteModule');
}
mod_loadFunctions("cache");
$xoopsCachedTemplateId = md5(mod_generateCacheId_byGroup() . str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']));
$compile_id = NULL;
if (!$tpl->is_cached('db:newbb_rss.html', $xoopsCachedTemplateId, $compile_id)) {
mod_loadFunctions("time", "newbb");
$xmlrss_handler =& xoops_getmodulehandler('xmlrss', 'newbb');
$rss = $xmlrss_handler->create();
$rss->setVarRss('channel_title', $xoopsConfig['sitename'] . ' :: ' . _MD_FORUM);
$rss->channel_link = XOOPS_URL . '/';
$rss->setVarRss('channel_desc', $xoopsConfig['slogan'] . ' :: ' . $xoopsModule->getInfo('description'));
// There is a "bug" with xoops function formatTimestamp(time(), 'rss')
// We have to make a customized function
//$rss->channel_lastbuild = formatTimestamp(time(), 'rss');
$rss->setVarRss('channel_lastbuild', newbb_formatTimestamp(time(), 'rss'));