本文整理汇总了PHP中forum::filter方法的典型用法代码示例。如果您正苦于以下问题:PHP forum::filter方法的具体用法?PHP forum::filter怎么用?PHP forum::filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类forum
的用法示例。
在下文中一共展示了forum::filter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stripslashes
//assign data to details[] array
$details['lock'] = $detail_query[0]['lock'];
$details['sticky'] = $detail_query[0]['sticky'];
$details['title'] = stripslashes(htmlentities($detail_query[0]['title']));
$details['username'] = $detail_query[0]['username'];
$details['status'] = $detail_query[0]['status'];
$details['content'] = $detail_query[0]['content'];
$details['date'] = $detail_query[0]['date'];
$details['lastedit'] = $detail_query[0]['lastedit'];
$details['qfc'] = $detail_query[0]['qfc'];
$details['moved'] = $detail_query[0]['moved'];
$details['hidden'] = $detail_query[0]['hidden'];
$details['autohiding'] = $detail_query[0]['autohiding'];
//apply word filter if it's a user thread
if ($user->getRank($details['username']) < 3) {
$details['title'] = $forum->filter($details['title']);
}
$details['content'] = $forum->filter($details['content']);
//get any extra icons
if ($details['sticky'] == 1) {
$extra .= '<img src="../img/forum/sticky.gif"> ';
}
if ($details['lock'] == 1) {
$extra .= ' <img src="../img/forum/locked.gif">';
}
//check if the POST has been edited, then adjust the $date variable accordingly
if (empty($details['lastedit'])) {
$date = $details['date'];
} else {
//get USERNAME:DATE/TIME
$edit_details = explode('@', $details['lastedit']);
示例2: array
<tr class="thdhid">
<td width="63%"><img src="../img/forum/locked.gif"> This thread has been hidden<br /></td>
<td class="num"></td>
<td class="righttd updated"></td>
</tr>
<tr height="20px"></tr>
<?php
} else {
//get # of replies the thread has
$database->processQuery("SELECT * FROM `posts` WHERE `thread` = ?", array($moved ? $thread['moved'] : $id), false);
$replies = $database->getRowCount();
$title = stripslashes(htmlentities($thread['title']));
//apply filter is it's a user's thread
if ($user->getRank($thread['username']) < 3) {
$title = $forum->filter($title);
}
//append "(moved)" to the title if the thread was moved
if ($moved) {
$title .= ' (moved)';
}
?>
<tr class="<?php
echo $type;
?>
">
<td width="63%" id="td-<?php
echo $id;
?>
" title="<?php