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


PHP KunenaForum::versionDate方法代码示例

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


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

示例1: parseKunenaInstallFile

	public static function parseKunenaInstallFile($path) {
		$xml = simplexml_load_file($path);
		if (!$xml || $xml->getName() != 'kinstall') {
			return false;
		}

		$data = new stdClass();
		$data->name = (string) $xml->name;
		$data->type = (string) $xml->attributes()->type;
		$data->creationdate = (string) $xml->creationDate;
		$data->author = (string) $xml->author;
		$data->copyright = (string) $xml->copyright;
		$data->authorEmail = (string) $xml->authorEmail;
		$data->authorUrl = (string) $xml->authorUrl;
		$data->version = (string) $xml->version;
		$data->description = (string) $xml->description;
		$data->thumbnail = (string) $xml->thumbnail;

		if ($data->version == '@kunenaversion@') $data->version = KunenaForum::version();
		if ($data->creationdate == '@kunenaversiondate@') $data->creationdate = KunenaForum::versionDate();

		if (!$data->version) $data->version = JText::_('Unknown');
		if (!$data->creationdate) $data->creationdate = JText::_('Unknown');
		if (!$data->author) $data->author = JText::_('Unknown');

		return $data;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:27,代码来源:helper.php

示例2: prepare

 function prepare()
 {
     if (!JRequest::checkToken('get')) {
         $this->setRedirect('index.php?option=com_kunena');
         return;
     }
     $start = JRequest::getBool('start', false);
     // Workaround situation where KunenaForum class doesn't exist (api.php was cached)
     if (!class_exists('KunenaForum')) {
         // TODO: add version check
         $app = JFactory::getApplication();
         $try = $app->getUserState('kunena-prepare', 0) + 1;
         clearstatcache();
         if (function_exists('apc_clear_cache')) {
             apc_clear_cache('system');
         }
         sleep(1);
         $app->setUserState('kunena-prepare', $try);
         $start = $start ? '&start=1' : '';
         $this->setRedirect('index.php?option=com_kunena&view=install&task=prepare&try=' . $try . $start . '&' . JUtility::getToken() . '=1');
         $this->redirect();
     }
     $this->model->install();
     if ($start) {
         // Make sure that the code is identical to the installer (we can improve it later on)
         $versions = $this->model->getDetectVersions();
         $version = reset($versions);
         if (!empty($version->state) || $version->version == KunenaForum::version() && $version->versiondate == KunenaForum::versionDate()) {
             unset($version);
         }
     }
     if (isset($version)) {
         $this->setRedirect($version->link);
     } else {
         $this->setRedirect('index.php?option=com_kunena&view=install');
     }
 }
开发者ID:laiello,项目名称:senluonirvana,代码行数:37,代码来源:controller.php

示例3: define

// Kunena uploaded files directory
define('KUNENA_RELPATH_UPLOADED', 'media/kunena/attachments');
define('KUNENA_PATH_UPLOADED', KUNENA_ROOT_PATH .'/'. KUNENA_RELPATH_UPLOADED);

// Kunena uploaded avatars directory
define('KUNENA_RELPATH_AVATAR_UPLOADED', '/media/kunena/avatars');
define('KUNENA_PATH_AVATAR_UPLOADED', KUNENA_ROOT_PATH . KUNENA_RELPATH_AVATAR_UPLOADED);

// Kunena legacy uploaded files directory
define('KUNENA_RELPATH_UPLOADED_LEGACY', '/images/fbfiles');
define('KUNENA_PATH_UPLOADED_LEGACY', KUNENA_ROOT_PATH . KUNENA_RELPATH_UPLOADED_LEGACY);

// Legacy version information
define ('KUNENA_VERSION', KunenaForum::version());
define ('KUNENA_VERSION_DATE', KunenaForum::versionDate());
define ('KUNENA_VERSION_NAME', KunenaForum::versionName());
define ('KUNENA_VERSION_BUILD', 0);

// Joomla URL
define('KUNENA_JLIVEURL', JUri::base(true).'/');

// Joomla template dir
define('KUNENA_JTEMPLATEPATH', KUNENA_ROOT_PATH . "/templates/{$app->getTemplate()}");
define('KUNENA_JTEMPLATEURL', KUNENA_JLIVEURL. "templates/{$app->getTemplate()}");

// Kunena live URL
define('KUNENA_LIVEURL', KUNENA_JLIVEURL . 'index.php?option=com_kunena');
define('KUNENA_LIVEURLREL', 'index.php?option=com_kunena');

// Kunena files URL
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:30,代码来源:legacy.php

示例4: insertVersion

 protected function insertVersion($state = 'beginInstall')
 {
     // Insert data from the new version
     $this->insertVersionData(KunenaForum::version(), KunenaForum::versionDate(), KunenaForum::versionName(), $state);
 }
开发者ID:laiello,项目名称:senluonirvana,代码行数:5,代码来源:model.php

示例5:

				<div class="span5">
					<div class="well well-small">
						<div class="center">
							<img src="components/com_kunena/media/icons/kunena_logo.png"/>
						</div>
						<dl class="dl-horizontal">
							<hr class="hr-condensed">
							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_VERSION') ?>:</dt>
							<dd><?php echo KunenaForum::version(); ?></dd>
							<hr class="hr-condensed">
							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_CODENAME') ?>:</dt>
							<dd><?php echo KunenaForum::versionName(); ?></dd>
							<hr class="hr-condensed">
							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_DATE') ?>:</dt>
							<dd><?php echo KunenaForum::versionDate(); ?></dd>
							<hr class="hr-condensed">
							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_AUTHOR') ?>:</dt>
							<dd><a href="https://www.kunena.org/team" target="_blank">Kunena Team</a></dd>
							<hr class="hr-condensed">
							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_COPYRIGHT') ?>:</dt>
							<dd>&copy; 2008 - 2016 Kunena, All rights reserved.</dd>

							<hr class="hr-condensed">

							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_LABEL_LICENSE') ?>:</dt>
							<dd>GNU General Public License</dd>
							<hr class="hr-condensed">
							<dt><?php echo JText::_('COM_KUNENA_CPANEL_LABEL_MOREINFO') ?>:</dt>
							<dd><a href="https://www.kunena.org/terms-of-use" target="_blank">https://www.kunena.org/terms-of-use</a></dd>
						</dl>
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:30,代码来源:default.php

示例6: getVersionHTML

 /**
  * Retrieve installed Kunena version as string.
  *
  * @return string "Kunena X.Y.Z | YYYY-MM-DD [versionname]"
  */
 static function getVersionHTML()
 {
     return 'Kunena ' . KunenaForum::version() . ' | ' . KunenaForum::versionDate() . ' [ ' . KunenaForum::versionName() . ' ]';
 }
开发者ID:giabmf11,项目名称:Kunena-Forum,代码行数:9,代码来源:version.php

示例7:

?>
</dd>
							<dt><?php 
echo JText::_('COM_KUNENA_CPANEL_LABEL_CODENAME');
?>
:</dt>
							<dd><?php 
echo KunenaForum::versionName();
?>
</dd>
							<dt><?php 
echo JText::_('COM_KUNENA_CPANEL_LABEL_DATE');
?>
:</dt>
							<dd><?php 
echo KunenaForum::versionDate();
?>
</dd>
							<dt><?php 
echo JText::_('COM_KUNENA_CPANEL_LABEL_AUTHOR');
?>
:</dt>
							<dd><a href="http://www.kunena.org/team" target="_blank">Kunena Team</a></dd>
							<dt><?php 
echo JText::_('COM_KUNENA_CPANEL_LABEL_COPYRIGHT');
?>
:</dt>
							<dd>&copy; 2008 - 2015 Kunena, All rights reserved.</dd>
							<dt><?php 
echo JText::_('COM_KUNENA_CPANEL_LABEL_LABEL_LICENSE');
?>
开发者ID:proyectoseb,项目名称:University,代码行数:31,代码来源:default.php

示例8: migrateExtensionCustom

 /**
  * Migrate custom information.
  *
  * This function gets called after all folders and tables have been copied.
  *
  * If you want to split this task into smaller chunks,
  * please store your custom state variables into $this->state and return false.
  * Returning false will force jUpgrade to call this function again,
  * which allows you to continue import by reading $this->state before continuing.
  *
  * @return	boolean Ready (true/false)
  * @since	1.6.4
  * @throws	Exception
  */
 protected function migrateExtensionCustom()
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
     // Need to initialize application
     jimport('joomla.environment.uri');
     $app = JFactory::getApplication('administrator');
     // Get component object
     $component = JTable::getInstance('extension', 'JTable', array('dbo' => $this->db_new));
     $component->load(array('type' => 'component', 'element' => $this->name));
     // First fix all broken menu items
     $query = "UPDATE #__menu SET component_id={$this->db_new->quote($component->extension_id)} WHERE type = 'component' AND link LIKE '%option={$this->name}%'";
     $this->db_new->setQuery($query);
     $this->db_new->query();
     $menumap = $this->getMapList('menus');
     // Get all menu items from the component (JMenu style)
     $query = $this->db_new->getQuery(true);
     $query->select('*');
     $query->from('#__menu');
     $query->where("component_id = {$component->extension_id}");
     $query->where('client_id = 0');
     $query->order('lft');
     $this->db_new->setQuery($query);
     $menuitems = $this->db_new->loadObjectList('id');
     foreach ($menuitems as &$menuitem) {
         // Get parent information.
         $parent_tree = array();
         if (isset($menuitems[$menuitem->parent_id])) {
             $parent_tree = $menuitems[$menuitem->parent_id]->tree;
         }
         // Create tree.
         $parent_tree[] = $menuitem->id;
         $menuitem->tree = $parent_tree;
         // Create the query array.
         $url = str_replace('index.php?', '', $menuitem->link);
         $url = str_replace('&amp;', '&', $url);
         parse_str($url, $menuitem->query);
     }
     // Update menu items
     foreach ($menuitems as $menuitem) {
         if (!isset($menuitem->query['view'])) {
             continue;
         }
         $update = false;
         switch ($menuitem->query['view']) {
             case 'home':
                 // Update default menu item
                 if (!empty($menuitem->query['defaultmenu'])) {
                     $menuitem->query['defaultmenu'] = isset($menumap[$menuitem->query['defaultmenu']]) ? $menumap[$menuitem->query['defaultmenu']]->new : 0;
                     $update = true;
                 }
                 break;
         }
         if ($update) {
             // Update menuitem link
             $query_string = array();
             foreach ($menuitem->query as $k => $v) {
                 $query_string[] = $k . '=' . $v;
             }
             $menuitem->link = 'index.php?' . implode('&', $query_string);
             // Save menu object
             $menu = JTable::getInstance('menu', 'JTable', array('dbo' => $this->db_new));
             $menu->bind(get_object_vars($menuitem), array('tree', 'query'));
             $success = $menu->check();
             if ($success) {
                 $success = $menu->store();
             }
             if (!$success) {
                 echo "ERROR";
             }
         }
     }
     // Replace Joomla! 1.5 manifest file with Joomla! 2.5 version
     jimport('joomla.filesystem.file');
     $manifest25 = JPATH_ADMINISTRATOR . '/components/com_kunena/kunena.j25.xml';
     $manifest15 = JPATH_ADMINISTRATOR . '/components/com_kunena/kunena.xml';
     if (file_exists($manifest25)) {
         $content = file_get_contents($manifest25);
         // Take care of Git install
         $content = preg_replace('/@kunenaversion@/', preg_replace('/-GIT/i', '', KunenaForum::version()), $content);
         $content = preg_replace('/@kunenaversiondate@/', KunenaForum::versionDate(), $content);
         $content = preg_replace('/@kunenaversionname@/', KunenaForum::versionName(), $content);
         JFile::write($manifest15, $content);
         JFile::delete($manifest25);
     }
     jimport('joomla.plugin.helper');
     // Mark Kunena as discovered and install it
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:senluonirvana,代码行数:101,代码来源:j25upgrade.php


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