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


PHP phpFreeChat::FilterSpecialChar方法代码示例

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


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

示例1: run

 function run(&$xml_reponse, $p)
 {
     $clientid = $p["clientid"];
     $msg = $p["param"];
     $sender = $p["sender"];
     $recipient = $p["recipient"];
     $recipientid = $p["recipientid"];
     $flag = isset($p["flag"]) ? $p["flag"] : 7;
     $c =& pfcGlobalConfig::Instance();
     $u =& pfcUserConfig::Instance();
     $ct =& pfcContainer::Instance();
     if ($c->shownotice > 0 && ($c->shownotice & $flag) == $flag) {
         $msg = phpFreeChat::FilterSpecialChar($msg);
         $msg = $flag == 7 ? '(' . $sender . ') ' . $msg : $msg;
         $nick = $ct->getNickname($u->nickid);
         $res = $ct->write($recipient, $nick, "notice", $msg);
         if (is_array($res)) {
             $cmdp = $p;
             $cmdp["param"] = implode(",", $res);
             $cmd =& pfcCommand::Factory("error");
             $cmd->run($xml_reponse, $cmdp);
             return;
         }
     }
 }
开发者ID:ho96,项目名称:yii2-phpfreechat,代码行数:25,代码来源:notice.class.php

示例2: _pfc

  </div>

  <div id="pfc_input_container">

    <table style="margin:0;padding:0;border-collapse:collapse;">
      <tbody>
      <tr>
      <td class="pfc_td1">
        <p id="pfc_handle"
           <?php 
if (!$frozen_nick) {
    echo ' title="' . _pfc("Enter your nickname here") . '"' . ' onclick="pfc.askNick(\'\')"' . ' style="cursor: pointer"';
}
?>
           ><?php 
echo phpFreeChat::FilterSpecialChar($u->nick);
?>
</p>      
      </td>
      <td class="pfc_td2">
        <input type="text"
               id="pfc_words"
               title="<?php 
echo _pfc("Enter your message here");
?>
"
               maxlength="<?php 
echo $max_text_len;
?>
"/>
      </td>
开发者ID:vlad88sv,项目名称:UFS,代码行数:31,代码来源:chat.html.tpl.php

示例3: PreFilterMsg

 /**
  * Filter messages before they are sent to container
  */
 function PreFilterMsg($msg)
 {
     $c =& pfcGlobalConfig::Instance();
     if (preg_match("/^\\[/i", $msg)) {
         // add 25 characteres if the message starts with [ : means there is a bbcode
         $msg = utf8_substr($msg, 0, $c->max_text_len + 25);
     } else {
         $msg = utf8_substr($msg, 0, $c->max_text_len);
     }
     $msg = phpFreeChat::FilterSpecialChar($msg);
     //    $msg = phpFreeChat::FilterSmiley($msg);
     /*    if ($msg[0] == "\n") $msg = substr($msg, 1); */
     // delete the first \n generated by FF
     /* if (strpos($msg,"\n") > 0) $msg  = "<br/>".$msg;
        $msg = str_replace("\r\n", "<br/>", $msg);
        $msg = str_replace("\n", "<br/>", $msg);
        $msg = str_replace("\t", "    ", $msg);*/
     //$msg = str_replace("  ", "&nbsp;&nbsp;", $msg);
     //    $msg = preg_replace('/(http\:\/\/[^\s]*)/i',  "<a href=\"$1\">$1</a>", $msg );
     return $msg;
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:24,代码来源:phpfreechat.class.php


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