本文整理汇总了PHP中CStringHelper::getMood方法的典型用法代码示例。如果您正苦于以下问题:PHP CStringHelper::getMood方法的具体用法?PHP CStringHelper::getMood怎么用?PHP CStringHelper::getMood使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStringHelper
的用法示例。
在下文中一共展示了CStringHelper::getMood方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
</a>
</div>
</div>
<?php
}
?>
</div>
<?php
} else {
?>
<!-- More than 4 photos uploaded -->
<p class="joms-stream-photo-caption"><?php
echo CStringHelper::getMood($this->acts[0]->title, $mood);
?>
</p>
<div class="joms-stream-single-photo">
<div class="joms-stream-multi-photo-hero">
<a href="<?php
echo $firstPhoto->getPhotoLink();
?>
" >
<img src="<?php
echo $firstPhoto->getImageURI();
?>
" alt="<?php
echo $this->escape($firstPhoto->caption);
?>
" />
示例2: format
/**
* General purpose stream formatting function
*/
public static function format($str, $mood = null)
{
// Some database actually already stored some URL already linked! Such as @mention format
// To handle this, we strip to to the base format. and apply the linking later
$str = preg_replace('|@<a href="(.*?)".*>(.*)</a>|', '@${2}', $str);
//Strip html href tag
$str = preg_replace('|<a href="(.*?)".*>(.*)</a>|', '${1}', $str);
// Escape it first
$str = CStringHelper::escape(rtrim(str_replace(' ', '', $str)));
$str = str_replace('&quot;', '"', $str);
// Autolink url
$str = CStringHelper::autoLink($str);
// Nl2Br
$str = nl2br($str);
// Autolinked username
$str = CUserHelper::replaceAliasURL($str);
$str = CStringHelper::getEmoticon($str);
$str = CStringHelper::getMood($str, $mood);
$str = CStringHelper::converttagtolink($str);
return $str;
}
示例3: strip_tags
echo $attachment->message->link;
?>
"><?php
echo JHTML::_('string.truncate', $attachment->message->title, 60, true, false);
?>
</a></h4>
<span><?php
echo JHTML::_('string.truncate', strip_tags($attachment->message->description), $config->getInt('streamcontentlength'));
?>
</span>
</div>
<?php
break;
case 'fetched':
//this is the fecthed content from url
echo CStringHelper::getMood($stream->sharedMessage, $stream->sharedMood);
echo $attachment->message;
break;
case 'share.groups.discussion':
?>
<div class="joms-media">
<h4 class="joms-text--title"><a href="<?php
echo $attachment->link;
?>
"><?php
echo $attachment->discussion_title;
?>
</a></h4>
<p class="joms-text--desc"><?php
echo $attachment->discussion_message;
?>
示例4: format
/**
* General purpose stream formatting function
*/
public static function format($str, $mood = null)
{
// Some database actually already stored some URL already linked! Such as @mention format
// To handle this, we strip to to the base format. and apply the linking later
$str = preg_replace('|@<a href="(.*?)".*>(.*)</a>|', '@${2}', $str);
//Strip html href tag
$str = preg_replace('|<a href="(.*?)".*>(.*)</a>|', '${1}', $str);
// Escape it first
$str = CStringHelper::escape(rtrim(str_replace(' ', '', $str)));
$str = str_replace('&quot;', '"', $str);
// Autolink url
$str = CStringHelper::autoLink($str);
// Nl2Br
$str = nl2br($str);
// Autolinked username
$str = CUserHelper::replaceAliasURL($str);
$str = CStringHelper::getEmoticon($str);
$str = CStringHelper::getMood($str, $mood);
$str = CStringHelper::converttagtolink($str);
//onstream comment filter
// onMessageDisplay Event trigger
if ($str) {
$appsLib = CAppPlugins::getInstance();
$appsLib->loadApplications();
$strObj = new stdClass();
$strObj->body = $str;
$arg[] = $strObj;
$appsLib->triggerEvent('onFormatConversion', $arg);
$str = $arg[0]->body;
// reassign back to string
}
return $str;
}