示例#1
0
 /**
  * Include files to document
  * @param array $files
  * @param       $type
  */
 protected function _include(array $files, $type)
 {
     static $includedFiles;
     if (!isset($includedFiles)) {
         $includedFiles = array();
     }
     if (count($files) && !$this->app->jbrequest->isAjax()) {
         foreach ($files as $file) {
             $isExternal = strpos($file, 'http') !== false;
             $filePath = $file;
             if (!$isExternal) {
                 $fullPath = $this->app->path->path($file);
                 $filePath = $this->app->path->url($file);
             }
             if ($filePath) {
                 if (!$isExternal) {
                     $filePath = $filePath . '?ver=' . date("Ymd", filemtime($fullPath));
                     $filePath = $this->_getRoot() . $this->app->path->relative($filePath);
                 }
                 if ($type == 'css') {
                     $this->_document->addStylesheet($filePath);
                 } elseif ($type == 'js') {
                     $this->_document->addScript($filePath);
                 }
             }
         }
     }
 }
示例#2
0
function modChrome_CoverColumns($module, &$params, &$attribs)
{
    $col = "col-xs-12";
    switch (JDocumentHTML::countModules($module->position)) {
        case 1:
        default:
            $col = " col-xs-12";
            break;
        case 2:
            $col .= " col-sm-6";
            break;
        case 3:
            $col .= " col-sm-4";
            break;
        case 4:
            $col .= " col-sm-6 cod-md-3";
            break;
    }
    ?>
<div class="<?php 
    echo $col . " covercolumns-" . $attribs['side'];
    ?>
">
    <?php 
    echo $module->content;
    ?>
</div>
<?php 
}
示例#3
0
 /**
  * Fix link in the canonical metatag
  * It works only with
  * - item
  * - category
  */
 public function canonicalFix()
 {
     if (!$this->_jbrequest->is('option', 'com_zoo')) {
         return null;
     }
     $this->_jbdebug->mark('jbzoo-sef::canonicalFix::start');
     $flags = array($this->_jbrequest->getWord('task'), $this->_jbrequest->getWord('view'), $this->_jbrequest->getWord('layout'));
     $newCanUrl = null;
     if (in_array('item', $flags)) {
         $itemId = $this->_jbrequest->getSystem('item');
         $newCanUrl = $this->_getUrl($this->_itemTable->get($itemId), 'item');
     } else {
         if (in_array('category', $flags)) {
             $categoryId = $this->_jbrequest->getSystem('category');
             $newCanUrl = $this->_getUrl($this->_catTable->get($categoryId), 'category');
         }
     }
     if ($newCanUrl) {
         // remove all canocical link
         $headData = $this->_joomlaDoc->getHeadData();
         $canKey = array_search(array('relation' => 'canonical', 'relType' => 'rel', 'attribs' => array()), $headData['links']);
         unset($headData['links'][$canKey]);
         $this->_joomlaDoc->setHeadData($headData);
         // set new url
         $baseUrl = $this->_jbrouter->getHostUrl();
         $this->_joomlaDoc->addHeadLink($baseUrl . $newCanUrl, 'canonical');
     }
     $this->_jbdebug->mark('jbzoo-sef::canonicalFix::finish');
 }
示例#4
0
 /**
  * Register asset files for the template admin
  *
  * @return void
  */
 public function registerAssets()
 {
     // Load required asset files for Joomla 2.5
     if (version_compare($this->version->getShortVersion(), '3.0', '<')) {
         $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery/jquery-1.8.2.js');
         $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/bootstrap/css/bootstrap.min.css');
         $this->doc->addScript($this->baseAssetUrl . '/3rd-party/bootstrap/js/bootstrap.min.js');
     } elseif (version_compare($this->version->getShortVersion(), '3.2', '>=')) {
         $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery/jquery-1.8.2.js');
         $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/bootstrap/css/bootstrap.min.css');
         $this->doc->addScript($this->baseAssetUrl . '/3rd-party/bootstrap/js/bootstrap.min.js');
     }
     //$this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css');
     //$this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-ui/js/jquery-ui-1.9.1.custom.min.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-ui/css/ui-bootstrap-1.10.0/jquery-ui-1.10.0.custom.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-ui/js/jquery-ui-1.10.4.custom.min.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-dynatree/skin/ui.dynatree.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-dynatree/jquery.dynatree.min.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-tipsy/tipsy.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-tipsy/jquery.tipsy.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/chosen/chosen.min.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/chosen/chosen.jquery.min.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/bxslider/jquery.bxslider.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/bxslider/jquery.bxslider.min.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/colorbox/colorbox.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/colorbox/jquery.colorbox-min.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/font-icomoon/css/icomoon.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-layout/jquery.layout.min.js');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-ck/jquery.ck.js');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-gui.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-admin.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-fonticomoon.css');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/media.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/sample-data.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/update.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/upgrade.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/quickstart.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/core.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/font.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/layout.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/maintenance.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/social-integration.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/validate.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/width-type.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/modal.js');
     $templateEdition = JSNTplHelper::getTemplateEdition($this->data->template);
     $jversion = new JVersion();
     if (version_compare($jversion->getShortVersion(), "3.0", ">=")) {
         $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-megamenu-backend.css');
         $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/megamenu/handle-settings.js');
         $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/megamenu/handle.js');
         $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/megamenu/layout.js');
         $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/megamenu/megamenu.js');
         $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/megamenu/placeholder.js');
     }
     $templateName = JText::_($this->data->template);
     $this->doc->addScriptDeclaration("!function (\$) {\n\t\t\t\t\"use strict\";\n\n\t\t\t\t\$(function () {\n\t\t\t\t\tnew \$.JSNTPLFrameworkCore({\n\t\t\t\t\t\ttemplate: '{$this->data->template}',\n\t\t\t\t\t\ttemplateName: '{$templateName}',\n\t\t\t\t\t\tedition: '{$templateEdition}',\n\t\t\t\t\t\tstyleId : '{$this->data->id}'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}(jQuery);");
 }
示例#5
0
 /**
  * Are there any errors on this page?
  * @return bool
  */
 public function isError()
 {
     $buffer = $this->doc->getBuffer('message');
     if (is_array($buffer)) {
         $bufferWords = JString::trim(strip_tags(current($buffer['message'])));
     } else {
         $bufferWords = JString::trim(strip_tags($buffer));
     }
     return !empty($bufferWords);
 }
示例#6
0
 public function __construct($document)
 {
     foreach ($document->_custom as $customTag) {
         // Restore azrul system plugin
         if (strstr($customTag, 'plugins/system/pc_includes')) {
             $this->addCustomTag($customTag);
         }
     }
     $this->setMetaData('viewport', 'width=device-width, initial-scale=1, user-scalable=no');
     parent::__construct();
 }
 /**
  * Construct method
  *
  * @param   JDocumentHTML  $template  Template object
  *
  * @throws Exception
  */
 public function __construct(JDocumentHTML $template)
 {
     if (!$template instanceof JDocumentHTML) {
         return;
     }
     $this->tmpl_params = $template->params;
     $menu = JFactory::getApplication()->getMenu();
     $activeMenu = $menu->getActive();
     // Merge menu params with template params
     jimport('joomla.utilities.arrayhelper');
     $params = array_merge($activeMenu->params->toArray(), $this->tmpl_params->toArray());
     $this->params = JArrayHelper::toObject($params, 'JRegistry');
     require_once JPATH_ADMINISTRATOR . '/components/com_templates/helpers/templates.php';
     $positions = TemplatesHelper::getPositions(false, 'blank_j3');
     // Check for positions
     foreach ($positions as $position) {
         $this->{'show_' . $position} = $template->countModules($position);
     }
     $this->show_msg = $template->countModules('message');
 }
 /**
  * We test both at once
  *
  * @return  void
  */
 public function testIsAndSetHtml5()
 {
     // Check true
     $this->object->setHtml5(true);
     $this->assertThat($this->object->isHtml5(), $this->isTrue(), 'JDocumentHtml::setHtml5(true) did not work');
     // Check false
     $this->object->setHtml5(false);
     $this->assertThat($this->object->isHtml5(), $this->isFalse(), 'JDocumentHtml::setHtml5(false) did not work');
     // Check non-boolean
     $this->object->setHtml5('non boolean');
     $this->assertThat($this->object->isHtml5(), $this->logicalNot($this->equalTo('non boolean')), "JDocumentHtml::setHtml5('non boolean') did not work");
 }
