本文整理汇总了PHP中RMTemplate::get方法的典型用法代码示例。如果您正苦于以下问题:PHP RMTemplate::get方法的具体用法?PHP RMTemplate::get怎么用?PHP RMTemplate::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RMTemplate
的用法示例。
在下文中一共展示了RMTemplate::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($caption, $name, $selected = 0)
{
$this->setName($name);
$this->setCaption($caption);
$this->selected = $selected;
RMTemplate::get()->add_local_script('teams_field.js', 'match');
}
示例2: showCategories
/**
* @desc Visualiza todas las categorías existentes
**/
function showCategories()
{
global $xoopsModule, $xoopsSecurity;
$categos = array();
DTFunctions::getCategos($categos);
$categories = array();
foreach ($categos as $row) {
$cat = new DTCategory();
$cat->assignVars($row);
$categories[] = array('id' => $cat->id(), 'name' => $cat->name(), 'parent' => $cat->parent(), 'active' => $cat->active(), 'description' => $cat->desc(), 'indent' => $row['jumps']);
}
unset($categos);
RMTemplate::get()->add_local_script('jquery.checkboxes.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('jquery.validate.min.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('admin.js', 'dtransport');
RMTemplate::get()->add_head('<script type="text/javascript">
var dt_message = "' . __('Do you really want to delete selected categories', 'dtransport') . '";
var dt_select_message = "' . __('Select at least one category to delete!', 'dtransport') . '";
</script>');
RMTemplate::get()->add_xoops_style('admin.css', 'dtransport');
DTFunctions::toolbar();
xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » " . __('Categories', 'dtransport'));
xoops_cp_header();
include RMTemplate::get()->get_template('admin/dtrans_categos.php', 'module', 'dtransport');
xoops_cp_footer();
}
示例3: showForm
function showForm()
{
global $db, $xoopsOption, $xoopsUser, $mc, $tpl, $xoopsConfig, $xoopsModuleConfig, $user, $xoopsSecurity;
$xoopsOption['template_main'] = "gs_submit.html";
$xoopsOption['module_subpage'] = 'submit';
include 'header.php';
GSFunctions::makeHeader();
$mc =& $xoopsModuleConfig;
$tpl->assign('lang_uploadyour', __('Upload your Pictures', 'galleries'));
$tpl->assign('lang_step1', __('Step 1:', 'galleries'));
$tpl->assign('lang_step2', __('Step 2:', 'galleries'));
$tpl->assign('lang_step3', __('Step 3:', 'galleries'));
$tpl->assign('lang_step4', __('Step 4:', 'galleries'));
$tpl->assign('lang_choose', __('Select Files', 'galleries'));
$tpl->assign('lang_privacy', __('Set Privacy', 'galleries'));
$tpl->assign('lang_privateme', __('Private (<em>Only you will seee these pictures</em>)', 'galleries'));
$tpl->assign('lang_privatef', __('For Friends (<em>Only you and your friends will see these pictures</em>)', 'galleries'));
$tpl->assign('lang_public', __('Public (<em>Pictures will visible for all</em>)'));
$tpl->assign('lang_upload', __('Upload Files', 'galleries'));
$tpl->assign('lang_clicktou', __('Click to Upload', 'galleries'));
$tpl->assign('lang_tagsesp', __('Specify tags to use', 'galleries'));
$tpl->assign('lang_tagsdesc', __('Separate each tag with a comma (,).', 'galleries'));
$tpl->assign('lang_maxsize', sprintf(__('The maximum file size allowed is <strong>%s</strong>.', 'galleries'), RMUtilities::formatBytesSize($mc['size_image'] * 1024)));
$tpl->assign('used_graph', GSFunctions::makeQuota($user, false));
$tpl->assign('form_action', GSFunctions::get_url() . ($mc['urlmode'] ? 'submit/' : '?submit=submit'));
$tpl->assign('token', $xoopsSecurity->getTokenHTML());
$used = round($user->usedQuota() / $user->quota() * 100) . '%';
$tpl->assign('lang_used', sprintf(__('You have used <strong>%s</strong> of <strong>%s</strong> available. You left <strong>%s</strong>', 'galleries'), $used, RMUtilities::formatBytesSize($user->quota()), RMUtilities::formatBytesSize($user->usedQuota() >= $user->quota() ? 0 : $user->quota() - $user->usedQuota())));
RMTemplate::get()->add_xoops_style('submit.css', 'galleries');
include 'footer.php';
}
示例4: showCategos
/**
* Muestra una lista de las categorías existentes
*/
function showCategos()
{
global $xoopsModule, $xoopsSecurity;
$row = array();
qpArrayCategos($row);
$categories = array();
$db = XoopsDatabaseFactory::getDatabaseConnection();
foreach ($row as $k) {
$catego = new QPCategory($k['id_cat']);
$catego->update();
list($num) = $db->fetchRow($db->query("SELECT COUNT(*) FROM " . $db->prefix("qpages_pages") . " WHERE cat='{$k['id_cat']}'"));
$k['posts'] = $num;
$k['nombre'] = str_repeat("—", $k['saltos']) . ' ' . $k['nombre'];
$categories[] = $k;
}
// Event
$categories = RMEvents::get()->run_event('qpages.categories.list', $categories);
RMTemplate::get()->add_style('admin.css', 'qpages');
RMTemplate::get()->add_script(RMCURL . '/include/js/jquery.checkboxes.js');
RMTemplate::get()->add_script('../include/js/qpages.js');
RMTemplate::get()->assign('xoops_pagetitle', __('Categories management', 'qpages'));
xoops_cp_location('<a href="./">' . $xoopsModule->name() . '</a> » ' . __('Categories', 'qpages'));
xoops_cp_header();
include RMTemplate::get()->get_template("admin/qp_categos.php", 'module', 'qpages');
xoops_cp_footer();
}
示例5: edit_bookmark
/**
* @desc Muestra el formulario para agregar un nuevo sitio
*/
function edit_bookmark()
{
global $xoopsModule, $xoopsConfig, $xoopsSecurity;
$id = rmc_server_var($_GET, 'id', 0);
if ($id <= 0) {
redirectMsg('bookmarks.php', __('Site ID not provided!', 'mywords'), 1);
die;
}
$book = new MWBookmark($id);
if ($book->isNew()) {
redirectMsg('bookmarks.php', __('Social site not exists!', 'mywords'), 1);
die;
}
$temp = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . '/modules/mywords/images/icons');
foreach ($temp as $icon) {
$icons[] = array('url' => XOOPS_URL . "/modules/mywords/images/icons/{$icon}", 'name' => $icon);
}
MWFunctions::include_required_files();
xoops_cp_location('<a href="./">' . $xoopsModule->name() . '</a> » <a href="bookmarks.php">' . __('Social Sites', 'mywords') . '</a> » ' . __('Editing Social Site', 'mywords'));
xoops_cp_header();
$show_edit = true;
include RMTemplate::get()->get_template('admin/mywords_bookmarks.php', 'module', 'mywords');
RMTemplate::get()->assign('xoops_pagetitle', __('Bookmarks Management', 'mywords'));
RMTemplate::get()->add_script(RMCURL . '/include/js/jquery.checkboxes.js');
RMTemplate::get()->add_script('../include/js/scripts.php?file=bookmarks.js');
xoops_cp_footer();
}
示例6: showTeams
/**
* @desc Muestra todos los equipos registrados
*/
function showTeams()
{
global $db, $tpl, $xoopsModule, $xoopsConfig, $adminTemplate;
$tpl->assign('lang_existing', _AS_TC_EXISTING);
$tpl->assign('lang_id', _AS_TC_ID);
$tpl->assign('lang_image', _AS_TC_IMAGE);
$tpl->assign('lang_name', _AS_TC_NAME);
$tpl->assign('lang_catego', _AS_TC_CATEGO);
$tpl->assign('lang_coachs', _AS_TC_COACHS);
$tpl->assign('lang_options', _OPTIONS);
$tpl->assign('lang_edit', _EDIT);
$tpl->assign('lang_delete', _DELETE);
$tpl->assign('lang_confirmm', _AS_TC_CONFM);
$tpl->assign('lang_confirm', _AS_TC_CONFDEL);
$tpl->assign('lang_date', _AS_TC_DATE);
$tpl->assign('lang_players', _AS_TC_PLAYERS);
$result = $db->query("SELECT * FROM " . $db->prefix("coach_teams") . " ORDER BY name");
$teams = array();
while ($row = $db->fetchArray($result)) {
$team = new TCTeam();
$team->assignVars($row);
$cat = new TCCategory($team->category());
$coachs = '';
foreach ($team->coachs(true) as $coach) {
$coachs .= $coachs == '' ? $coach->name() : '<br />' . $coach->name();
}
$teams[] = array('id' => $team->id(), 'name' => $team->name(), 'image' => $team->image(), 'catego' => $cat->name(), 'coachs' => $coachs, 'date' => formatTimestamp($team->created(), 'c'));
}
xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » " . _AS_TC_TEAMSLOC);
xoops_cp_header();
include RMTemplate::get()->get_template("admin/coach_teams.php", 'module', 'team');
xoops_cp_footer();
}
示例7: showLicences
/**
* @desc Visualiza todas las licencias existentes
**/
function showLicences()
{
global $xoopsModule, $xoopsSecurity;
$db = XoopsDatabaseFactory::getDatabaseConnection();
$sql = "SELECT * FROM " . $db->prefix('dtrans_licences');
$result = $db->queryF($sql);
$licences = array();
while ($rows = $db->fetchArray($result)) {
$lc = new DTLicense();
$lc->assignVars($rows);
$licences[] = array('id' => $lc->id(), 'name' => $lc->name(), 'url' => $lc->link(), 'type' => $lc->type());
}
RMTemplate::get()->add_xoops_style('admin.css', 'dtransport');
RMTemplate::get()->add_local_script('jquery.validate.min.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('jquery.checkboxes.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('admin.js', 'dtransport');
RMTemplate::get()->add_head('<script type="text/javascript">
var dt_message = "' . __('Do you really want to delete selected licenses', 'dtransport') . '";
var dt_select_message = "' . __('Select at least one licence to delete!', 'dtransport') . '";
</script>');
DTFunctions::toolbar();
xoops_cp_location("<a href='./'>" . $xoopsModule->name() . "</a> » " . __('Licences Management', 'dtransport'));
xoops_cp_header();
include RMTemplate::get()->get_template('admin/dtrans_licenses.php', 'module', 'dtransport');
xoops_cp_footer();
}
示例8: rmmfShow
/**
* Mostramos las categor?as
*/
function rmmfShow()
{
global $db;
define('RMCLOCATION', 'categories');
MFFunctions::toolbar();
RMTemplate::get()->add_head("<script type='text/javascript'>\n\t\t\t<!--\n\t\t\t\tfunction decision(message, url){\n\t\t\t\t\tif(confirm(message)) location.href = url;\n\t\t\t\t}\n\t\t\t-->\n\t\t </script>");
$result = array();
MFFunctions::get_categories($result);
include_once '../class/table.class.php';
$table = new MFTable(true);
$table->setCellStyle("padding: 0px; padding-left: 10px; border-bottom: 1px solid #0066CC; border-right: 1px solid #0066CC; background: url(../images/bgth.jpg) repeat-x; height: 20px; color: #FFFFFF;");
$table->openTbl('100%', '', 1);
$table->openRow('left');
$table->addCell(_MA_RMMF_CATEGOS, 1, 3);
$table->closeRow();
$table->setRowClass('head');
$table->setCellStyle("padding: 0px; padding-left: 3px; padding-right: 3px; border-bottom: 1px solid #DBE691; border-right: 1px solid #DBE691; background: url(../images/bghead.jpg) repeat-x; height: 20px; color: #000000;");
$table->openRow('center');
$table->addCell(_MA_RMMF_NAME, 0, '', 'center');
$table->addCell(_MA_RMMF_ORDER, 0, '', 'center');
$table->addCell(_MA_RMMF_OPTIONS, 0, '', 'center');
$table->closeRow();
$table->setRowClass('odd,even', true);
$table->setCellStyle('');
foreach ($result as $k => $v) {
$table->openRow();
$table->addCell(($v['saltos'] <= 0 ? "<img src='../images/plus.gif' border='0' align='absmiddle' />" : str_repeat(" ", $v['saltos']) . "<img src='../images/root.gif' border='0' align='absmiddle' />") . " <strong>{$v['nombre']}</strong>", 0, '', 'left');
$table->addCell($v['orden'], 0, '', 'center');
$table->addCell("<a href='?op=edit&id={$v['id_cat']}'>" . _MA_RMMF_EDIT . "</a> | \n\t\t\t\t\t<a href=\"javascript:decision('" . sprintf(_MA_RMMF_CONFIRM, $v['nombre']) . "','?op=del&id={$v['id_cat']}');\">" . _MA_RMMF_DELETE . "</a>", 0, '', 'center');
$table->closeRow();
}
$table->closeTbl();
xoops_cp_header();
xoops_cp_footer();
}
示例9: xt_menu_options
function xt_menu_options()
{
RMTemplate::get()->add_tool(__('Dashboard', 'xthemes'), 'index.php', 'images/dashboard.png', 'dashboard');
RMTemplate::get()->add_tool(__('Theme Settings', 'xthemes'), 'index.php?op=config', 'images/settings.png', 'settings');
RMTemplate::get()->add_tool(__('Catalog', 'xthemes'), 'index.php?op=catalog', 'images/catalog.png', 'catalog');
RMTemplate::get()->add_tool(__('About', 'xthemes'), 'index.php?op=about', 'images/about.png', 'about');
}
示例10: rd_block_resources
/**
* Este archivo permite controlar el bloque o los bloques
* Bloques Existentes:
*
* 1. Publicaciones Recientes
* 2. Publicaciones Populares (Mas Leídas)
* 3. Publicaciones Mejor Votadas
*/
function rd_block_resources($options)
{
global $xoopsModule;
include_once XOOPS_ROOT_PATH . '/modules/docs/class/rdresource.class.php';
$db = XoopsDatabaseFactory::getDatabaseConnection();
$mc = RMUtilities::module_config('docs');
$sql = "SELECT * FROM " . $db->prefix("rd_resources") . ' WHERE public=1 AND approved=1';
switch ($options[0]) {
case 'recents':
$sql .= " ORDER BY created DESC";
break;
case 'popular':
$sql .= " ORDER BY `reads` DESC";
break;
}
$sql .= " LIMIT 0, " . ($options[1] > 0 ? $options[1] : 5);
$result = $db->query($sql);
$block = array();
while ($row = $db->fetchArray($result)) {
$res = new RDResource();
$res->assignVars($row);
$ret = array();
$ret['id'] = $res->id();
$ret['title'] = $res->getVar('title');
if ($options[2]) {
$ret['desc'] = $options[3] == 0 ? $res->getVar('description') : TextCleaner::truncate($res->getVar('description'), $options[3]);
}
$ret['link'] = $res->permalink();
$ret['author'] = sprintf(__('Created by %s', 'docs'), '<strong>' . $res->getVar('owname') . '</strong>');
$ret['reads'] = sprintf(__('Viewed %s times', 'docs'), '<strong>' . $res->getVar('reads') . '</strong>');
$block['resources'][] = $ret;
}
RMTemplate::get()->add_style('blocks.css', 'docs');
return $block;
}
示例11: showFriends
/**
* @desc Visualiza la lista de amigos del usuario
**/
function showFriends()
{
global $xoopsOption, $tpl, $db, $xoopsUser, $xoopsModuleConfig, $pag, $xoopsConfig;
$xoopsOption['template_main'] = 'gs_panel_friends.html';
include 'header.php';
$mc =& $xoopsModuleConfig;
GSFunctions::makeHeader();
//Barra de Navegación
$sql = "SELECT COUNT(*) FROM " . $db->prefix('gs_friends') . " WHERE gsuser='" . $xoopsUser->uid() . "'";
$page = isset($pag) ? $pag : '';
$limit = 30;
list($num) = $db->fetchRow($db->query($sql));
if ($page > 0) {
$page -= 1;
}
$start = $page * $limit;
$tpages = (int) ($num / $limit);
if ($num % $limit > 0) {
$tpages++;
}
$pactual = $page + 1;
if ($pactual > $tpages) {
$rest = $pactual - $tpages;
$pactual = $pactual - $rest + 1;
$start = ($pactual - 1) * $limit;
}
if ($tpages > 1) {
if ($mc['urlmode']) {
$urlnav = 'cpanel/friends';
} else {
$urlnav = 'cpanel.php?by=cpanel/friends';
}
$nav = new GsPageNav($num, $limit, $start, 'pag', $urlnav, 0);
$tpl->assign('friendsNavPage', $nav->renderNav(4, 1));
}
$showmax = $start + $limit;
$showmax = $showmax > $num ? $num : $showmax;
$tpl->assign('lang_showing', sprintf(__('Sowing friends %u to %u from %u.', 'galleries'), $start + 1, $showmax, $num));
$tpl->assign('limit', $limit);
$tpl->assign('pag', $pactual);
//Fin de barra de navegación
$sql = "SELECT * FROM " . $db->prefix('gs_friends') . " WHERE gsuser='" . $xoopsUser->uid() . "'";
$sql .= " LIMIT {$start},{$limit}";
$result = $db->query($sql);
while ($row = $db->fetchArray($result)) {
$xu = new XoopsUser($row['uid']);
$tpl->append('users', array('uid' => $xu->uid(), 'uname' => $xu->uname(), 'link' => XOOPS_URL . "/modules/galleries/" . ($mc['urlmode'] ? "usr/" . $xu->uname() . "/" : "user.php?id=usr/" . $xu->uname()), 'avatar' => RMEvents::get()->run_event('rmcommon.get.avatar', $xu->email(), 0, $xu->user_avatar() != '' ? XOOPS_URL . '/uploads/avatars/' . $xu->user_avatar() : GS_URL . '/images/avatar.png')));
}
$tpl->assign('lang_uname', __('User name', 'galleries'));
$tpl->assign('lang_newfriend', __('New Friend', 'galleries'));
$tpl->assign('lang_del', __('Delete', 'galleries'));
$tpl->assign('lang_confirm', __('Do you really wish to delete specified friend?', 'galleries'));
$tpl->assign('lang_confirms', __('Do you really wish to delete selected friends?', 'galleries'));
$tpl->assign('form_action_add', GSFunctions::get_url() . ($mc['urlmode'] ? 'cp/add/' : '?cp=add'));
$tpl->assign('form_action_del', GSFunctions::get_url() . ($mc['urlmode'] ? 'cp/delete/' : '?cp=delete'));
$tpl->assign('delete_link', GSFunctions::get_url() . ($mc['urlmode'] ? 'cp/deletefriend/pag/' . $pactual . '/id/' : '?cp=deletefriend&page=' . $pactual . '&id='));
RMTemplate::get()->add_style('panel.css', 'galleries');
createLinks();
include 'footer.php';
}
示例12: show_rm_plugins
function show_rm_plugins()
{
$path = RMCPATH . '/plugins';
$dir_list = XoopsLists::getDirListAsArray($path);
$available_plugins = array();
$installed_plugins = array();
foreach ($dir_list as $dir) {
if (!file_exists($path . '/' . $dir . '/' . strtolower($dir) . '-plugin.php')) {
continue;
}
$phand = new RMPlugin($dir);
// PLugin handler
if ($phand->isNew()) {
$phand->setVar('dir', $dir);
$available_plugins[] = $phand;
} else {
$installed_plugins[] = $phand;
}
}
rm_reload_plugins();
RMFunctions::create_toolbar();
xoops_cp_header();
include RMTemplate::get()->get_template('rmc_plugins.php', 'module', 'rmcommon');
xoops_cp_footer();
}
示例13: render
public function render()
{
global $exmConfig;
/*$rtn = '';
$rtn .= '<div class="exmDateField">
<div id="txt_'.$this->getName().'" class="exmTextDate">'.($this->_date===null ? _RMS_CFD_SDTXT : date($this->_showtime ? $exmConfig['datestring'] : $exmConfig['dateshort'], $this->_date)).'</div>';
$rtn .= '<img title="'._RMS_CFD_CLICKTOSEL.'" src="'.ABSURL.'/rmcommon/images/calendar.png" alt="" class="exmfield_date_show_date" onclick="showEXMDates(\''.$this->getName().'\','.$this->_showtime.','.($this->_date===null ? "'time'" : $this->_date).');" style="cursor: pointer;" />';
$rtn .= '<img title="'._RMS_CFD_CLICKTOCLEAR.'" src="'.ABSURL.'/rmcommon/images/calendardel.png" alt="" onclick="clearEXMDates(\''.$this->getName().'\');" style="cursor: pointer;" />';
$rtn .= '<input type="hidden" name="'.$this->getName().'" id="'.$this->getName().'" value="'.($this->_date===null ? '' : $this->_date).'" /></div>';
if (!defined('RM_FRAME_DATETIME_DIVOK')){
$rtn .= "<div id='exmDatesContainer' class='exmDates'></div>";
define('RM_FRAME_DATETIME_DIVOK', 1);
}*/
if ($this->time == 1) {
RMTemplate::get()->add_head("\n<script type='text/javascript'>\n \nvar " . $this->getName() . "_time = 1;\n \n\$(function(){\n \n\$(\"#exmdate-" . $this->getName() . "\").datetimepicker({changeMonth: true,changeYear: true, yearRange: '" . $this->year_range . "'" . ($this->options != '' ? "," . $this->options : "") . "});\n \n});\n</script>\n \n");
$date = '';
if ($this->_date > 0) {
$date = date('m/d/Y H:i:s', $this->_date);
}
} elseif ($this->time == 0) {
RMTemplate::get()->add_head("\n<script type='text/javascript'>\n \nvar " . $this->getName() . "_time = 0;\n \n\$(function(){\n \n\$(\"#exmdate-" . $this->getName() . "\").datepicker({changeMonth: true,changeYear: true, yearRange: '" . $this->year_range . "'" . ($this->options != '' ? "," . $this->options : "") . "});\n \n});\n</script>\n \n");
if ($this->_date > 0) {
$date = date('m/d/Y', $this->_date);
}
} elseif ($this->time == 2) {
RMTemplate::get()->add_head("\n<script type='text/javascript'>\n \nvar " . $this->getName() . "_time = 2;\n \n\$(function(){\n \n\$(\"#exmdate-" . $this->getName() . "\").timepicker({changeMonth: true,changeYear: true, yearRange: '" . $this->year_range . "'" . ($this->options != '' ? "," . $this->options : "") . ", timeOnlyTitle: '" . __('Choose Time', 'rmcommon') . "'});\n \n});\n</script>\n \n");
if ($this->_date != '') {
$date = $this->_date;
}
}
$rtn = "<input type='text' class='exmdates_field' name='text_" . $this->getName() . "' id=\"exmdate-" . $this->getName() . "\"' size='20' maxlength='19' value='" . $date . "' />\n <input type='hidden' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $date . "' />";
return $rtn;
}
示例14: show_rss_content
function show_rss_content()
{
global $xoopsConfig;
include_once $GLOBALS['xoops']->path('class/template.php');
$tpl = new XoopsTpl();
$module = rmc_server_var($_GET, 'mod', '');
if ($module == '') {
redirect_header('backend.php', 1, __('Choose an option to see its feed', 'rmcommon'));
die;
}
if (!file_exists(XOOPS_ROOT_PATH . '/modules/' . $module . '/rss.php')) {
redirect_header('backend.php', 1, __('This module does not support rss feeds', 'rmcommon'));
die;
}
$GLOBALS['xoopsLogger']->activated = false;
if (function_exists('mb_http_output')) {
mb_http_output('pass');
}
header('Content-Type:text/xml; charset=utf-8');
include XOOPS_ROOT_PATH . '/modules/' . $module . '/rss.php';
if (!isset($rss_channel['image'])) {
$rmc_config = RMFunctions::configs();
$rss_channel['image']['url'] = $rmc_config['rssimage'];
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png');
$rss_channel['image']['width'] = $dimention[0] > 144 ? 144 : $dimention[0];
$rss_channel['image']['height'] = $dimention[1] > 400 ? 400 : $dimention[1];
}
include RMTemplate::get()->get_template('rmc_rss.php', 'module', 'rmcommon');
}
示例15: cu_render_output
/**
* Modify the page output to include some new features
*
* @param mixed $output
* @return string
*/
function cu_render_output($output)
{
global $xoTheme, $xoopsTpl;
if (function_exists('xoops_cp_header')) {
return $output;
}
$page = $output;
if ($xoopsTpl) {
if (defined('COMMENTS_INCLUDED') && COMMENTS_INCLUDED) {
RMTemplate::get()->add_xoops_style('comments.css', 'rmcommon');
}
}
include_once RMTemplate::get()->tpl_path('rmc_header.php', 'rmcommon');
$rtn .= $scripts;
$rtn .= $styles;
$rtn .= $heads;
$pos = strpos($page, "<!-- RMTemplateHeader -->");
if ($pos !== FALSE) {
$page = str_replace('<!-- RMTemplateHeader -->', $rtn, $page);
$page = RMEvents::get()->run_event('rmcommon.end.flush', $page);
return $page;
}
$pos = strpos($page, "</head>");
if ($pos === FALSE) {
return $output;
}
$ret = substr($page, 0, $pos) . "\n";
$ret .= $rtn;
$ret .= substr($page, $pos);
$ret = RMEvents::get()->run_event('rmcommon.end.flush', $ret);
return $ret;
}