本文整理汇总了PHP中search::removeHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP search::removeHTML方法的具体用法?PHP search::removeHTML怎么用?PHP search::removeHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search
的用法示例。
在下文中一共展示了search::removeHTML方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTextBySection
public function getTextBySection($section)
{
global $db;
$id = is_object($section) ? $section->id : $section;
$refs = $db->selectObjects('sectionref', 'section=' . $id);
ob_start();
$mods = array();
foreach ($refs as $ref) {
$loc = null;
$loc->mod = $ref->module;
$loc->src = $ref->source;
$loc->int = $ref->internal;
if (!empty($loc->src)) {
if ($ref->module == 'containermodule') {
foreach ($db->selectObjects('container', "external='" . serialize($loc) . "'") as $mod) {
$mods[] = $mod;
$modloc = unserialize($mod->internal);
expTheme::showAction($modloc->mod, 'index', $modloc->src, array('view' => $mod->view, 'title' => $mod->title));
}
} else {
foreach ($db->selectObjects('container', "internal='" . serialize($loc) . "'") as $mod) {
$mods[] = $mod;
}
}
}
}
$text = search::removeHTML(ob_get_contents());
ob_end_clean();
return $text;
}
示例2: spiderContent
function spiderContent($item = null)
{
global $db;
$search = null;
$search->category = gt('Events');
$search->ref_module = 'calendarmodule';
$search->ref_type = 'calendar';
if ($item) {
$db->delete('search', "ref_module='calendarmodule' AND ref_type='calendar' AND original_id=" . $item->id);
$search->original_id = $item->id;
$search->body = ' ' . search::removeHTML($item->body) . ' ';
$search->title = ' ' . $item->title . ' ';
$search->view_link = str_replace(URL_FULL, '', makeLink(array('module' => 'calendarmodule', 'action' => 'view', 'id' => $item->id)));
$search->location_data = $item->location_data;
$db->insertObject($search, 'search');
} else {
$db->delete('search', "ref_module='calendarmodule' AND ref_type='calendar'");
foreach ($db->selectObjects('calendar') as $item) {
$search->original_id = $item->id;
$search->body = ' ' . search::removeHTML($item->body) . ' ';
$search->title = ' ' . $item->title . ' ';
$search->view_link = str_replace(URL_FULL, '', makeLink(array('module' => 'calendarmodule', 'action' => 'view', 'id' => $item->id)));
$search->location_data = $item->location_data;
$db->insertObject($search, 'search');
}
}
return true;
}