示例#9
0
 /**
  * Set head data
  * Hack for empty scripts or styles arrays
  * @param string $type
  * @param array $data
  */
 protected function setHeadData($type, $data)
 {
     if (!empty($data[$type])) {
         $this->doc->setHeadData($data);
     } else {
         if ($type == 'scripts') {
             $this->doc->_scripts = array();
         } else {
             if ($type == 'styleSheets') {
                 $this->doc->_styleSheets = array();
             }
         }
     }
 }
 /**
  * Attach css, javascript files to document
  * @return void
  */
 private function _addAssets()
 {
     $this->_getDefaultStyles();
     $file = dirname(__FILE__) . '/assets/js/supports/' . $this->_defaultStyles['admin']->template . '.js';
     if (!is_file($file)) {
         return;
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_poweradmin/helpers/poweradmin.php';
     $currentVersion = PoweradminHelper::getVersion();
     $config = $this->_getJSConfiguration();
     $language = $this->_getJSLanguage();
     $uri = JUri::root(true);
     $template = $this->_defaultStyles['admin']->template;
     $this->_document->addStyleSheet(JSN_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-bootstrap.css');
     $this->_document->addStylesheet($uri . '/plugins/system/jsnpoweradmin/assets/css/adminbar.css?v=' . $currentVersion);
     $this->_document->addStylesheet($uri . '/plugins/system/jsnpoweradmin/assets/css/window.css?v=' . $currentVersion);
     $this->_document->addStylesheet($uri . '/plugins/system/jsnpoweradmin/assets/css/print.css?v=' . $currentVersion, 'text/css', 'print');
     if (in_array($template, array('minima', 'aplite'))) {
         $this->_document->addStylesheet($uri . '/plugins/system/jsnpoweradmin/assets/css/adminbar.menu.css?v=' . $currentVersion);
     }
     if ($template == 'hathor') {
         $this->_document->addStylesheet($uri . '/plugins/system/jsnpoweradmin/assets/css/adminbar.hathor.css?v=' . $currentVersion);
     }
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/jquery.noconflict.js?v=' . $currentVersion);
     if (file_exists('../media/system/js/mootools-core.js')) {
         $this->_document->addScript($uri . '/media/system/js/mootools-core.js');
         $this->_document->addScript($uri . '/media/system/js/core.js');
         $this->_document->addScript($uri . '/media/system/js/mootools-more.js');
         $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/mootool.conflict.js?v=' . $currentVersion);
     } else {
         JHtml::_('behavior.framework', true);
         $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/mootool.conflict.js?v=' . $currentVersion);
     }
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/mootools/mooml.js?v=' . $currentVersion);
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/scrollbar.js?v=' . $currentVersion);
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/window.js?v=' . $currentVersion);
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/supports/' . $template . '.js?v=' . $currentVersion);
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/adminbar.js?v=' . $currentVersion);
     $this->_document->addScript($uri . '/plugins/system/jsnpoweradmin/assets/js/history.js?v=' . $currentVersion);
     $this->_document->addScriptDeclaration("\n\t\t\tif (JoomlaShine === undefined) { var JoomlaShine = {}; }\n\t\t\tif (typeof(jQuery) !== 'undefined') { jQuery.noConflict(); }\n\n\t\t\tJoomlaShine.language = {$language};\n\t\t\twindow.addEvent('domready', function () {\n\t\t\t\tif(!document.getElementById('jsn-adminbar-wrapper')){\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tnew JSNAdminBar({$config});\n\t\t\t\t\t\t\tnew JSNHistory();\n\t\t\t\t\t\t}, 500);\t\t\t\t\n\t\t\t\t\t}\n\t\t\t});\n\t\t");
 }
示例#11
0
 /**
  * Register asset files for the template admin
  *
  * @return void
  */
 public function registerAssets()
 {
     // Specified asset files for joomla 2.5
     if (version_compare($this->version->getShortVersion(), '3.0', '<')) {
         $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/bootstrap/css/bootstrap.min.css');
         $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery/jquery-1.8.2.js');
         $this->doc->addScript($this->baseAssetUrl . '/3rd-party/bootstrap/js/bootstrap.min.js');
     }
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-dynatree/skin/ui.dynatree.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/jquery-tipsy/tipsy.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/font-icomoon/css/icomoon.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/3rd-party/chosen/chosen.min.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-gui.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-admin.css');
     $this->doc->addStyleSheet($this->baseAssetUrl . '/joomlashine/css/jsn-fonticomoon.css');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-ui/js/jquery-ui-1.9.1.custom.min.js');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-dynatree/jquery.dynatree.min.js');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-layout/jquery.layout.min.js');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-ck/jquery.ck.js');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/jquery-tipsy/jquery.tipsy.js');
     $this->doc->addScript($this->baseAssetUrl . '/3rd-party/chosen/chosen.jquery.min.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/media.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/sample-data.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/update.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/upgrade.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/quickstart.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/core.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/font.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/layout.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/maintenance.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/social-integration.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/validate.js');
     $this->doc->addScript($this->baseAssetUrl . '/joomlashine/js/width-type.js');
     $templateEdition = JSNTplHelper::getTemplateEdition($this->data->template);
     $templateName = JText::_($this->data->template);
     $this->doc->addScriptDeclaration("\n\t\t\t!function (\$) {\n\t\t\t\t\"use strict\";\n\n\t\t\t\t\$(function () {\n\t\t\t\t\tnew \$.JSNTPLFrameworkCore({\n\t\t\t\t\t\ttemplate: '{$this->data->template}',\n\t\t\t\t\t\ttemplateName: '{$templateName}',\n\t\t\t\t\t\tedition: '{$templateEdition}',\n\t\t\t\t\t\tstyleId : '{$this->data->id}'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}(jQuery);\n\t\t");
 }
