本文整理汇总了PHP中fetch_censored_text函数的典型用法代码示例。如果您正苦于以下问题:PHP fetch_censored_text函数的具体用法?PHP fetch_censored_text怎么用?PHP fetch_censored_text使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fetch_censored_text函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
$commentinfo =& $this->content['album_picturecomment'][$activity['contentid']];
$albuminfo =& $this->content['album'][$commentinfo['albumid']];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$preview = strip_quotes($commentinfo['pagetext']);
$commentinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
$userinfo = $this->fetchUser($activity['userid'], $commentinfo['postusername']);
$userinfo2 = $this->fetchUser($albuminfo['userid']);
if ($fetchphrase) {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_commented_on_a_photo_in_album_y'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2), $userinfo2['username'], vB::$vbulletin->session->vars['sessionurl'], $albuminfo['albumid'], $albuminfo['title']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_commented_on_a_photo_in_album_y'], $userinfo['username'], fetch_seo_url('member', $userinfo2), $userinfo2['username'], vB::$vbulletin->session->vars['sessionurl'], $albuminfo['albumid'], $albuminfo['title']);
}
return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('userinfo2', $userinfo2);
$templater->register('activity', $activity);
$templater->register('commentinfo', $commentinfo);
$templater->register('albuminfo', $albuminfo);
return $templater->render();
}
}
示例2: create_array
public static function create_array($ids)
{
global $vbulletin;
$set = $vbulletin->db->query_read_slave("
SELECT announcementid, startdate, title, announcement.views, forumid,
user.username, user.userid, user.usertitle, user.customtitle, user.usergroupid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
FROM " . TABLE_PREFIX . "announcement AS announcement
LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid)
WHERE announcementid IN (" . implode(',', array_map('intval', $ids)) . ")
");
$items = array();
while ($record = $vbulletin->db->fetch_array($set))
{
fetch_musername($record);
$record['title'] = fetch_censored_text($record['title']);
$record['postdate'] = vbdate($vbulletin->options['dateformat'], $record['startdate']);
$record['statusicon'] = 'new';
$record['views'] = vb_number_format($record['views']);
$record['forumtitle'] = $vbulletin->forumcache["$record[forumid]"]['title'];
$show['forumtitle'] = ($record['forumid'] == -1) ? false : true;
$announcement = new vBForum_Search_Result_Announcement();
$announcement->record = $record;
$items[$record['announcementid']] = $announcement;
}
return $items;
}
示例3: verify_title
/**
* Verifies the title is valid and sets up the title for saving (wordwrap, censor, etc).
*
* @param string Title text
*
* @param bool Whether the title is valid
*/
function verify_title(&$title)
{
// replace html-encoded spaces with actual spaces
$title = preg_replace('/&#(0*32|x0*20);/', ' ', $title);
$title = trim($title);
if ($this->registry->options['titlemaxchars'] and $title != $this->existing['title']) {
if (!empty($this->info['show_title_error'])) {
if (($titlelen = vbstrlen($title)) > $this->registry->options['titlemaxchars']) {
// title too long
$this->error('title_toolong', $titlelen, $this->registry->options['titlemaxchars']);
return false;
}
} else {
if (empty($this->info['is_automated'])) {
// not showing the title length error, just chop it
$title = vbchop($title, $this->registry->options['titlemaxchars']);
}
}
}
require_once DIR . '/includes/functions_newpost.php';
// censor, remove all caps subjects, and htmlspecialchars title
$title = fetch_no_shouting_text(fetch_censored_text($title));
// do word wrapping
$title = fetch_word_wrapped_string($title);
return true;
}
示例4: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
$messageinfo =& $this->content['visitormessage'][$activity['contentid']];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$userinfo2 =& $this->content['user'][$messageinfo['userid']];
$messageinfo['preview'] = strip_quotes($messageinfo['pagetext']);
$messageinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($messageinfo['preview'], false, true, true, true), vb::$vbulletin->options['as_snippet'])));
$userinfo = $this->fetchUser($activity['userid'], $messageinfo['postusername']);
if ($fetchphrase) {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_created_a_visitormessage_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_created_a_visitormessage_y_in_z'], $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
}
return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('userinfo2', $userinfo2);
$templater->register('linkinfo', array('vmid' => $messageinfo['vmid']));
$templater->register('linkinfo2', array('tab' => 'visitor_messaging'));
$templater->register('activity', $activity);
$templater->register('messageinfo', $messageinfo);
return $templater->render();
}
}
示例5: prepare_pictureinfo_thumb
/**
* Prepares a picture array for thumbnail display.
*
* @param array Array of picture info
*
* @return array Array of picture info modified
*/
function prepare_pictureinfo_thumb($pictureinfo)
{
global $vbulletin;
$pictureinfo['caption_preview'] = fetch_censored_text(fetch_trimmed_title($pictureinfo['caption'], $vbulletin->options['album_captionpreviewlen']));
$pictureinfo['dimensions'] = $pictureinfo['thumbnail_width'] ? "width=\"{$pictureinfo['thumbnail_width']}\" height=\"{$pictureinfo['thumbnail_height']}\"" : '';
$pictureinfo['date'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline'], true);
$pictureinfo['time'] = vbdate($vbulletin->options['timeformat'], $pictureinfo['dateline']);
return $pictureinfo;
}
示例6: mobiquo_chop
function mobiquo_chop($string)
{
global $stylevar, $vbulletin;
$string = preg_replace('/<br \\/\\>/', '', $string);
$string = preg_replace('/(^\\s+)|(\\s+$)/', '', $string);
$string = preg_replace('/\\n/', '', $string);
$string = preg_replace('/\\r/', '', $string);
$string = strip_quotes($string);
$string = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($string, false, true), 200)));
return $string;
}
示例7: prepare_pictureinfo_thumb
/**
* Prepares a picture array for thumbnail display.
*
* @param array Array of picture info
* @param array Container info (either for a group or album); changes thumbnail URL
*
* @return array Array of picture info modified
*/
function prepare_pictureinfo_thumb($pictureinfo, $displaytypeinfo)
{
global $vbulletin;
$pictureinfo['caption_preview'] = fetch_censored_text(fetch_trimmed_title($pictureinfo['caption'], $vbulletin->options['album_captionpreviewlen']));
$pictureinfo['thumburl'] = $pictureinfo['thumbnail_filesize'] ? fetch_picture_url($pictureinfo, $displaytypeinfo, true) : '';
$pictureinfo['dimensions'] = $pictureinfo['thumbnail_width'] ? "width=\"{$pictureinfo['thumbnail_width']}\" height=\"{$pictureinfo['thumbnail_height']}\"" : '';
$pictureinfo['date'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline'], true);
$pictureinfo['time'] = vbdate($vbulletin->options['dateformat'], $pictureinfo['dateline']);
($hook = vBulletinHook::fetch_hook('album_prepare_thumb')) ? eval($hook) : false;
return $pictureinfo;
}
示例8: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
$userinfo =& $this->content['user'][$activity['userid']];
$bloginfo =& $this->content['blog'][$activity['contentid']];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$preview = strip_quotes($bloginfo['pagetext']);
$bloginfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
if ($fetchphrase) {
return array('phrase' => construct_phrase($this->vbphrase['x_created_a_blog_entry_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('entry', $bloginfo), $bloginfo['title'], fetch_seo_url('blog', $bloginfo), $bloginfo['blog_title']), 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('activity', $activity);
$templater->register('bloginfo', $bloginfo);
return $templater->render();
}
}
示例9: verify_title
/**
* Verifies that the title is valid
*
* @param String Title
*
* @return boolean Returns true if title is valid
*/
function verify_title(&$title)
{
$title = fetch_censored_text($title);
// replace html-encoded spaces with actual spaces
$title = preg_replace('/&#(0*32|x0*20);/', ' ', $title);
// do word wrapping
if ($this->registry->options['wordwrap'] != 0) {
$title = fetch_word_wrapped_string($title);
}
// remove all caps subjects
require_once DIR . '/includes/functions_newpost.php';
$title = fetch_no_shouting_text($title);
$title = trim($title);
if (empty($title)) {
$this->error('invalid_title_specified');
return false;
}
return true;
}
示例10: fetchTemplate
public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
{
global $show;
$postinfo =& $this->content['post'][$activity['contentid']];
$threadinfo =& $this->content['thread'][$postinfo['threadid']];
$foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']];
$threadinfo['prefix_plain_html'] = htmlspecialchars_uni($this->vbphrase["prefix_{$threadinfo['prefixid']}_title_plain"]);
$threadinfo['prefix_rich'] = $this->vbphrase["prefix_{$threadinfo['prefixid']}_title_rich"];
$activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
$activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
$preview = strip_quotes($postinfo['pagetext']);
$postinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
$forumperms = fetch_permissions($threadinfo['forumid']);
$show['threadcontent'] = $forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'] ? true : false;
$userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);
if ($fetchphrase) {
if ($threadinfo['pollid']) {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_replied_to_a_poll_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_poll_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
}
} else {
if ($userinfo['userid']) {
$phrase = construct_phrase($this->vbphrase['x_replied_to_a_thread_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
} else {
$phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_thread_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
}
}
return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
} else {
$templater = vB_Template::create($templatename);
$templater->register('userinfo', $userinfo);
$templater->register('activity', $activity);
$templater->register('threadinfo', $threadinfo);
$templater->register('postinfo', $postinfo);
$templater->register('pageinfo', array('p' => $postinfo['postid']));
$templater->register('foruminfo', $foruminfo);
return $templater->render();
}
}
示例11: print_form_header
if (!$pages) {
$pages = 1;
}
print_form_header('attachment', 'search', 0, 1);
construct_hidden_code('prevsearch', $vbulletin->GPC['prevsearch']);
construct_hidden_code('prunedate', $vbulletin->GPC['prunedate']);
construct_hidden_code('pagenum', $vbulletin->GPC['pagenum']);
print_table_header(construct_phrase($vbphrase['showing_attachments_x_to_y_of_z'], ($vbulletin->GPC['pagenum'] - 1) * $vbulletin->GPC['search']['results'] + 1, iif($vbulletin->GPC['search']['results'] * $vbulletin->GPC['pagenum'] > $attachments['count'], $attachments['count'], $vbulletin->GPC['search']['results'] * $vbulletin->GPC['pagenum']), $attachments['count']), 7);
print_cells_row(array('<input type="checkbox" name="allbox" title="' . $vbphrase['check_all'] . '" onclick="js_check_all(this.form);" />', $vbphrase['filename'], $vbphrase['username'], $vbphrase['date'], $vbphrase['filesize'], $vbphrase['downloads'], $vbphrase['controls']), 1);
$currentrow = 1;
$attachmultiple = new vB_Attachment_Display_Multiple($vbulletin);
$attachments = $attachmultiple->fetch_results(implode(" AND ", $query), false, ($vbulletin->GPC['pagenum'] - 1) * $vbulletin->GPC['search']['results'], $vbulletin->GPC['search']['results'], $vbulletin->GPC['search']['orderby'], $vbulletin->GPC['search']['ordering']);
foreach ($attachments as $attachment) {
$cell = array();
$cell[] = "<input type=\"checkbox\" name=\"a_delete[]\" value=\"{$attachment['attachmentid']}\" tabindex=\"1\" />";
$cell[] = "<p align=\"" . vB_Template_Runtime::fetchStyleVar('left') . "\"><a href=\"../attachment.php?" . $vbulletin->session->vars['sessionurl'] . "attachmentid={$attachment['attachmentid']}&d={$attachment['dateline']}\">" . fetch_censored_text(htmlspecialchars_uni($attachment['filename'], false)) . '</a></p>';
$cell[] = iif($attachment['userid'], "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&u={$attachment['userid']}\">{$attachment['username']}</a>", $attachment['username']);
$cell[] = vbdate($vbulletin->options['dateformat'], $attachment['dateline']) . construct_link_code($vbphrase['view_content'], $attachmultiple->fetch_content_url($attachment, '../'), true);
$cell[] = vb_number_format($attachment['filesize'], 1, true);
$cell[] = $attachment['counter'];
$cell[] = '<span class="smallfont">' . construct_link_code($vbphrase['edit'], "attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&attachmentid={$attachment['attachmentid']}") . construct_link_code($vbphrase['delete'], "attachment.php?" . $vbulletin->session->vars['sessionurl'] . "do=delete&attachmentid={$attachment['attachmentid']}") . '</span>';
print_cells_row($cell);
$currentrow++;
if ($currentrow > $vbulletin->GPC['search']['results']) {
break;
}
}
print_description_row('<input type="submit" class="button" name="massdelete" value="' . $vbphrase['delete_selected_attachments'] . '" tabindex="1" />', 0, 7, '', 'center');
$db->free_result($results);
if ($pages > 1 and $vbulletin->GPC['pagenum'] < $pages) {
print_table_footer(7, iif($vbulletin->GPC['pagenum'] > 1, "<input type=\"submit\" name=\"prev_page\" class=\"button\" tabindex=\"1\" value=\"{$vbphrase['prev_page']}\" accesskey=\"s\" />") . "\n<input type=\"submit\" name=\"next_page\" class=\"button\" tabindex=\"1\" value=\"{$vbphrase['next_page']}\" accesskey=\"s\" />");
示例12: process_thread_array
// get highlight words
$post['highlight'] =& $highlightwords;
// get info from post
$post = process_thread_array($post, $lastread["{$post['forumid']}"], $post['allowicons']);
$show['disabled'] = ($managethread["{$post['postid']}"] or $managepost["{$post['postid']}"] or $approvepost["{$post['postid']}"] or $approveattachment["{$post['postid']}"]) ? false : true;
$show['moderated'] = (!$post['visible'] or !$post['thread_visible'] and $post['postid'] == $post['firstpostid']) ? true : false;
if ($post['pdel_userid']) {
$post['del_username'] =& $post['pdel_username'];
$post['del_userid'] =& $post['pdel_userid'];
$post['del_reason'] = fetch_censored_text($post['pdel_reason']);
$show['deleted'] = true;
} else {
if ($post['tdel_userid']) {
$post['del_username'] =& $post['tdel_username'];
$post['del_userid'] =& $post['tdel_userid'];
$post['del_reason'] = fetch_censored_text($post['tdel_reason']);
$show['deleted'] = true;
} else {
$show['deleted'] = false;
}
}
if ($post['prefixid']) {
$post['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_{$post['prefixid']}_title_plain"]);
$post['prefix_rich'] = $vbphrase["prefix_{$post['prefixid']}_title_rich"];
} else {
$post['prefix_plain_html'] = '';
$post['prefix_rich'] = '';
}
$itemcount++;
exec_switch_bg();
($hook = vBulletinHook::fetch_hook('search_results_postbit')) ? eval($hook) : false;
示例13: prepare_socialgroup
/**
* Takes information regardign a group, and prepares the information within it
* for display
*
* @param array Group Array
* @param bool Whether to fetch group members and avatars
*
* @return array Group Array with prepared information
*
*/
function prepare_socialgroup($group, $fetchmembers = false)
{
global $vbulletin;
if (!is_array($group)) {
return array();
}
if ($fetchmembers) {
$membersinfo = cache_group_members();
$group['membersinfo'] = $membersinfo[$group['groupid']];
}
$group['joindate'] = !empty($group['joindate']) ? vbdate($vbulletin->options['dateformat'], $group['joindate'], true) : '';
$group['createtime'] = !empty($group['createdate']) ? vbdate($vbulletin->options['timeformat'], $group['createdate'], true) : '';
$group['createdate'] = !empty($group['createdate']) ? vbdate($vbulletin->options['dateformat'], $group['createdate'], true) : '';
$group['lastupdatetime'] = !empty($group['lastupdate']) ? vbdate($vbulletin->options['timeformat'], $group['lastupdate'], true) : '';
$group['lastupdatedate'] = !empty($group['lastupdate']) ? vbdate($vbulletin->options['dateformat'], $group['lastupdate'], true) : '';
$group['visible'] = vb_number_format($group['visible']);
$group['moderation'] = vb_number_format($group['moderation']);
$group['members'] = vb_number_format($group['members']);
$group['moderatedmembers'] = vb_number_format($group['moderatedmembers']);
$group['categoryname'] = htmlspecialchars_uni($group['categoryname']);
$group['discussions'] = vb_number_format($group['discussions']);
$group['lastdiscussion'] = fetch_word_wrapped_string(fetch_censored_text($group['lastdiscussion']));
$group['trimdiscussion'] = fetch_trimmed_title($group['lastdiscussion']);
if (!($group['options'] & $vbulletin->bf_misc_socialgroupoptions['enable_group_albums'])) {
// albums disabled in this group - force 0 pictures
$group['picturecount'] = 0;
}
$group['rawpicturecount'] = $group['picturecount'];
$group['picturecount'] = vb_number_format($group['picturecount']);
$group['rawname'] = $group['name'];
$group['rawdescription'] = $group['description'];
$group['name'] = fetch_word_wrapped_string(fetch_censored_text($group['name']));
if ($group['description']) {
$group['shortdescription'] = fetch_word_wrapped_string(fetch_censored_text(fetch_trimmed_title($group['description'], 185)));
} else {
$group['shortdescription'] = $group['name'];
}
$group['mediumdescription'] = fetch_word_wrapped_string(fetch_censored_text(fetch_trimmed_title($group['description'], 1000)));
$group['description'] = nl2br(fetch_word_wrapped_string(fetch_censored_text($group['description'])));
$group['is_owner'] = $group['creatoruserid'] == $vbulletin->userinfo['userid'];
$group['is_automoderated'] = ($group['options'] & $vbulletin->bf_misc_socialgroupoptions['owner_mod_queue'] and $vbulletin->options['sg_allow_owner_mod_queue'] and !$vbulletin->options['social_moderation']);
$group['canviewcontent'] = (!($group['options'] & $vbulletin->bf_misc_socialgroupoptions['join_to_view']) or !$vbulletin->options['sg_allow_join_to_view'] or $group['membertype'] == 'member' or can_moderate(0, 'canmoderategroupmessages') or can_moderate(0, 'canremovegroupmessages') or can_moderate(0, 'candeletegroupmessages') or fetch_socialgroup_perm('canalwayspostmessage') or fetch_socialgroup_perm('canalwascreatediscussion'));
$group['lastpostdate'] = vbdate($vbulletin->options['dateformat'], $group['lastpost'], true);
$group['lastposttime'] = vbdate($vbulletin->options['timeformat'], $group['lastpost']);
$group['lastposterid'] = $group['canviewcontent'] ? $group['lastposterid'] : 0;
$group['lastposter'] = $group['canviewcontent'] ? $group['lastposter'] : '';
// check read marking
//remove notice and make readtime determination a bit more clear
if (!empty($group['readtime'])) {
$readtime = $group['readtime'];
} else {
$readtime = fetch_bbarray_cookie('group_marking', $group['groupid']);
if (!$readtime) {
$readtime = $vbulletin->userinfo['lastvisit'];
}
}
// get thumb url
$group['iconurl'] = fetch_socialgroupicon_url($group, true);
// check if social group is moderated to join
$group['membermoderated'] = 'moderated' == $group['type'];
// posts older than markinglimit days won't be highlighted as new
$oldtime = TIMENOW - $vbulletin->options['markinglimit'] * 24 * 60 * 60;
$readtime = max((int) $readtime, $oldtime);
$group['readtime'] = $readtime;
$group['is_read'] = $readtime >= $group['lastpost'];
// Legacy Hook 'group_prepareinfo' Removed //
return $group;
}
示例14: vB_FloodCheck
require_once(DIR . '/includes/class_floodcheck.php');
$floodcheck = new vB_FloodCheck($vbulletin, 'user', 'emailstamp');
$floodcheck->commit_key($vbulletin->userinfo['userid'], TIMENOW, TIMENOW - $vbulletin->options['emailfloodtime']);
if ($floodcheck->is_flooding())
{
eval(standard_error(fetch_error('emailfloodcheck', $vbulletin->options['emailfloodtime'], $floodcheck->flood_wait())));
}
}
($hook = vBulletinHook::fetch_hook('sendmessage_domailmember')) ? eval($hook) : false;
$message = fetch_censored_text($vbulletin->GPC['message']);
eval(fetch_email_phrases('usermessage', $userinfo['languageid']));
vbmail($userinfo['email'], fetch_censored_text($vbulletin->GPC['emailsubject']), $message , false, $vbulletin->userinfo['email'], '', $vbulletin->userinfo['username']);
// parse this next line with eval:
$sendtoname = $userinfo['username'];
eval(print_standard_redirect('redirect_sentemail'));
}
}
/*======================================================================*\
|| ####################################################################
|| #
|| # CVS: $RCSfile$ - $Revision: 35508 $
|| ####################################################################
\*======================================================================*/
?>
示例15: verify_pagetext
/**
* Basic options to perform on all pagetext type fields
*
* @param string Page text
*
* @param bool Whether the text is valid
* @param bool Whether to run the case stripper
*/
function verify_pagetext(&$pagetext, $noshouting = true)
{
require_once DIR . '/includes/functions_newpost.php';
$pagetext = preg_replace('/&#(0*32|x0*20);/', ' ', $pagetext);
$pagetext = trim($pagetext);
// remove empty bbcodes
//$pagetext = $this->strip_empty_bbcode($pagetext);
// add # to color tags using hex if it's not there
$pagetext = preg_replace('#\\[color=("|"|\'|)([a-f0-9]{6})\\1]#i', '[color=\\1#\\2\\1]', $pagetext);
// strip alignment codes that are closed and then immediately reopened
$pagetext = preg_replace('#\\[/(left|center|right)\\]([\\r\\n]*)\\[\\1\\]#i', '\\2', $pagetext);
// remove [/list=x remnants
if (stristr($pagetext, '[/list=') != false) {
$pagetext = preg_replace('#\\[/list=[a-z0-9]+\\]#siU', '[/list]', $pagetext);
}
// remove extra whitespace between [list] and first element
// -- unnecessary now, bbcode parser handles leading spaces after a list tag
//$pagetext = preg_replace('#(\[list(=("|"|\'|)([^\]]*)\\3)?\])\s+#i', "\\1\n", $pagetext);
// censor main message text
$pagetext = fetch_censored_text($pagetext);
// parse URLs in message text
if ($this->info['parseurl']) {
$pagetext = convert_url_to_bbcode($pagetext);
}
// remove sessionhash from urls:
require_once DIR . '/includes/functions_login.php';
$pagetext = fetch_removed_sessionhash($pagetext);
if ($noshouting) {
$pagetext = fetch_no_shouting_text($pagetext);
}
require_once DIR . '/includes/functions_video.php';
$pagetext = parse_video_bbcode($pagetext);
return true;
}