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


PHP CStringHelper::getMood方法代码示例

本文整理汇总了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);
            ?>
" />
开发者ID:SMARTRESPONSOR,项目名称:SMARTRESPONSOR,代码行数:31,代码来源:activity.photos.upload.php

示例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('&nbsp;', '', $str)));
     $str = str_replace('&amp;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;
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:24,代码来源:activities.php

示例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;
                ?>
开发者ID:Jougito,项目名称:DynWeb,代码行数:31,代码来源:base-extended.php

示例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('&nbsp;', '', $str)));
     $str = str_replace('&amp;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;
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:36,代码来源:activities.php


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