示例#12
0
 function showModulePosition($position)
 {
     $html = '';
     if (JDocumentHTML::countModules($position)) {
         $document =& JFactory::getDocument();
         $renderer = $document->loadRenderer('modules');
         $options = array('style' => 'xhtml');
         $html .= '<div class="' . $position . '">';
         $html .= $renderer->render($position, $options, null);
         $html .= '</div>';
     }
     echo $html;
 }
示例#13
0
 /**
  * @testdox  Test that setBuffer returns an instance of $this
  */
 public function testEnsureSetBufferReturnsThisObject()
 {
     $this->assertSame($this->object, $this->object->setBuffer('This is why we test.', array('type' => 'component', 'name' => 'Test Object', 'title' => 'Testing')));
 }
示例#14
0
 * Kunena Component
 * @package Kunena
 *
 * @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.kunena.org
 **/
defined ( '_JEXEC' ) or die ();
// TODO : To finish
$template = KunenaFactory::getTemplate();
$this->params = $template->params;
$this->my = JFactory::getUser ();
$private = KunenaFactory::getPrivateMessaging();
$pm = $private->getUnreadCount($this->my->id);
?>
<?php if (JDocumentHTML::countModules ( 'kunena_menu' )) : ?>

<div class="forumlist">
	<div class="catinner">
		<span class="corners-top"><span></span></span>
			<div id="ktop">
			<ul class="topiclist">
				<li class="header" style="height:32px;padding: 2px 0 0 10px;">
					<dl class="icon" style="background: none;">
						<dt style="width:1px;padding: 0px;">

						</dt>
						<?php if ($this->params->get('topmenuShow') == '1') { ?>
						<dd class="topics" style="width:60%; text-align:left;padding-left: 5px;">
							<div id="ktopmenu">
								<div id="ktab"><?php echo $this->getMenu() ?></div>
 /**
  * Loads the modules published in the position name passed.
  *
  * @param <type> $position
  * @return <type>
  */
 function loadModulePosition($position)
 {
     if (JDocumentHTML::countModules($position)) {
         $document =& JFactory::getDocument();
         $renderer = $document->loadRenderer('modules');
         $options = array('style' => 'xhtml');
         return $renderer->render($position, $options, null);
     } else {
         return '';
     }
 }
?>
	</div>
</div>

<div class="container main-bg" id="main-handler">
	<div class="inner">
		<?php 
if ($this->countModules('builtin-slideshow or slideshow')) {
    ?>
		<div id="slideshow-handler-bg">
			<div id="slideshow-handler"> 
				<?php 
    if ($this->countModules('builtin-slideshow')) {
        ?>
				<?php 
        $count_slides = JDocumentHTML::countModules('builtin-slideshow');
        $module = JModuleHelper::getModules('builtin-slideshow');
        $moduleParams = new JRegistry();
        echo "<div class=\"camera_wrap\" id=\"ph-camera-slideshow\">";
        for ($sld_a = 0; $sld_a < $count_slides; $sld_a++) {
            $moduleParams->loadString($module[$sld_a]->params);
            $bgimage[$sld_a] = $moduleParams->get('backgroundimage', 'defaultValue');
            $caption_effect[$sld_a] = $moduleParams->get('moduleclass_sfx', 'defaultValue');
            ?>
				<div data-thumb="<?php 
            if ($bgimage[$sld_a] == "defaultValue") {
                echo $this->baseurl . "/templates/" . $this->template . "/images/slideshow/no-image.png";
            } else {
                echo $this->baseurl . "/" . $bgimage[$sld_a];
            }
            ?>
示例#17
0
文件: Header.php 项目: JBZoo/CrossCMS
 /**
  * {@inheritdoc}
  */
 public function cssCode($code)
 {
     $this->_doc->addStyleDeclaration($code);
 }
示例#18
0
            case 'credits':
                include KUNENA_PATH_LIB . DS . 'kunena.credits.php';
                break;
                #########################################################################################
            #########################################################################################
            default:
                if (file_exists(KUNENA_ABSTMPLTPATH . '/listcat.php')) {
                    include KUNENA_ABSTMPLTPATH . '/listcat.php';
                } else {
                    include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'listcat.php';
                }
                break;
        }
        //hctiws
        // Bottom Module
        if (JDocumentHTML::countModules('kunena_bottom')) {
            ?>

        <div class = "bof-bottom-modul">
            <?php 
            $document =& JFactory::getDocument();
            $renderer = $document->loadRenderer('modules');
            $options = array('style' => 'xhtml');
            $position = 'kunena_bottom';
            echo $renderer->render($position, $options, null);
            ?>
        </div>

<?php 
        }
        // Credits
示例#19
0
    if ($fbConfig->showannouncement > 0) {
        ?>
<!-- B: announcementBox -->
<?php 
        if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/announcement/announcementbox.php')) {
            require_once KUNENA_ABSTMPLTPATH . '/plugin/announcement/announcementbox.php';
        } else {
            require_once KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/announcement/announcementbox.php';
        }
        ?>
<!-- F: announcementBox -->
<?php 
    }
    // (JJ) FINISH: ANNOUNCEMENT BOX
    // load module
    if (JDocumentHTML::countModules('kunena_announcement')) {
        ?>

    <div class = "fb-fb_2">
        <?php 
        $document =& JFactory::getDocument();
        $renderer = $document->loadRenderer('modules');
        $options = array('style' => 'xhtml');
        $position = 'kunena_announcement';
        echo $renderer->render($position, $options, null);
        ?>
    </div>

<?php 
    }
    ?>
示例#20
0
 /**
  * Class constructor
  *
  * @access protected
  * @param   array	$options Associative array of options
  */
 function __construct($options = array())
 {
     parent::__construct($options);
     //set document type
     $this->_type = 'partial';
 }
示例#21
0
 public function __construct(JDocumentHTML $template)
 {
     if (!$template instanceof JDocumentHTML) {
         return false;
     }
     $this->_template = $template;
     $this->_params = $template->params;
     $menu = JFactory::getApplication()->getMenu();
     $activeMenu = $menu->getActive();
     $defaultMenu = $menu->getDefault();
     //detect frontpage
     $this->isFront = $activeMenu->id == $defaultMenu->id;
     //merge menu params with template params
     jimport('joomla.utilities.arrayhelper');
     $params = array_merge($activeMenu->params->toArray(), $this->_params->toArray());
     $this->params = JArrayHelper::toObject($params, 'JRegistry');
     // check for position
     $this->show_top = $template->countModules('top');
     $this->show_top_left = $template->countModules('top-left');
     $this->show_top_center = $template->countModules('top-center');
     $this->show_top_right = $template->countModules('top-right');
     $this->show_user1 = $template->countModules('user1');
     $this->show_user2 = $template->countModules('user2');
     $this->show_user3 = $template->countModules('user3');
     $this->show_content_header = $template->countModules('content-header');
     $this->show_content_footer = $template->countModules('content-footer');
     $this->show_left = $template->countModules('left');
     $this->show_right = $template->countModules('right');
     $this->show_bottom_left = $template->countModules('bottom-left');
     $this->show_bottom_center = $template->countModules('bottom-center');
     $this->show_bottom_right = $template->countModules('bottom-right');
     $this->show_bottom = $template->countModules('bottom');
     $this->show_bottom_socials = $template->countModules('bottom-socials');
     $this->show_footer = $template->countModules('footer');
     // size blocks
     $this->class_top_left = $this->_params->get('top_left_class', 'col-xs-12 col-sm-4 col-md-4 col-lg-4');
     $this->class_top_center = $this->_params->get('top_center_class', 'col-xs-12 col-sm-4 col-md-4 col-lg-4');
     $this->class_top_right = $this->_params->get('top_right_class', 'col-xs-12 col-sm-4 col-md-4 col-lg-4');
     $this->class_left = $this->_params->get('left_class', 'col-xs-12 col-sm-3 col-md-3 col-lg-3');
     $this->class_right = $this->_params->get('right_class', 'hidden-xs col-sm-2 col-md-2 col-lg-2');
     $this->class_bottom_left = $this->_params->get('bottom_left_class', 'col-xs-12 col-sm-4 col-md-4 col-lg-4');
     $this->class_bottom_center = $this->_params->get('bottom_center_class', 'col-xs-12 col-sm-4 col-md-4 col-lg-4');
     $this->class_bottom_right = $this->_params->get('bottom_right_class', 'col-xs-12 col-sm-4 col-md-4 col-lg-4');
     //classes for blocks
     $this->class_user1 = $this->_params->get('user1_class', 'col-xs-12 col-sm-12 col-md-12 col-lg-12');
     $this->class_user2 = $this->_params->get('user2_class', 'col-xs-12 col-sm-12 col-md-12 col-lg-12');
     $this->class_user3 = $this->_params->get('user3_class', 'col-xs-12 col-sm-12 col-md-12 col-lg-12');
 }
示例#22
0
						<span class="kprofilebox-register">
							<?php 
        echo $registration;
        ?>
						</span>
						<?php 
    }
    ?>
					</div>
				</form>
				<?php 
}
?>
			</td>
				<?php 
