• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP KunenaHtmlParser类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: displayDefault

	function displayDefault($tpl = null)
	{
		$params       = $this->app->getParams('com_kunena');
		$this->header = $params->get('page_title');
		$this->body   = $params->get('body');

		$this->_prepareDocument();

		$format = $params->get('body_format');

		$this->header = $this->escape($this->header);
		if ($format == 'html')
		{
			$this->body = trim($this->body);
		}
		elseif ($format == 'text')
		{
			$this->body = $this->escape($this->body);
		}
		else
		{
			$this->body = KunenaHtmlParser::parseBBCode($this->body);
		}

		$this->render('Widget/Custom', $tpl);
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:26,代码来源:view.html.php


示例2: displayAnnouncement

	function displayAnnouncement($tpl = null) {
		if (KunenaFactory::getConfig()->showannouncement > 0) {
			$moderator = intval($this->me->isModerator('global'));
			$cache = JFactory::getCache('com_kunena', 'output');
			if ($cache->start("{$this->template->name}.common.announcement.{$moderator}", 'com_kunena.template')) return;

			// User needs to be global moderator to edit announcements
			if ($moderator) {
				$this->canEdit = true;
			} else {
				$this->canEdit = false;
			}
			$this->announcement = $this->get('Announcement');
			if ($this->announcement) {
				$this->annTitle = KunenaHtmlParser::parseText($this->announcement->title);
				$this->annDescription = $this->announcement->sdescription ? KunenaHtmlParser::parseBBCode($this->announcement->sdescription) : KunenaHtmlParser::parseBBCode($this->announcement->description, 300);
				$this->annDate = KunenaDate::getInstance($this->announcement->created);
				$this->annListURL = KunenaRoute::_("index.php?option=com_kunena&view=announcement&layout=list");
				$this->annMoreURL = !empty($this->announcement->description) ? KunenaRoute::_("index.php?option=com_kunena&view=announcement&id={$this->announcement->id}") : null;
				$result = $this->loadTemplate($tpl);
				if (JError::isError($result)) {
					return $result;
				}
				echo $result;
			} else {
				echo ' ';
			}
			$cache->end();
		} else echo ' ';
	}
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:30,代码来源:view.html.php


示例3: createItem

 function createItem($title, $url, $description, $category, $date, $userid, $username)
 {
     if ($this->config->rss_author_in_title) {
         // We want author in item titles
         $title .= ' - ' . JText::_('COM_KUNENA_BY') . ': ' . $username;
     }
     $description = preg_replace('/\\[confidential\\](.*?)\\[\\/confidential\\]/s', '', $description);
     $description = preg_replace('/\\[hide\\](.*?)\\[\\/hide\\]/s', '', $description);
     $description = preg_replace('/\\[spoiler\\](.*?)\\[\\/spoiler\\]/s', '', $description);
     $description = preg_replace('/\\[code\\](.*?)\\[\\/code]/s', '', $description);
     if ((bool) $this->config->rss_allow_html) {
         $description = KunenaHtmlParser::parseBBCode($description, null, (int) $this->config->rss_word_count);
     } else {
         $description = KunenaHtmlParser::parseText($description, (int) $this->config->rss_word_count);
     }
     // Assign values to feed item
     $item = new JFeedItem();
     $item->title = $title;
     $item->link = $url;
     $item->description = $description;
     $item->date = $date->toSql();
     $item->author = $username;
     // FIXME: inefficient to load users one by one -- also vulnerable to J! 2.5 user is NULL bug
     if ($this->config->rss_author_format != 'name') {
         $item->authorEmail = JFactory::getUser($userid)->email;
     }
     $item->category = $category;
     // Finally add item to feed
     $this->document->addItem($item);
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:30,代码来源:view.feed.php


示例4: onAfterReply

 public function onAfterReply($message)
 {
     if (JString::strlen($message->message) > $this->params->get('activity_points_limit', 0)) {
         CFactory::load('libraries', 'userpoints');
         CUserPoints::assignPoint('com_kunena.thread.reply');
     }
     $content = KunenaHtmlParser::plainBBCode($message->message, $this->params->get('activity_stream_limit', 0));
     // Add readmore permalink
     $content .= '<br /><a rel="nofollow" href="' . $message->getTopic()->getPermaUrl() . '" class="small profile-newsfeed-item-action">' . JText::_('COM_KUNENA_READMORE') . '</a>';
     $act = new stdClass();
     $act->cmd = 'wall.write';
     $act->actor = $message->userid;
     $act->target = 0;
     // no target
     $act->title = JText::_('{single}{actor}{/single}{multiple}{actors}{/multiple} ' . JText::sprintf('PLG_KUNENA_COMMUNITY_ACTIVITY_REPLY_TITLE', '<a href="' . $message->getTopic()->getUrl() . '">' . $message->subject . '</a>'));
     $act->content = $content;
     $act->app = 'kunena.post';
     $act->cid = $message->thread;
     $act->access = $this->getAccess($message->getCategory());
     // Comments and like support
     $act->comment_id = $message->thread;
     $act->comment_type = 'kunena.post';
     $act->like_id = $message->thread;
     $act->like_type = 'kunena.post';
     // Do not add private activities
     if ($act->access > 20) {
         return;
     }
     CFactory::load('libraries', 'activities');
     CActivityStream::add($act);
 }
开发者ID:laiello,项目名称:senluonirvana,代码行数:31,代码来源:activity.php


示例5: onAfterReply

	public function onAfterReply($message) {

		$content = KunenaHtmlParser::plainBBCode($message->message, $this->params->get('activity_stream_limit', 0));
		// Add readmore permalink
		$content .= '<br /><a rel="nofollow" href="'.$message->getTopic()->getPermaUrl().'" class="small profile-newsfeed-item-action">'.JText::_('COM_KUNENA_READMORE').'</a>';

		
			$msg = AwdwallHelperUser::formatUrlInMsg($msg);			
			$wall 				=& JTable::getInstance('Wall', 'Table');						
			$wall->user_id		= $message->userid;
			$wall->group_id		= NULL;
			$wall->type			= 'text';
			$wall->commenter_id	= $message->userid;
			$wall->user_name	= '';
			$wall->avatar		= '';
			$wall->message		= JText::sprintf ( 'PLG_KUNENA_JOMWALL_ACTIVITY_REPLY_TITLE', '<a href="' . $message->getTopic()->getUrl() . '">' . $message->subject . '</a>' ).'<br>'.$content;
			$wall->reply		= 0;
			$wall->is_read		= 0;
			$wall->is_pm		= 0;
			$wall->is_reply		= 0;
			$wall->posted_id	= NULL;
			$wall->wall_date	= time();
			if (!$wall->store()){				

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


示例6: displayRows

 /**
  * Method to display the layout of search results
  *
  * @return void
  */
 public function displayRows()
 {
     // Run events
     $params = new JRegistry();
     $params->set('ksource', 'kunena');
     $params->set('kunena_view', 'search');
     $params->set('kunena_layout', 'default');
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('kunena');
     $dispatcher->trigger('onKunenaPrepare', array('kunena.messages', &$this->results, &$params, 0));
     foreach ($this->results as $this->message) {
         $this->topic = $this->message->getTopic();
         $this->category = $this->message->getCategory();
         $this->categoryLink = $this->getCategoryLink($this->category->getParent()) . ' / ' . $this->getCategoryLink($this->category);
         $ressubject = KunenaHtmlParser::parseText($this->message->subject);
         $resmessage = KunenaHtmlParser::parseBBCode($this->message->message, 500);
         $profile = KunenaFactory::getUser((int) $this->message->userid);
         $this->useravatar = $profile->getAvatarImage('kavatar', 'post');
         foreach ($this->searchwords as $searchword) {
             if (empty($searchword)) {
                 continue;
             }
             $ressubject = preg_replace("/" . preg_quote($searchword, '/') . "/iu", '<span  class="searchword" >' . $searchword . '</span>', $ressubject);
             // FIXME: enable highlighting, but only after we can be sure that we do not break html
             // $resmessage = preg_replace ( "/" . preg_quote ( $searchword, '/' ) . "/iu", '<span  class="searchword" >' . $searchword . '</span>', $resmessage );
         }
         $this->author = $this->message->getAuthor();
         $this->topicAuthor = $this->topic->getAuthor();
         $this->topicTime = $this->topic->first_post_time;
         $this->subjectHtml = $ressubject;
         $this->messageHtml = $resmessage;
         $contents = $this->subLayout('Search/Results/Row')->setProperties($this->getProperties());
         echo $contents;
     }
 }
开发者ID:giabmf11,项目名称:Kunena-Forum,代码行数:40,代码来源:results.php


示例7: displayAnnouncement

	function displayAnnouncement($tpl = null) {
		if (KunenaFactory::getConfig()->showannouncement > 0) {
			$moderator = intval($this->me->isModerator('global'));
			$cache = JFactory::getCache('com_kunena', 'output');
			if ($cache->start("{$this->template->name}.common.announcement.{$moderator}", 'com_kunena.template')) return;

			// User needs to be global moderator to edit announcements
			if ($moderator) {
				$this->canEdit = true;
			} else {
				$this->canEdit = false;
			}
			// FIXME: move into model
			$db = JFactory::getDBO();
			$query = "SELECT * FROM #__kunena_announcement WHERE published='1' ORDER BY created DESC";
			$db->setQuery ( $query, 0, 1 );
			$this->announcement = $db->loadObject ();
			if (KunenaError::checkDatabaseError()) return;
			if ($this->announcement) {
				$this->annTitle = KunenaHtmlParser::parseText($this->announcement->title);
				$this->annDescription = $this->announcement->sdescription ? KunenaHtmlParser::parseBBCode($this->announcement->sdescription) : KunenaHtmlParser::parseBBCode($this->announcement->description, 300);
				$this->annDate = KunenaDate::getInstance($this->announcement->created);
				$this->annListURL = KunenaRoute::_("index.php?option=com_kunena&view=announcement&layout=list");
				$this->annMoreURL = !empty($this->announcement->description) ? KunenaRoute::_("index.php?option=com_kunena&view=announcement&id={$this->announcement->id}") : null;
				$result = $this->loadTemplate($tpl);
				if (JError::isError($result)) {
					return $result;
				}
				echo $result;
			} else {
				echo ' ';
			}
			$cache->end();
		} else echo ' ';
	}
开发者ID:rich20,项目名称:Kunena,代码行数:35,代码来源:view.html.php


示例8: displayDefault

	function displayDefault($tpl = null) {
		$this->header = $this->escape($this->header);
		if (empty($this->html)) {
			$this->body = KunenaHtmlParser::parseBBCode($this->body);
		}
		$result = $this->loadTemplateFile($tpl);
		if (JError::isError($result)) {
			return $result;
		}
		echo $result;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:11,代码来源:view.html.php


示例9: displayEdit

 function displayEdit($tpl = null)
 {
     $body = JRequest::getVar('body', '', 'post', 'string', JREQUEST_ALLOWRAW);
     $response = array();
     if ($this->me->exists()) {
         $msgbody = KunenaHtmlParser::parseBBCode($body, $this);
         $response['preview'] = $msgbody;
     }
     // Set the MIME type and header for JSON output.
     $this->document->setMimeEncoding('application/json');
     JResponse::setHeader('Content-Disposition', 'attachment; filename="' . $this->getName() . '.' . $this->getLayout() . '.json"');
     echo json_encode($response);
 }
开发者ID:laiello,项目名称:senluonirvana,代码行数:13,代码来源:view.raw.php


示例10: displayEdit

 /**
  * @param   null $tpl
  *
  * @throws Exception
  */
 function displayEdit($tpl = null)
 {
     $body = JFactory::getApplication()->input->get('body', '', 'post', 'string', 'raw');
     // RAW input
     $response = array();
     if ($this->me->exists() || $this->config->pubwrite) {
         $msgbody = KunenaHtmlParser::parseBBCode($body, $this);
         $response['preview'] = $msgbody;
     }
     // Set the MIME type and header for JSON output.
     $this->document->setMimeEncoding('application/json');
     JFactory::getApplication()->sendHeaders('Content-Disposition', 'attachment; filename="' . $this->getName() . '.' . $this->getLayout() . '.json"');
     echo json_encode($response);
 }
开发者ID:Ruud68,项目名称:Kunena-Forum,代码行数:19,代码来源:view.raw.php


示例11: onAfterReply

	public function onAfterReply($message) {
		CFactory::load ( 'libraries', 'userpoints' );
		CUserPoints::assignPoint ( 'com_kunena.thread.reply' );

		// Check for permisions of the current category - activity only if public or registered
		if ($message->getCategory()->pub_access <= 0) {
			//activity stream - reply post
			require_once KPATH_SITE.'/lib/kunena.link.class.php';
			$JSPostLink = CKunenaLink::GetThreadPageURL ( 'view', $message->catid, $message->thread, 0 );

			kimport('kunena.html.parser');
			$content = KunenaHtmlParser::plainBBCode($message->message, $this->_config->activity_limit);

			// Add readmore link
			$content .= '<br /><a href="'.
					CKunenaLink::GetMessageURL($message->id, $message->catid).
					'" class="small profile-newsfeed-item-action">'.JText::sprintf('Read more...').'</a>';

			$act = new stdClass ();
			$act->cmd = 'wall.write';
			$act->actor = $message->userid;
			$act->target = 0; // no target
			$act->title = JText::_ ( '{single}{actor}{/single}{multiple}{actors}{/multiple} ' . JText::_ ( 'COM_KUNENA_JS_ACTIVITYSTREAM_REPLY_MSG1' ) . ' <a href="' . $JSPostLink . '">' . $message->subject . '</a> ' . JText::_ ( 'COM_KUNENA_JS_ACTIVITYSTREAM_REPLY_MSG2' ) );
			$act->content = $content;
			$act->app = 'kunena.post';
			$act->cid = $message->thread;

			// jomsocial 0 = public, 20 = registered members
			if ($message->getCategory()->pub_access == 0) {
				$act->access = 0;
			} else {
				$act->access = 20;
			}

			CFactory::load ( 'libraries', 'activities' );
			CActivityStream::add ( $act );
		}
	}
开发者ID:rich20,项目名称:Kunena,代码行数:38,代码来源:activity.php


示例12: onAfterReply

	public function onAfterReply($message) {
		CFactory::load ( 'libraries', 'userpoints' );
		CUserPoints::assignPoint ( 'com_kunena.thread.reply' );

		$content = KunenaHtmlParser::plainBBCode($message->message, $this->_config->activity_limit);

		// Add readmore permalink
		$content .= '<br /><a rel="nofollow" href="'.
				KunenaRoute::_($message->getPermaUrl()).
				'" class="small profile-newsfeed-item-action">'.JText::_('COM_KUNENA_READMORE').'</a>';

		$act = new stdClass ();
		$act->cmd = 'wall.write';
		$act->actor = $message->userid;
		$act->target = 0; // no target
		$act->title = JText::_ ( '{single}{actor}{/single}{multiple}{actors}{/multiple} ' . JText::_ ( 'COM_KUNENA_JS_ACTIVITYSTREAM_REPLY_MSG1' ) . ' <a href="' . $message->getTopic()->getUrl() . '">' . $message->subject . '</a> ' . JText::_ ( 'COM_KUNENA_JS_ACTIVITYSTREAM_REPLY_MSG2' ) );
		$act->content = $content;
		$act->app = 'kunena.post';
		$act->cid = $message->thread;
		$act->access = $this->getAccess($message->getCategory());

		CFactory::load ( 'libraries', 'activities' );
		CActivityStream::add ( $act );
	}
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:24,代码来源:activity.php


示例13: if

						<?php endif; ?>

						<?php if ($this->config->userlist_posts) : ?>
						<li class="kdetails-posts"><span><?php echo JText::_('COM_KUNENA_USRL_POSTS') ?>:</span> <?php echo intval($this->user->posts); ?></li>
						<?php endif; ?>

						<?php if ($this->config->userlist_userhits) : ?>
						<li class="kdetails-posts"><span><?php echo JText::_('COM_KUNENA_USRL_HITS') ?>:</span> <?php echo intval($this->user->uhits) ?></li>
						<?php endif; ?>

						<?php if ($this->config->userlist_karma) : ?>
						<li class="kdetails-karma"><span><?php echo JText::_('COM_KUNENA_USRL_KARMA') ?>:</span> <?php echo intval($this->user->karma); ?></li>
						<?php endif; ?>

						<?php if (!empty($this->user->websiteurl)):?>
						<li class="kdetails-website"><span><?php echo JText::_('COM_KUNENA_MYPROFILE_WEBSITE') ?>:</span> <a href="http://<?php echo $this->escape($this->user->websiteurl); ?>" target="_blank"><?php echo KunenaHtmlParser::parseText($this->user->websitename ? $this->user->websitename : $this->user->websiteurl); ?></a></li>
						<?php endif;?>

						<?php if (!empty($this->rank_title)) : ?>
						<li class="kdetails-rank"><span><?php echo JText::_('COM_KUNENA_MYPROFILE_RANK') ?>:</span> <?php echo $this->rank_title ?></li>
						<?php endif ?>

						<?php if (!empty($this->rank_image)) : ?>
						<li class="kdetails-rankimg"><?php echo $this->rank_image ?></li>
						<?php endif ?>

						<li>
							<ul class="kdetails-links">
								<?php echo $this->user->socialButton('twitter'); ?>
								<?php echo $this->user->socialButton('facebook'); ?>
								<?php echo $this->user->socialButton('myspace'); ?>
开发者ID:rich20,项目名称:Kunena,代码行数:31,代码来源:list_row.php


示例14: echo

				value="<?php
						echo JText::_('COM_KUNENA_EDITOR_VIDEO_INSERT');
						?>"
				onmouseover="javascript:document.id('helpbox').set('value', '<?php
				echo KunenaHtmlParser::JSText('COM_KUNENA_EDITOR_HELPLINE_VIDEOAPPLY2');
				?>')" />
			</div>
			</td>
		</tr>
		<?php
		}
		if (!$this->config->disemoticons) : ?>
		<tr>
			<td class="kpostbuttons">
			<div id="smilie"><?php
			$emoticons = KunenaHtmlParser::getEmoticons(0, 1);
			foreach ( $emoticons as $emo_code=>$emo_url ) {
				echo '<img class="btnImage" src="' . $emo_url . '" border="0" alt="' . $emo_code . ' " title="' . $emo_code . ' " onclick="kbbcode.insert(\' '. $emo_code .' \', \'after\', true);" style="cursor:pointer"/> ';
			}
			?>
			</div>

			</td>
		</tr>
		<?php endif; ?>
		<!-- end of extendable secondary toolbar -->
		<tr>
			<td class="kposthint"><input type="text" name="helpbox" id="helpbox" size="45" class="kinputbox" disabled="disabled" maxlength="100"
				value="<?php echo (JText::_('COM_KUNENA_EDITOR_HELPLINE_HINT')); ?>" /></td>
		</tr>
	</table>
开发者ID:rich20,项目名称:Kunena,代码行数:31,代码来源:edit_editor.php


示例15: getLastPostLink

 /**
  * @param      $category
  * @param   null $content
  * @param   null $title
  * @param   null $class
  * @param   int  $length
  *
  * @return mixed
  */
 public function getLastPostLink($category, $content = null, $title = null, $class = null, $length = 30)
 {
     $lastTopic = $category->getLastTopic();
     $channels = $category->getChannels();
     if (!isset($channels[$lastTopic->category_id])) {
         $category = $lastTopic->getCategory();
     }
     $uri = $lastTopic->getUrl($category, true, 'last');
     if (!$content) {
         $content = $lastTopic->first_post_id != $lastTopic->last_post_id ? JText::_('COM_KUNENA_RE') . ' ' : '';
         $content .= KunenaHtmlParser::parseText($lastTopic->subject, $length);
     }
     if ($title === null) {
         $title = JText::sprintf('COM_KUNENA_TOPIC_LAST_LINK_TITLE', $this->escape($category->getLastTopic()->subject));
     }
     return JHtml::_('kunenaforum.link', $uri, $content, $title, $class, 'nofollow');
 }
开发者ID:Ruud68,项目名称:Kunena-Forum,代码行数:26,代码来源:layout.php


示例16: loadTopPolls

 /**
  * @param int $limit
  *
  * @return array
  */
 public function loadTopPolls($limit = 0)
 {
     $limit = $limit ? $limit : $this->_config->poppollscount;
     if (count($this->topPolls) < $limit) {
         $query = "SELECT poll.threadid AS id, SUM(opt.votes) AS count\n\t\t\t\t\tFROM #__kunena_polls_options AS opt\n\t\t\t\t\tINNER JOIN #__kunena_polls AS poll ON poll.id=opt.pollid\n\t\t\t\t\tGROUP BY pollid\n\t\t\t\t\tHAVING count > 0\n\t\t\t\t\tORDER BY count DESC";
         $this->_db->setQuery($query, 0, $limit);
         $polls = (array) $this->_db->loadObjectList('id');
         KunenaError::checkDatabaseError();
         $this->topPolls = KunenaForumTopicHelper::getTopics(array_keys($polls));
         $top = reset($this->topPolls);
         if (!$top) {
             return array();
         }
         $top->title = JText::_('COM_KUNENA_LIB_STAT_TOP_POLLS');
         $top->titleName = JText::_('COM_KUNENA_POLL_STATS_NAME');
         $top->titleCount = JText::_('COM_KUNENA_USRL_VOTES');
         $top->count = $polls[$top->id]->count;
         foreach ($this->topPolls as &$item) {
             $item = clone $item;
             $item->count = $polls[$item->id]->count;
             $item->link = JHtml::_('kunenaforum.link', $item->getUri(), KunenaHtmlParser::parseText($item->subject));
             $item->percent = round(100 * $item->count / $top->count);
         }
     }
     return array_slice($this->topPolls, 0, $limit);
 }
开发者ID:sillysachin,项目名称:teamtogether,代码行数:31,代码来源:statistics.php


示例17: defined

<?php
/**
 * @version $Id$
 * Kunena Component
 * @package Kunena
 *
 * @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.kunena.org
 **/
defined ( '_JEXEC' ) or die ();
?>
<div class="kblock kdefault">
	<div class="kheader">
		<h2><?php echo $this->escape($this->header); ?></h2>
	</div>
	<div class="kcontainer">
		<div class="kbody">
			<div class="kcontent">
			<?php
			if (!empty($this->html)) :
				echo $this->body;
			else :
				echo KunenaHtmlParser::parseBBCode($this->body);
			endif; ?>
			</div>
		</div>
	</div>
</div>
开发者ID:rich20,项目名称:Kunena,代码行数:29,代码来源:default.php


示例18: _prepareDocument

 protected function _prepareDocument($type)
 {
     if ($type == 'default') {
         $this->headerText = JText::_('COM_KUNENA_MENU_LATEST_DESC');
         $this->title = JText::_('COM_KUNENA_ALL_DISCUSSIONS');
         $page = intval($this->state->get('list.start') / $this->state->get('list.limit')) + 1;
         $pages = intval(($this->total - 1) / $this->state->get('list.limit')) + 1;
         $title = JText::sprintf($this->topic->subject) . " ({$page}/{$pages})";
         $this->setTitle($title);
         // TODO: use real keywords, too
         $keywords = $this->escape("{$this->topic->subject}, {$this->category->name}, {$this->category->getParent()->name}, {$this->config->board_title}");
         $this->setKeywords($keywords);
         // Create Meta Description form the content of the first message
         // better for search results display but NOT for search ranking!
         $description = KunenaHtmlParser::stripBBCode($this->topic->first_post_message, 182);
         $description = preg_replace('/\\s+/', ' ', $description);
         // remove newlines
         $description = trim($description);
         // Remove trailing spaces and beginning
         if ($page) {
             $description .= " ({$page}/{$pages})";
             //avoid the "duplicate meta description" error in google webmaster tools
         }
         $this->setDescription($description);
     } elseif ($type == 'create') {
         $this->title = JText::_('COM_KUNENA_POST_NEW_TOPIC');
         $this->setTitle($this->title);
         // TODO: set keywords and description
     } elseif ($type == 'reply') {
         $this->title = JText::_('COM_KUNENA_POST_REPLY_TOPIC') . ' ' . $this->topic->subject;
         $this->setTitle($this->title);
         // TODO: set keywords and description
     } elseif ($type == 'edit') {
         $this->title = JText::_('COM_KUNENA_POST_EDIT') . ' ' . $this->topic->subject;
         $this->setTitle($this->title);
         // TODO: set keywords and description
     }
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:38,代码来源:view.html.php


示例19:

	<td class="kcol-mid kcol-ktopictitle">
    <div class="ktopic-details">
		<?php 
if ($this->topic->attachments) {
    echo $this->getIcon('ktopicattach', JText::_('COM_KUNENA_ATTACH'));
}
?>
		<?php 
if ($this->topic->poll_id) {
    echo $this->getIcon('ktopicpoll', JText::_('COM_KUNENA_ADMIN_POLLS'));
}
?>

		<div class="ktopic-title-cover">
			<?php 
echo $this->getTopicLink($this->topic, null, null, KunenaHtmlParser::stripBBCode($this->topic->first_post_message, 500), 'ktopic-title km');
if ($this->topic->getUserTopic()->favorite) {
    echo $this->getIcon('kfavoritestar', JText::_('COM_KUNENA_FAVORITE'));
}
if ($this->me->exists() && $this->topic->getUserTopic()->posts) {
    echo $this->getIcon('ktopicmy', JText::_('COM_KUNENA_MYPOSTS'));
}
if ($this->topic->unread) {
    echo $this->getTopicLink($this->topic, 'unread', '<sup dir="ltr" class="knewchar">(' . $this->topic->unread . ' ' . JText::_('COM_KUNENA_A_GEN_NEWCHAR') . ')</sup>');
}
?>
		</div>
        <div class="ktopic-details-kcategory">
			<?php 
if (!isset($this->category) || $this->category->id != $this->topic->getCategory()->id) {
    ?>
开发者ID:laiello,项目名称:senluonirvana,代码行数:31,代码来源:default_row.php


示例20:

?>
</li>
	<li><?php 
echo $this->displayKarma();
?>
</li>
	<?php 
if ($PMlink) {
    ?>
	<li><?php 
    echo $PMlink;
    ?>
</li>
	<?php 
}
?>
	<?php 
if (!empty($this->personalText)) {
    ?>
<li><strong><?php 
    echo JText::_('COM_KUNENA_MYPROFILE_ABOUTME');
    ?>
:</strong> <?php 
    echo KunenaHtmlParser::parseText($this->personalText);
    ?>
</li><?php 
}
?>
</ul>
</div>
开发者ID:laiello,项目名称:senluonirvana,代码行数:30,代码来源:edit_summary.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP KunenaLayout类代码示例发布时间:2022-05-23
下一篇:
PHP KunenaForumTopicHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap