コード例 #1
0
ファイル: xoops_quote.php プロジェクト: ming-hai/XoopsCore
use Xoops\Core\XoopsTpl;
require_once dirname(__FILE__) . '/../../../../../../mainfile.php';
$xoops = Xoops::getInstance();
$xoops->disableErrorReporting();
$xoops->simpleHeader(true);
$form = new Xoops\Form\ThemeForm('', 'imagecat_form', '#', false, 'vertical');
$form->addElement(new Xoops\Form\TextArea(XoopsLocale::PASTE_THE_QUOTE_YOU_WANT_TO_INSERT, 'text_id', '', 9, 7));
/**
 * Buttons
 */
$button_tray = new Xoops\Form\ElementTray('', '');
$button_tray->addElement(new Xoops\Form\Hidden('op', 'save'));
$button = new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit');
$button->setExtra('onclick="Xoops_quoteDialog.insert();"');
$button->setClass('btn btn-success');
$button_tray->addElement($button);
$button_2 = new Xoops\Form\Button('', 'reset', XoopsLocale::A_RESET, 'reset');
$button_2->setClass('btn btn-warning');
$button_tray->addElement($button_2);
$button_3 = new Xoops\Form\Button('', 'button', XoopsLocale::A_CLOSE, 'button');
$button_3->setExtra('onclick="tinyMCEPopup.close();"');
$button_3->setClass('btn btn-danger');
$button_tray->addElement($button_3);
$form->addElement($button_tray);
$xoopsTpl = new XoopsTpl();
$xoopsTpl->assign('js_file', 'js/xoops_quote.js');
$xoopsTpl->assign('css_file', 'css/xoops_quote.css');
$xoopsTpl->assign('form', $form->render());
$xoopsTpl->assign('include_html', '');
$xoopsTpl->display('module:system/system_tinymce.tpl');
$xoops->simpleFooter();
コード例 #2
0
ファイル: print.php プロジェクト: ming-hai/XoopsCore
include_once 'header.php';
// Call header
$xoops->logger()->quiet();
// Get ID
$content_id = Request::getInt('id', 0);
// Permission to view
$perm_view = $gperm_Handler->checkRight('page_view_item', $content_id, $groups, $module_id, false);
if (!$perm_view) {
    $xoops->redirect('javascript:history.go(-1)', 2, XoopsLocale::E_NO_ACCESS_PERMISSION);
    exit;
}
// Get content
$view_content = $content_Handler->get($content_id);
// Test if the page exist
if (count($view_content) == 0 || $view_content->getVar('content_status') == 0) {
    $xoops->redirect('index.php', 3, PageLocale::E_NOT_EXIST);
    exit;
}
$tpl = new XoopsTpl();
// content
$content = $view_content->getValues();
foreach ($content as $k => $v) {
    $tpl->assign($k, $v);
}
// related
$tpl->assign('related', $link_Handler->menu_related($content_id));
$tpl->assign('xoops_sitename', $xoops->getConfig('sitename'));
// Meta
$tpl->assign('xoops_pagetitle', strip_tags($view_content->getVar('content_title') . ' - ' . XoopsLocale::A_PRINT . ' - ' . $xoopsModule->name()));
$tpl->display('module:page/page_print.tpl');
コード例 #3
0
ファイル: xoops_smilies.php プロジェクト: ming-hai/XoopsCore
    $mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
    $upload_size = 500000;
    $uploader = new XoopsMediaUploader(\XoopsBaseConfig::get('uploads-path') . '/smilies', $mimetypes, $upload_size, null, null);
    if ($uploader->fetchMedia($xoops_upload_file[0])) {
        $uploader->setPrefix('smil');
        if (!$uploader->upload()) {
            $msg[] = $uploader->getErrors();
            $obj->setVar('smiley_url', 'blank.gif');
        } else {
            $obj->setVar('smiley_url', 'smilies/' . $uploader->getSavedFileName());
        }
    }
    if ($helper->getHandlerSmilies()->insert($obj)) {
        $xoops->redirect('xoops_smilies.php', 2, implode('<br />', $msg));
    }
}
$xoopsTpl = new XoopsTpl();
if ($op === 'more') {
    $xoopsTpl->assign('smileys', Xoops\Module\Helper::getHelper('smilies')->getHandlerSmilies()->getSmilies(0, 0, false));
} else {
    $xoopsTpl->assign('smileys', Xoops\Module\Helper::getHelper('smilies')->getHandlerSmilies()->getActiveSmilies(false));
}
// check user/group
$groups = $xoops->getUserGroups();
$gperm_handler = $xoops->getHandlerGroupPermission();
$admin = $gperm_handler->checkRight('system_admin', $xoops->getHandlerModule()->getByDirname('smilies')->getVar('mid'), $groups);
if ($admin) {
    $xoopsTpl->assign('form_add', $helper->getForm($helper->getHandlerSmilies()->create(), 'smilies')->render());
}
$xoopsTpl->display('module:smilies/smilies_tinymce.tpl');
$xoops->simpleFooter();
コード例 #4
0
ファイル: xoops_images.php プロジェクト: ming-hai/XoopsCore
            } else {
                $obj->setVar('image_mimetype', $uploader->getMediaType());
                if ($category->getVar('imgcat_storetype') === 'db') {
                    $fp = @fopen($uploader->getSavedDestination(), 'rb');
                    $fbinary = @fread($fp, filesize($uploader->getSavedDestination()));
                    @fclose($fp);
                    $image_body = $fbinary;
                } else {
                    $obj->setVar('image_name', 'images/' . $uploader->getSavedFileName());
                }
            }
        }
        if ($image_id = $helper->getHandlerImages()->insert($obj)) {
            if ($category->getVar('imgcat_storetype') === 'db') {
                $imagebody = $helper->getHandlerImagesBody()->get($image_id);
                if (!is_object($imagebody)) {
                    $imagebody = $helper->getHandlerImagesBody()->create();
                    $imagebody->setVar('image_id', $image_id);
                }
                $imagebody->setVar('image_body', $image_body);
                if ($helper->getHandlerImagesBody()->insert($imagebody)) {
                    @unlink($uploader->getSavedDestination());
                }
            }
            $xoops->redirect('xoops_images.php?imgcat_id=' . $imgcat_id, 2, implode('<br />', $msg));
        }
        echo $xoops->alert('error', $obj->getHtmlErrors());
        break;
}
$xoopsTpl->display('module:images/images_tinymce.tpl');
$xoops->simpleFooter();
コード例 #5
0
ファイル: pmlite.php プロジェクト: ming-hai/XoopsCore
                $subject = $myts->htmlSpecialChars($_POST['subject']);
                $message = $myts->htmlSpecialChars($_POST['message']);
            } else {
                if ($send2 == 1) {
                    $form->addElement(new Xoops\Form\Label(XoopsLocale::C_TO, XoopsUser::getUnameFromId($to_userid, false)));
                    $form->addElement(new Xoops\Form\Hidden('to_userid', $to_userid));
                } else {
                    $form->addElement(new Xoops\Form\SelectUser(XoopsLocale::C_TO, 'to_userid'));
                }
                $subject = "";
                $message = "";
            }
        }
        $form->addElement(new Xoops\Form\Text(XoopsLocale::SUBJECT, 'subject', 4, 100, $subject), true);
        $icons = new Xoops\Form\Radio(XoopsLocale::MESSAGE_ICON, 'msg_image', '', true);
        \Xoops\Core\Lists\SubjectIcon::setOptionsArray($icons);
        $form->addElement($icons, false);
        $form->addElement(new Xoops\Form\DhtmlTextArea(XoopsLocale::MESSAGE, 'message', $message, 8, 37), true);
        $form->addElement(new Xoops\Form\Hidden('op', 'submit'));
        $buttons = new Xoops\Form\ElementTray('');
        $buttons->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
        $buttons->addElement(new Xoops\Form\Button('', 'reset', XoopsLocale::A_CLEAR, 'reset'));
        $cancel_send = new Xoops\Form\Button('', 'cancel', XoopsLocale::CANCEL_SEND, 'button');
        $cancel_send->set('onclick', 'javascript:window.close();');
        $buttons->addElement($cancel_send);
        $form->addElement($buttons);
        $tpl->assign('form', $form->render());
        $tpl->display("module:system/system_pmlite.tpl");
    }
}
$xoops->simpleFooter();
コード例 #6
0
ファイル: print.php プロジェクト: ming-hai/XoopsCore
$myts = \Xoops\Core\Text\Sanitizer::getInstance();
$item['title'] = $itemObj->title();
$item['body'] = $itemObj->body();
$item['categoryname'] = $myts->displayTarea($categoryObj->getVar('name'));
$mainImage = $itemObj->getMainImage();
if ($mainImage['image_path'] != '') {
    $item['image'] = '<img src="' . $mainImage['image_path'] . '" alt="' . $myts->undoHtmlSpecialChars($mainImage['image_name']) . '"/>';
}
$xoopsTpl->assign('item', $item);
$xoopsTpl->assign('printtitle', $xoops->getConfig('sitename') . " - " . PublisherUtils::html2text($categoryObj->getCategoryPath()) . " > " . $myts->displayTarea($itemObj->title()));
$xoopsTpl->assign('printlogourl', $publisher->getConfig('print_logourl'));
$xoopsTpl->assign('printheader', $myts->displayTarea($publisher->getConfig('print_header'), 1));
$xoopsTpl->assign('lang_category', _CO_PUBLISHER_CATEGORY);
$xoopsTpl->assign('lang_author_date', sprintf(_MD_PUBLISHER_WHO_WHEN, $itemObj->posterName(), $itemObj->datesub()));
$doNotStartPrint = false;
$noTitle = false;
$noCategory = false;
$smartPopup = false;
$xoopsTpl->assign('doNotStartPrint', $doNotStartPrint);
$xoopsTpl->assign('noTitle', $noTitle);
$xoopsTpl->assign('smartPopup', $smartPopup);
$xoopsTpl->assign('current_language', $xoops->getConfig('language'));
if ($publisher->getConfig('print_footer') === 'item footer' || $publisher->getConfig('print_footer') === 'both') {
    $xoopsTpl->assign('itemfooter', $myts->displayTarea($publisher->getConfig('item_footer'), 1));
}
if ($publisher->getConfig('print_footer') === 'index footer' || $publisher->getConfig('print_footer') === 'both') {
    $xoopsTpl->assign('indexfooter', $myts->displayTarea($publisher->getConfig('index_footer'), 1));
}
$xoopsTpl->assign('display_whowhen_link', $publisher->getConfig('item_disp_whowhen_link'));
$xoopsTpl->display('module:publisher/publisher_print.tpl');
コード例 #7
0
ファイル: popup.php プロジェクト: ming-hai/XoopsCore
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
use Xoops\Core\Request;
use Xoops\Core\XoopsTpl;
/**
 * smilies module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         smilies
 * @since           2.6.0
 * @author          Mage Grégory (AKA Mage)
 */
