當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。