当前位置: 首页>>代码示例>>PHP>>正文


PHP Komento::komentoVersion方法代码示例

本文整理汇总了PHP中Komento::komentoVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Komento::komentoVersion方法的具体用法?PHP Komento::komentoVersion怎么用?PHP Komento::komentoVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Komento的用法示例。


在下文中一共展示了Komento::komentoVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($config = array())
 {
     $document = JFactory::getDocument();
     //load dialog stylesheet in backend
     KomentoDocumentHelper::loadHeaders();
     $config = Komento::getConfig();
     $konfig = Komento::getKonfig();
     $toolbar = JToolbar::getInstance('toolbar');
     $toolbar->addButtonPath(KOMENTO_ADMIN_ROOT . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'images');
     if ($document->getType() == 'html') {
         require_once KOMENTO_CLASSES . DIRECTORY_SEPARATOR . 'configuration.php';
         $configuration = KomentoConfiguration::getInstance();
         $configuration->attach();
     }
     $version = str_ireplace('.', '', Komento::komentoVersion());
     $document->addScript(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/js/admin.js?' . $version);
     $document->addStyleSheet(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/css/reset.css?' . $version);
     $document->addStyleSheet(rtrim(JURI::root(), '/') . '/components/com_komento/assets/css/common.css?' . $version);
     $document->addStyleSheet(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/css/style.css?' . $version);
     // For the sake of loading the core.js in Joomla 1.6 (1.6.2 onwards)
     if (Komento::joomlaVersion() >= '1.6') {
         JHTML::_('behavior.framework');
     }
     parent::__construct($config);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:25,代码来源:controller.php

示例2: load

 /**
  * Function to add js file, js script block and css file
  * to HEAD section
  */
 public static function load($list, $type = 'js', $location = 'themes')
 {
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $config = Komento::getConfig();
     $kApp = Komento::loadApplication();
     // Always load mootools first so it will not conflict.
     // JHTML::_('behavior.mootools');
     $files = explode(',', $list);
     $dir = JURI::root() . 'components/com_komento/assets';
     $pathdir = KOMENTO_ASSETS;
     $theme = $config->get('layout_theme');
     $version = str_ireplace('.', '', Komento::komentoVersion());
     if ($location != 'assets') {
         $dir = JURI::root() . 'components/com_komento/themes/' . $theme;
         $pathdir = KOMENTO_THEMES . DIRECTORY_SEPARATOR . $theme;
     }
     foreach ($files as $file) {
         if ($type == 'js') {
             $file .= '.js?' . $version;
         } elseif ($type == 'css') {
             $file .= '.css';
         }
         $path = '';
         if ($location == 'themes') {
             $checkOverride = JPATH_ROOT . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $mainframe->getTemplate() . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'com_komento' . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $file;
             $checkComponent = $kApp->getComponentThemePath() . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $file;
             $checkSelected = KOMENTO_THEMES . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $file;
             $checkDefault = KOMENTO_THEMES . DIRECTORY_SEPARATOR . 'kuro' . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $file;
             $overridePath = JURI::root() . 'templates/' . $mainframe->getTemplate() . '/html/com_komento/' . $type . '/' . $file;
             $componentPath = $kApp->getComponentThemeURI() . '/' . $type . '/' . $file;
             $selectedPath = $dir . '/' . $type . '/' . $file;
             $defaultPath = JURI::root() . 'components/com_komento/themes/kuro/' . $type . '/' . $file;
             // 1. Template overrides
             if (JFile::exists($checkOverride)) {
                 $path = $overridePath;
                 $pathdir = $checkOverride;
             } elseif (JFile::exists($checkSelected)) {
                 $path = $selectedPath;
                 $pathdir = $checkSelected;
             } else {
                 $path = $defaultPath;
                 $path = $checkDefault;
             }
         } else {
             $path = $dir . '/' . $type . '/' . $file;
             $pathdir = $pathdir . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $file;
         }
         if ($type == 'js') {
             $document->addScript($path);
         } elseif ($type == 'css') {
             if (JFile::exists($pathdir)) {
                 $document->addStylesheet($path);
             }
         }
     }
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:61,代码来源:document.php

示例3: getVersion

 public function getVersion()
 {
     $ajax = Komento::getAjax();
     $local = Komento::komentoVersion();
     $remote = Komento::getHelper('Version')->getVersion();
     $html = '<span class="version_outdated">' . JText::sprintf('COM_KOMENTO_VERSION_OUTDATED', $local) . '</span>';
     if ((string) $local >= (string) $remote) {
         $html = '<span class="version_latest">' . JText::sprintf('COM_KOMENTO_VERSION_LATEST', $local) . '</span>';
     }
     $ajax->success($html);
     $ajax->send();
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:12,代码来源:view.ajax.php

示例4: getVersion

 public function getVersion()
 {
     $ajax = Komento::getAjax();
     $local = Komento::komentoVersion();
     $remote = Komento::getHelper('Version')->getVersion();
     // Test build only since build will always be incremented regardless of version
     $localVersion = explode('.', $local);
     $localBuild = $localVersion[2];
     $remoteVersion = explode('.', $remote);
     $build = $remoteVersion[2];
     $html = '<span class="version_outdated">' . JText::sprintf('COM_KOMENTO_VERSION_OUTDATED', $local) . '</span>';
     if ($localBuild >= $build) {
         $html = '<span class="version_latest">' . JText::sprintf('COM_KOMENTO_VERSION_LATEST', $local) . '</span>';
     }
     $ajax->success($html);
     $ajax->send();
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:17,代码来源:view.ajax.php


注:本文中的Komento::komentoVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。