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


PHP KunenaForum::versionMajor方法代码示例

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


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

示例1: shKUGetVersion

 function shKUGetVersion()
 {
     static $version = null;
     if (is_null($version)) {
         // Make sure that Kunena API has been loaded
         $api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
         if (is_file($api)) {
             require_once $api;
         }
         if (class_exists('KunenaForum')) {
             $version = KunenaForum::versionMajor();
             // Initialize Kunena 2.0 support
             kimport('kunena.forum.category');
             kimport('kunena.forum.topic');
         } elseif (class_exists('Kunena')) {
             $version = '1.6';
             // Initialize Kunena 1.6 support
             require_once KUNENA_PATH . '/router.php';
             KunenaRouter::loadCategories();
         } elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.defines.php')) {
             $version = '1.5';
         } elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.version.php')) {
             $version = '1.0';
         } else {
             $version = false;
         }
     }
     return $version;
 }
开发者ID:sangkasi,项目名称:joomla,代码行数:29,代码来源:com_kunena.php

示例2: getKunenaMajorVersion

 /**
  * Based on Matias' version (Thanks)
  * See: http://docs.kunena.org/index.php/Developing_Kunena_Router
  */
 static function getKunenaMajorVersion()
 {
     static $version;
     if (!$version) {
         if (class_exists('KunenaForum')) {
             $version = KunenaForum::versionMajor();
         } elseif (class_exists('Kunena')) {
             $version = substr(Kunena::version(), 0, 3);
         } elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.defines.php')) {
             $version = '1.5';
         } elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.version.php')) {
             $version = '1.0';
         }
     }
     return $version;
 }
开发者ID:jooservices,项目名称:Crexmap,代码行数:20,代码来源:com_kunena.php

示例3: getKunenaMajorVersion

 /**
  * See: http://docs.kunena.org/index.php/Developing_Kunena_Router
  */
 function getKunenaMajorVersion()
 {
     // Make sure that Kunena API (if exists) has been loaded
     $api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
     if (is_file($api)) {
         require_once $api;
     }
     if (class_exists('KunenaForum')) {
         return KunenaForum::versionMajor();
     } elseif (class_exists('Kunena')) {
         return substr(Kunena::version(), 0, 3);
     } elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.defines.php')) {
         return '1.5';
     } elseif (is_file(JPATH_ROOT . '/components/com_kunena/lib/kunena.version.php')) {
         return '1.0';
     }
     return false;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:21,代码来源:com_kunena.php


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