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