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


PHP KunenaHtmlParser::relative方法代码示例

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


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

示例1: displayDefault

 function displayDefault($tpl = null)
 {
     if (!$this->config->enablerss) {
         JError::raiseError(404, JText::_('COM_KUNENA_RSS_DISABLED'));
     }
     KunenaHtmlParser::$relative = false;
     $this->category = $this->get('Category');
     if (!$this->category->authorise('read')) {
         JError::raiseError(404, $this->category->getError());
     }
     $this->topics = $this->get('Topics');
     $title = JText::_('COM_KUNENA_THREADS_IN_FORUM') . ': ' . $this->category->name;
     $this->setTitle($title);
     $metaDesc = $this->document->getDescription() . '. ' . $this->escape("{$this->category->name} - {$this->config->board_title}");
     $this->document->setDescription($metaDesc);
     // Create image for feed
     $image = new JFeedImage();
     $image->title = $this->document->getTitle();
     $image->url = $this->ktemplate->getImagePath('icons/rss.png');
     $image->description = $this->document->getDescription();
     $this->document->image = $image;
     foreach ($this->topics as $topic) {
         $description = $topic->last_post_message;
         $date = new JDate($topic->last_post_time);
         $userid = $topic->last_post_userid;
         $username = KunenaFactory::getUser($userid)->getName($topic->last_post_guest_name);
         $title = $topic->subject;
         $category = $topic->getCategory();
         $url = $topic->getUrl($category, true, 'last');
         $this->createItem($title, $url, $description, $category->name, $date, $userid, $username);
     }
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:32,代码来源:view.feed.php

示例2: displayDefault

	function displayDefault($tpl = null) {
		if (!$this->config->enablerss) {
			JError::raiseError ( 404, JText::_ ( 'COM_KUNENA_RSS_DISABLED' ) );
		}

		KunenaHtmlParser::$relative = false;
		/*
		// TODO: caching (this is from old code)
		$cache = JFactory::getCache( 'com_kunena_rss' );
		if ( $this->caching ) {
			$cache->setCaching( 1 );
			$cache->setLifeTime( $this->caching );
		}
		$data = $cache->call( array( 'CKunenaRSSData', 'fetch' ), $this->type, $this->incl_cat, $this->excl_cat, $this->limit, $this->timelimit );
		*/
		$this->layout = 'default';
		$this->params = $this->state->get('params');
		$this->topics = $this->get ( 'Topics' );
		$this->total = $this->get ( 'Total' );

		// TODO: if start != 0, add information from it into description
		$this->document->setGenerator('Kunena Forum (Joomla)');

		switch ($this->state->get ( 'list.mode' )) {
			case 'topics' :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_TOPICS');
				break;
			case 'sticky' :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_STICKY');
				break;
			case 'locked' :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_LOCKED');
				break;
			case 'noreplies' :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_NOREPLIES');
				break;
			case 'unapproved' :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_UNAPPROVED');
				break;
			case 'deleted' :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_DELETED');
				break;
			case 'replies' :
			default :
				$title =  JText::_('COM_KUNENA_VIEW_TOPICS_DEFAULT_MODE_DEFAULT');
		}
		$this->setTitle ( $title );

		// Create image for feed
		$image = new JFeedImage();
		$image->title = $this->document->getTitle();
		$image->url = $this->ktemplate->getImagePath('icons/rss.png');
		$image->description = $this->document->getDescription();
		$this->document->image = $image;

		$this->displayTopicRows();
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:57,代码来源:view.feed.php


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