if (JDocumentHTML::countModules('kunena_profilebox')) {
    ?>
			<td class = "kprofilebox-right">
				<div class="kprofilebox-modul">
					<?php 
    CKunenaTools::showModulePosition('kunena_profilebox');
    ?>
				</div>
			</td>
			<?php 
}
?>
		</tr>
	</tbody>
</table>
		</div>
示例#23
0
 /**
  * @param string $js
  *
  * @return JDocument|null
  */
 public function addInlineScript($js = '')
 {
     if (defined('GANTRY_FINALIZED')) {
         return $this->document;
     }
     return $this->document->addScriptDeclaration($js);
 }
 /**
  * Render the document
  *
  * @param   boolean $cache  If true, cache the output
  * @param   array   $params Associative array of attributes
  *
  * @return  string   The rendered data
  *
  * @since   11.1
  */
 public function render($cache = false, $params = array())
 {
     // If no error object is set return null
     if (!isset($this->_error)) {
         return;
     }
     // Set the status header
     \JFactory::getApplication()->setHeader('status', $this->_error->getCode() . ' ' . str_replace("\n", ' ', $this->_error->getMessage()));
     $file = 'error.php';
     // Check template
     $directory = isset($params['directory']) ? $params['directory'] : 'templates';
     $template = isset($params['template']) ? \JFilterInput::getInstance()->clean($params['template'], 'cmd') : 'system';
     if (!file_exists($directory . '/' . $template . '/' . $file)) {
         $template = 'system';
     }
     // Set variables
     $this->baseurl = \JUri::base(true);
     $this->template = $template;
     $this->debug = isset($params['debug']) ? $params['debug'] : false;
     $this->error = $this->_error;
     $params['params'] = \JFactory::getApplication()->getTemplate(true)->params;
     // Load
     $params['file'] = 'error.php';
     $this->parse($params);
     $data = $this->_renderTemplate();
     parent::render();
     return $data;
 }
