本文整理汇总了PHP中ParseFilter::ParseFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseFilter::ParseFilter方法的具体用法?PHP ParseFilter::ParseFilter怎么用?PHP ParseFilter::ParseFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParseFilter
的用法示例。
在下文中一共展示了ParseFilter::ParseFilter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtotime
}
$have_perm = 0;
$row['date'] = strtotime($row['date']);
if ($is_logged and ($member_id['name'] == $row['autor'] and $row['is_register'] and $user_group[$member_id['user_group']]['allow_editc'] or $user_group[$member_id['user_group']]['edit_allc'] or $user_group[$member_id['user_group']]['admin_comments'])) {
$have_perm = 1;
}
if ($user_group[$member_id['user_group']]['edit_limit'] and $row['date'] + $user_group[$member_id['user_group']]['edit_limit'] * 60 < $_TIME) {
$have_perm = 0;
}
if (!$have_perm) {
die("error");
}
if ($config['allow_comments_wysiwyg']) {
$parse->wysiwyg = true;
$use_html = true;
$parse->ParseFilter(array('div', 'span', 'p', 'br', 'strong', 'em', 'ul', 'li', 'ol', 'b', 'u', 'i', 's'), array(), 0, 1);
if ($user_group[$member_id['user_group']]['allow_url']) {
$parse->tagsArray[] = 'a';
}
if ($user_group[$member_id['user_group']]['allow_image']) {
$parse->tagsArray[] = 'img';
}
} else {
$use_html = false;
}
$comm_txt = trim($parse->BB_Parse($parse->process(convert_unicode($_POST['comm_txt'], $config['charset'])), $use_html));
if ($parse->not_allowed_tags) {
die("error");
}
if ($parse->not_allowed_text) {
die("error");
示例2: ParseFilter
$rebuildcount = $startfrom + $step;
$buffer = "{\"status\": \"ok\",\"rebuildcount\": {$rebuildcount}}";
echo $buffer;
} else {
$parse = new ParseFilter(array(), array(), 1, 1);
$parse->edit_mode = false;
if ($config['allow_admin_wysiwyg'] == "yes") {
$parse->allow_code = false;
}
$parsexf = new ParseFilter(array(), array(), 1, 1);
$parsexf->edit_mode = false;
if ($config['allow_admin_wysiwyg'] == "yes") {
$parsexf->allow_code = false;
}
if ($config['safe_xfield']) {
$parsexf->ParseFilter();
$parsexf->safe_mode = true;
$parsexf->edit_mode = false;
}
$result = $db->query("SELECT p.id, p.short_story, p.full_story, p.xfields, p.title, p.allow_br, e.news_id FROM " . PREFIX . "_post p LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) LIMIT " . $startfrom . ", " . $count_per_step);
while ($row = $db->get_row($result)) {
if ($row['allow_br'] != '1' or $config['allow_admin_wysiwyg'] == "yes") {
$row['short_story'] = $parse->decodeBBCodes($row['short_story'], true, $config['allow_admin_wysiwyg']);
$row['full_story'] = $parse->decodeBBCodes($row['full_story'], true, $config['allow_admin_wysiwyg']);
} else {
$row['short_story'] = $parse->decodeBBCodes($row['short_story'], false);
$row['full_story'] = $parse->decodeBBCodes($row['full_story'], false);
}
$short_story = $parse->process($row['short_story']);
$full_story = $parse->process($row['full_story']);
$_POST['title'] = $row['title'];
示例3: time
$use_html = true;
}
$_POST['title'] = $db->safesql($parse->process(trim(strip_tags(convert_unicode($_POST['title'], $config['charset'])))));
if ($config['allow_quick_wysiwyg']) {
$parse->allow_code = false;
}
$_POST['news_txt'] = convert_unicode($_POST['news_txt'], $config['charset']);
$_POST['full_txt'] = convert_unicode($_POST['full_txt'], $config['charset']);
if (!$user_group[$member_id['user_group']]['allow_html']) {
$_POST['news_txt'] = strip_tags($_POST['news_txt']);
$_POST['full_txt'] = strip_tags($_POST['full_txt']);
}
$news_txt = $db->safesql($parse->BB_Parse($parse->process($_POST['news_txt']), $use_html));
$full_txt = $db->safesql($parse->BB_Parse($parse->process($_POST['full_txt']), $use_html));
if ($config['safe_xfield']) {
$parse->ParseFilter();
$parse->safe_mode = true;
}
$add_module = "yes";
$ajax_edit = "yes";
$stop = "";
$category = $cat_list;
$xfieldsaction = "init";
include ENGINE_DIR . '/inc/xfields.php';
$editreason = $db->safesql(htmlspecialchars(strip_tags(stripslashes(trim(convert_unicode($_POST['reason'], $config['charset'])))), ENT_QUOTES));
if ($editreason != "") {
$view_edit = 1;
} else {
$view_edit = 0;
}
$added_time = time() + $config['date_adjust'] * 60;
示例4: msg
if (!$user_group[$member_id['user_group']]['admin_comments']) {
msg("error", $lang['index_denied'], $lang['index_denied'], "?mod=main");
}
include_once ENGINE_DIR . '/classes/parse.class.php';
$parse = new ParseFilter();
$parse->safe_mode = true;
$parse->allow_url = $user_group[$member_id['user_group']]['allow_url'];
$parse->allow_image = $user_group[$member_id['user_group']]['allow_image'];
if ($action == "mass_approve") {
if ($_REQUEST['user_hash'] == "" or $_REQUEST['user_hash'] != $dle_login_hash) {
die("Hacking attempt! User not found");
}
if ($config['allow_comments_wysiwyg']) {
$parse->wysiwyg = true;
$use_html = true;
$parse->ParseFilter(array('div', 'a', 'span', 'p', 'br'), array(), 0, 1);
} else {
$use_html = false;
}
if (!$_POST['selected_comments']) {
msg("error", $lang['mass_error'], $lang['mass_acomm'], "?mod=cmoderation");
}
foreach ($_POST['selected_comments'] as $c_id) {
$c_id = intval($c_id);
$comments = $db->safesql($parse->BB_Parse($parse->process($_POST['selected_text'][$c_id]), $use_html));
$post_id = intval($_POST['post_id'][$c_id]);
$db->query("UPDATE " . PREFIX . "_comments SET text='{$comments}', approve='1' WHERE id='{$c_id}'");
$db->query("UPDATE " . PREFIX . "_post SET comm_num=comm_num+1 WHERE id='{$post_id}'");
}
$db->query("INSERT INTO " . USERPREFIX . "_admin_logs (name, date, ip, action, extras) values ('" . $db->safesql($member_id['name']) . "', '{$_TIME}', '{$_IP}', '19', '')");
clear_cache();