本文整理汇总了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;
}
示例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;
}
示例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;
}