本文整理汇总了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;
}
}
}
示例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>
示例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(" ", " ", $msg);
// $msg = preg_replace('/(http\:\/\/[^\s]*)/i', "<a href=\"$1\">$1</a>", $msg );
return $msg;
}