include dirname(dirname(__DIR__)) . '/mainfile.php';
$xoops = Xoops::getInstance();
$xoops->logger()->quiet();
$target = Request::getString('target', '');
$xoops->simpleHeader(false);
if ($target && preg_match('/^[0-9a-z_]*$/i', $target)) {
    $tpl = new XoopsTpl();
    $tpl->assign('target', $target);
    $tpl->assign('smileys', $xoops->getModuleHandler('smiley', 'smilies')->getActiveSmilies(false));
    $tpl->assign('closebutton', 1);
    $tpl->display('module:smilies/smilies_smiley.tpl');
}
$xoops->simpleFooter();
コード例 #8
0
ファイル: backend.php プロジェクト: ming-hai/XoopsCore
    $tpl->assign('channel_webmaster', $xoops->getConfig('adminmail'));
    $tpl->assign('channel_editor', $xoops->getConfig('adminmail'));
    if ($categoryid != -1) {
        $channel_category .= " > " . $categoryObj->getVar('name');
    }
    $tpl->assign('channel_category', htmlspecialchars($channel_category));
    $tpl->assign('channel_generator', $publisher->getModule()->getVar('name'));
    $tpl->assign('channel_language', XoopsLocale::getLangCode());
    $tpl->assign('image_url', \XoopsBaseConfig::get('url') . '/images/logo.gif');
    $dimention = getimagesize(\XoopsBaseConfig::get('root-path') . '/images/logo.gif');
    if (empty($dimention[0])) {
        $width = 140;
        $height = 140;
    } else {
        $width = $dimention[0] > 140 ? 140 : $dimention[0];
        $dimention[1] = $dimention[1] * $width / $dimention[0];
        $height = $dimention[1] > 140 ? $dimention[1] * $dimention[0] / 140 : $dimention[1];
    }
    $tpl->assign('image_width', $width);
    $tpl->assign('image_height', $height);
    $sarray = $publisher->getItemHandler()->getAllPublished(10, 0, $categoryid);
    if (is_array($sarray)) {
        $count = $sarray;
        /* @var $item PublisherItem */
        foreach ($sarray as $item) {
            $tpl->append('items', array('title' => htmlspecialchars($item->title(), ENT_QUOTES), 'link' => $item->getItemUrl(), 'guid' => $item->getItemUrl(), 'pubdate' => XoopsLocale::formatTimestamp($item->getVar('datesub'), 'rss'), 'description' => htmlspecialchars($item->getBlockSummary(300, true), ENT_QUOTES)));
        }
    }
}
$tpl->display('module:publisher/publisher_rss.tpl');
コード例 #9
0
if ($op === 'save') {
    if (!$xoops->security()->check()) {
        $xoops->redirect('xoops_xlanguage.php', 2, implode(',', $xoops->security()->getErrors()));
    }
    XoopsLoad::load('system', 'system');
    $lang = $helper->getHandlerLanguage()->create();
    $lang->CleanVarsForDB();
    if ($helper->getHandlerLanguage()->insert($lang)) {
        $helper->getHandlerLanguage()->createConfig();
        $xoops->redirect('xoops_xlanguage.php', 2, _AM_XLANGUAGE_SAVED);
    }
}
// check user/group
$groups = $xoops->getUserGroups();
$gperm_handler = $xoops->getHandlerGroupPermission();
$admin = false;
if ($gperm_handler) {
    $xlanguage = $xoops->getHandlerModule()->getByDirname('xlanguage');
    if ($xlanguage) {
        $admin = $gperm_handler->checkRight('system_admin', $xlanguage->getVar('mid'), $groups);
    }
}
$xoopsTpl = new XoopsTpl();
if ($helper) {
    $xoopsTpl->assign('form_txt', $helper->getForm($helper->getHandlerLanguage()->loadConfig(), 'tinymce')->render());
    if ($admin) {
        $xoopsTpl->assign('form_add', $helper->getForm($helper->getHandlerLanguage()->create(), 'language')->render());
    }
}
$xoopsTpl->display('module:xlanguage/xlanguage_tinymce.tpl');
$xoops->simpleFooter();
コード例 #10
0
ファイル: backend.php プロジェクト: ming-hai/XoopsCore
    $tpl->assign('image_width', $dimension[0]);
    $tpl->assign('image_height', $dimension[1]);
    $items = array();
    if ($xoops->isModule()) {
        /* @var $plugin SystemPluginInterface */
        $plugin = Xoops\Module\Plugin::getPlugin($dirname, 'system');
        $res = $plugin->backend(10);
        if (is_array($res) && count($res) > 0) {
            foreach ($res as $item) {
                $date[] = array('date' => $item['date']);
                $items[] = array('date' => XoopsLocale::formatTimestamp($item['date'], 'rss'), 'title' => $myts->htmlSpecialChars($item['title']), 'content' => $myts->htmlSpecialChars($item['content']), 'link' => $item['link'], 'guid' => $item['link']);
            }
        }
    } else {
        $plugins = Xoops\Module\Plugin::getPlugins('system');
        /* @var $plugin SystemPluginInterface */
        foreach ($plugins as $plugin) {
            $res = $plugin->backend(10);
            if (is_array($res) && count($res) > 0) {
                foreach ($res as $item) {
                    $date[] = array('date' => $item['date']);
                    $items[] = array('date' => XoopsLocale::formatTimestamp($item['date'], 'rss'), 'title' => $myts->htmlSpecialChars($item['title']), 'content' => $myts->htmlSpecialChars($item['content']), 'link' => $item['link'], 'guid' => $item['link']);
                }
            }
        }
    }
    array_multisort($date, SORT_DESC, $items);
    $tpl->assign('items', $items);
}
$tpl->display('module:' . $dirname . '/system_rss.tpl');
コード例 #11
0
ファイル: misc.php プロジェクト: ming-hai/XoopsCore
                    $avatar = $response->getValue();
                    $avatar = empty($avatar) ? $xoops_upload_url . '/blank.gif' : $avatar;
                    $onlineUsers[$i]['avatar'] = $avatar;
                } else {
                    $onlineUsers[$i]['name'] = $xoops->getConfig('anonymous');
                    $onlineUsers[$i]['avatar'] = $xoops_upload_url . '/blank.gif';
                }
            }
            $tpl = new XoopsTpl();
            if ($online_total > 20) {
                $nav = new XoopsPageNav($online_total, 20, $start, 'start', 'action=showpopups&amp;type=online');
                $tpl->assign('nav', $nav->renderNav());
            }
            $tpl->assign('onlineusers', $onlineUsers);
            $tpl->assign('isadmin', $isadmin);
            $tpl->assign('closebutton', $closebutton);
            $tpl->display('module:system/system_misc_online.tpl');
            break;
        case 'ssllogin':
            if ($xoops->getConfig('use_ssl') && isset($_POST[$xoops->getConfig('sslpost_name')]) && $xoops->isUser()) {
                $xoops->loadLanguage('user');
                echo sprintf(XoopsLocale::E_INCORRECT_LOGIN, $xoops->user->getVar('uname'));
                echo '<div style="text-align:center;"><input class="formButton" value="' . XoopsLocale::A_CLOSE . '" type="button" onclick="window.opener.location.reload();window.close();" /></div>';
                $closebutton = false;
            }
            break;
        default:
            break;
    }
    $xoops->simpleFooter();
}
コード例 #12
0
ファイル: imagemanager.php プロジェクト: ming-hai/XoopsCore
                if ($category->getVar('imgcat_storetype') === 'db') {
                    $fp = @fopen($uploader->getSavedDestination(), 'rb');
                    $fbinary = @fread($fp, filesize($uploader->getSavedDestination()));
                    @fclose($fp);
                    $image_body = $fbinary;
                } else {
                    $obj->setVar('image_name', 'images/' . $uploader->getSavedFileName());
                }
            }
        }
        if ($image_id = $helper->getHandlerImages()->insert($obj)) {
            if ($category->getVar('imgcat_storetype') === 'db') {
                $imagebody = $helper->getHandlerImagesBody()->get($image_id);
                if (!is_object($imagebody)) {
                    $imagebody = $helper->getHandlerImagesBody()->create();
                    $imagebody->setVar('image_id', $image_id);
                }
                $imagebody->setVar('image_body', $image_body);
                if ($helper->getHandlerImagesBody()->insert($imagebody)) {
                    @unlink($uploader->getSavedDestination());
                }
            }
            $xoops->redirect('imagemanager.php?target=' . $target . '&imgcat_id=' . $imgcat_id, 2, implode('<br />', $msg));
        }
        echo $xoops->alert('error', $obj->getHtmlErrors());
        break;
}
$xoopsTpl->assign('xsize', 800);
$xoopsTpl->assign('ysize', 600);
$xoopsTpl->display('module:images/images_imagemanager.tpl');
$xoops->simpleFooter();
コード例 #13
0
ファイル: pmlite.php プロジェクト: ming-hai/XoopsCore
                $message = $myts->htmlSpecialChars($_POST['message']);
            } else {
                if ($send2 == 1) {
                    $form->addElement(new Xoops\Form\Label(_PM_TO, XoopsUser::getUnameFromId($to_userid, false)));
                    $form->addElement(new Xoops\Form\Hidden('to_userid', $to_userid));
                } else {
                    $form->addElement(new Xoops\Form\SelectUser(_PM_TO, 'to_userid'));
                }
                $subject = "";
                $message = "";
            }
        }
        $form->addElement(new Xoops\Form\Text(_PM_SUBJECTC, 'subject', 4, 100, $subject), true);
        $icons = new Xoops\Form\Radio(XoopsLocale::MESSAGE_ICON, 'msg_image', '', true);
        \Xoops\Core\Lists\SubjectIcon::setOptionsArray($icons);
        $form->addElement($icons, false);
        $form->addElement(new Xoops\Form\DhtmlTextArea(_PM_MESSAGEC, 'message', $message, 8, 37), true);
        $form->addElement(new Xoops\Form\RadioYesNo(_PM_SAVEINOUTBOX, 'savecopy', 0));
        $form->addElement(new Xoops\Form\Hidden('op', 'submit'));
        $buttons = new Xoops\Form\ElementTray('');
        $buttons->addElement(new Xoops\Form\Button('', 'submit', XoopsLocale::A_SUBMIT, 'submit'));
        $buttons->addElement(new Xoops\Form\Button('', 'reset', _PM_CLEAR, 'reset'));
        $buttonCancelSend = new Xoops\Form\Button('', 'cancel', _PM_CANCELSEND, 'button');
        $buttonCancelSend->set('onclick', 'javascript:window.close();');
        $buttons->addElement($buttonCancelSend);
        $form->addElement($buttons);
        $tpl->assign('form', $form->render());
        $tpl->display("module:pm/pm_pmlite.tpl");
    }
}
$xoops->simpleFooter();
コード例 #14
0
ファイル: XoopsTheme.php プロジェクト: ming-hai/XoopsCore
 /**
  * Render the page
  * The theme engine builds pages from 2 templates: canvas and content.
  * A module can call this method directly and specify what templates the theme engine must use.
  * If render() hasn't been called before, the theme defaults will be used for the canvas and
  * page template (and xoopsOption['template_main'] for the content).
  *
  * @param string $canvasTpl  The canvas template, if different from the theme default
  * @param string $pageTpl    The page template, if different from the theme default (unsupported, 2.3+ only)
  * @param string $contentTpl The content template
  * @param array  $vars       Template variables to send to the template engine
  *
  * @return bool
  */
 public function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array())
 {
     if ($this->renderCount) {
         return false;
     }
     $xoops = \Xoops::getInstance();
     $xoops->events()->triggerEvent('core.theme.render.start', array($this));
     $cache = $xoops->cache($this->headersCacheEngine);
     //Get meta information for cached pages
     if ($this->contentCacheLifetime && $this->contentCacheId && ($content = $cache->read($this->contentCacheId))) {
         //we need to merge metas set by blocks with the module cached meta
         $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']);
         foreach ($content['metas'] as $type => $value) {
             $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]);
         }
         $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']);
         $xoops->setOption('xoops_module_header', $content['header']);
     }
     if ($xoops->getOption('xoops_pagetitle')) {
         $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle'));
     }
     $header = !$xoops->getOption('xoops_module_header') ? $this->template->getTemplateVars('xoops_module_header') : $xoops->getOption('xoops_module_header');
     //save meta information of cached pages
     if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) {
         $content['htmlHeadStrings'] = (array) $this->htmlHeadStrings;
         $content['metas'] = (array) $this->metas;
         $content['xoops_pagetitle'] = $this->template->getTemplateVars('xoops_pagetitle');
         $content['header'] = $header;
         $cache->write($this->contentCacheId, $content);
     }
     //  @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice
     $old = array('robots', 'keywords', 'description', 'rating', 'author', 'copyright');
     foreach ($this->metas['meta'] as $name => $value) {
         if (in_array($name, $old)) {
             $this->template->assign("xoops_meta_{$name}", htmlspecialchars($value, ENT_QUOTES));
             unset($this->metas['meta'][$name]);
         }
     }
     // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and
     // $this->template->getTemplateVars( 'xoops_module_header' ) ?
     $this->template->assign('xoops_module_header', $this->renderMetas(true) . "\n" . $header);
     if ($canvasTpl) {
         $this->canvasTemplate = $canvasTpl;
     }
     if ($contentTpl) {
         $this->contentTemplate = $contentTpl;
     }
     if (!empty($vars)) {
         $this->template->assign($vars);
     }
     if ($this->contentTemplate) {
         $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId);
     }
     if ($this->bufferOutput) {
         $this->content .= ob_get_contents();
         ob_end_clean();
     }
     $this->template->assignByRef('xoops_contents', $this->content);
     // Do not cache the main (theme.html) template output
     $this->template->caching = 0;
     if (false === (bool) $xoops->getConfig('disable_theme_shortcodes')) {
         $this->template->loadFilter('output', 'shortcodes');
     }
     $this->template->display($this->path . '/' . $this->canvasTemplate);
     $this->renderCount++;
     $xoops->events()->triggerEvent('core.theme.render.end', array($this));
     return true;
 }