本文整理汇总了PHP中KunenaForum::version_major方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaForum::version_major方法的具体用法?PHP KunenaForum::version_major怎么用?PHP KunenaForum::version_major使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaForum
的用法示例。
在下文中一共展示了KunenaForum::version_major方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildVersion
protected static function buildVersion()
{
if ('@kunenaversion@' == '@' . 'kunenaversion' . '@') {
$file = JPATH_MANIFESTS . '/packages/pkg_kunena.xml';
$manifest = simplexml_load_file($file);
self::$version = (string) $manifest->version . '-GIT';
} else {
self::$version = strtoupper('@kunenaversion@');
}
self::$version_major = substr(self::$version, 0, 3);
self::$version_date = '@kunenaversiondate@' == '@' . 'kunenaversiondate' . '@' ? JFactory::getDate()->format('Y-m-d') : '@kunenaversiondate@';
self::$version_name = '@kunenaversionname@' == '@' . 'kunenaversionname' . '@' ? 'Git Repository' : '@kunenaversionname@';
}
示例2: buildVersion
protected static function buildVersion()
{
if ('2.0.1' == '@' . 'kunenaversion' . '@') {
$xml = KPATH_ADMIN . '/kunena.xml';
$parser = JFactory::getXMLParser('Simple');
$parser->loadFile($xml);
self::$version = $parser->document->getElementByPath('version')->data() . '-GIT';
} else {
self::$version = strtoupper('2.0.1');
}
self::$version_major = substr(self::$version, 0, 3);
self::$version_date = '2012-07-07' == '@' . 'kunenaversiondate' . '@' ? JFactory::getDate()->toMySQL() : '2012-07-07';
self::$version_name = 'Balozi' == '@' . 'kunenaversionname' . '@' ? 'Git Repository' : 'Balozi';
}