示例#25
0
                ?>
					<input class ="kDelete_bulkcheckboxes" type="checkbox" name="cb[<?php 
                echo intval($leaf->id);
                ?>
]" value="0" />
				<?php 
            }
            ?>
			</td>
			<?php 
        }
        ?>
		</tr>

		<?php 
        if (JDocumentHTML::countModules('kunena_topic_' . $counter)) {
            ?>
		<tr>
			<td class="ktopicmodule" colspan="<?php 
            echo intval($this->columns);
            ?>
">
				<?php 
            CKunenaTools::showModulePosition('kunena_topic_' . $counter);
            ?>
			</td>
		</tr>
		<?php 
        }
        ?>
 public function __construct(JDocumentHTML $template)
 {
     if (!$template instanceof JDocumentHTML) {
         return false;
     }
     $this->_template = $template;
     $this->_params = $template->params;
     $menu = JFactory::getApplication()->getMenu();
     $activeMenu = $menu->getActive();
     //merge menu params with template params
     jimport('joomla.utilities.arrayhelper');
     $params = array_merge($activeMenu->params->toArray(), $this->_params->toArray());
     $this->params = JArrayHelper::toObject($params, 'JRegistry');
     // check for position
     $this->show_top = $template->countModules('top');
     $this->show_top_left = $template->countModules('top-left');
     $this->show_top_center = $template->countModules('top-center');
     $this->show_top_right = $template->countModules('top-right');
     $this->show_user1 = $template->countModules('user1');
     $this->show_user2 = $template->countModules('user2');
     $this->show_user3 = $template->countModules('user3');
     $this->show_content_header = $template->countModules('content-header');
     $this->show_content_footer = $template->countModules('content-footer');
     $this->show_left = $template->countModules('left');
     $this->show_right = $template->countModules('right');
     $this->show_bottom_left = $template->countModules('bottom-left');
     $this->show_bottom_center = $template->countModules('bottom-center');
     $this->show_bottom_right = $template->countModules('bottom-right');
     $this->show_bottom = $template->countModules('bottom');
     $this->show_bottom_socials = $template->countModules('bottom-socials');
     $this->show_footer = $template->countModules('footer');
 }
 /**
  * Replaces the metadata of extensions automatically from the given data
  *
  * @param array         $metadata
  * @param array         $head
  * @param JDocumentHTML $document
  *
  * @throws Exception
  */
 private function automaticReplacement($metadata, $head, $document)
 {
     // Extension: com_content - View: article
     $content = $this->params->get('com_content_enable');
     if (!empty($content)) {
         $option = $this->request->get('option');
         $view = $this->request->get('view');
         $article_id = $this->request->get('id', '', 'INT');
         if ($option == 'com_content' and $view == 'article' and !empty($article_id)) {
             $model = JModelLegacy::getInstance('Article', 'ContentModel', array('ignore_request' => true));
             $model->setState('params', JFactory::getApplication()->getParams());
             $article = (array) $model->getItem($article_id);
             if (!empty($article)) {
                 // Get most often used keywords - do not replace keywords from EFSEO table
                 if (empty($metadata['keywords'])) {
                     $content_overwrite_keywords = $this->params->get('com_content_overwrite_keywords');
                     // Only set keywords automatically if no global keywords are entered or the overwrite option is enabled
                     if (empty($head['metaTags']['standard']['keywords']) or !empty($content_overwrite_keywords)) {
                         $content_number_keywords = $this->params->get('com_content_number_keywords');
                         $content_blacklist_keywords = array_map('mb_strtolower', array_map('trim', explode(',', $this->params->get('com_content_blacklist_keywords'))));
                         $content_keywords_whole_text = $article['introtext'] . ' ' . $article['fulltext'];
                         $content_min_length_keyword = $this->params->get('com_content_min_length_keywords', 3);
                         $document->setMetaData('keywords', $this->automaticReplacementKeywords($content_number_keywords, $content_blacklist_keywords, $content_keywords_whole_text, $content_min_length_keyword));
                     }
                 }
                 // Generate the description - do not replace description from EFSEO table
                 if (empty($metadata['description'])) {
                     $content_overwrite_description = $this->params->get('com_content_overwrite_description');
                     // Only set description automatically if no global description is entered or the overwrite option is enabled
                     if (empty($head['description']) or !empty($content_overwrite_description)) {
                         $content_description_select_text = $this->params->get('com_content_description_select_text');
                         $content_description_add_dots = $this->params->get('com_content_description_add_dots');
                         $clean_again = true;
                         if ($content_description_select_text == 0) {
                             if (!empty($article['fulltext'])) {
                                 $content_description_whole_text = $article['fulltext'];
                             } else {
                                 $content_description_whole_text = $article['introtext'];
                             }
                         } elseif ($content_description_select_text == 1) {
                             if (!empty($article['introtext'])) {
                                 $content_description_whole_text = $article['introtext'];
                             } else {
                                 $content_description_whole_text = $article['fulltext'];
                             }
                         } elseif ($content_description_select_text == 2) {
                             $content_description_whole_text = $article['introtext'] . ' ' . $article['fulltext'];
                             $clean_again = false;
                         }
                         $document->setMetaData('description', $this->automaticReplacementDescription($content_description_whole_text, $content_description_add_dots, $clean_again));
                     }
                 }
             }
             return;
         }
     }
     // Extension: com_k2 - View: item
     $k2 = $this->params->get('com_k2_enable');
     if (!empty($k2)) {
         $option = $this->request->get('option');
         $view = $this->request->get('view');
         $item_id = $this->request->get('id', '', 'INT');
         if ($option == 'com_k2' and $view == 'item' and !empty($item_id)) {
             $query = "SELECT * FROM #__k2_items WHERE id = " . $item_id;
             $this->db->setQuery($query);
             $item = $this->db->loadAssoc();
             if (!empty($item)) {
                 // Get most often used keywords - do not replace keywords from EFSEO table
                 if (empty($metadata['keywords'])) {
                     $k2_overwrite_keywords = $this->params->get('com_k2_overwrite_keywords');
                     // Only set keywords automatically if no global keywords are entered or the overwrite option is enabled
                     if (empty($head['metaTags']['standard']['keywords']) or !empty($k2_overwrite_keywords)) {
                         $k2_number_keywords = $this->params->get('com_k2_number_keywords');
                         $k2_blacklist_keywords = array_map('mb_strtolower', array_map('trim', explode(',', $this->params->get('com_k2_blacklist_keywords'))));
                         $k2_keywords_whole_text = $item['introtext'] . ' ' . $item['fulltext'];
                         $k2_min_length_keyword = $this->params->get('com_k2_min_length_keywords', 3);
                         $document->setMetaData('keywords', $this->automaticReplacementKeywords($k2_number_keywords, $k2_blacklist_keywords, $k2_keywords_whole_text, $k2_min_length_keyword));
                     }
                 }
                 // Generate the description - do not replace description from EFSEO table
                 if (empty($metadata['description'])) {
                     $k2_overwrite_description = $this->params->get('com_k2_overwrite_description');
                     // Only set description automatically if no global description is entered or the overwrite option is enabled
                     if (empty($head['description']) or !empty($k2_overwrite_description)) {
                         $k2_description_select_text = $this->params->get('com_k2_description_select_text');
                         $k2_description_add_dots = $this->params->get('com_k2_description_add_dots');
                         $clean_again = true;
                         if ($k2_description_select_text == 0) {
                             if (!empty($item['fulltext'])) {
                                 $k2_description_whole_text = $item['fulltext'];
                             } else {
                                 $k2_description_whole_text = $item['introtext'];
                             }
                         } elseif ($k2_description_select_text == 1) {
                             if (!empty($item['introtext'])) {
                                 $k2_description_whole_text = $item['introtext'];
                             } else {
                                 $k2_description_whole_text = $item['fulltext'];
                             }
                         } elseif ($k2_description_select_text == 2) {
                             $k2_description_whole_text = $item['introtext'] . ' ' . $item['fulltext'];
                             $clean_again = false;
                         }
                         $document->setMetaData('description', $this->automaticReplacementDescription($k2_description_whole_text, $k2_description_add_dots, $clean_again));
                     }
                 }
             }
             return;
         }
     }
 }
示例#28
0
文件: pdf.php 项目: LGBGit/tierno
 /**
  * Get the contents of a document include
  *
  * @param   string  $type     The type of renderer
  * @param   string  $name     The name of the element to render
  * @param   array   $attribs  Associative array of remaining attributes.
  *
  * @return  The output of the renderer
  */
 public function getBuffer($type = null, $name = null, $attribs = array())
 {
     if ($type == 'head' || $type == 'component') {
         return parent::getBuffer($type, $name, $attribs);
     } else {
         return '';
     }
 }
示例#29
0
文件: view.php 项目: rich20/Kunena
	function isMenu() {
		return JDocumentHTML::countModules ( 'kunena_menu' );
	}
示例#30
0
    echo $msg_signature;
    echo '</div>';
}
?>

            </td>
            <td class = "fb-msgview-left-b">&nbsp;

            </td>

        </tr>
    </tbody>
</table>
<!-- Begin: Message Module Positions -->
<?php 
if (JDocumentHTML::countModules('kunena_msg_' . $mmm)) {
    ?>
    <div class = "kunena_msg_<?php 
    echo $mmm;
    ?>
">
        <?php 
    $document =& JFactory::getDocument();
    $renderer = $document->loadRenderer('modules');
    $options = array('style' => 'xhtml');
    $position = 'kunena_msg_' . $mmm;
    echo $renderer->render($position, $options, null);
    ?>
    </div>
<?php 
}