• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fetch_threadinfo函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fetch_threadinfo函数的典型用法代码示例。如果您正苦于以下问题:PHP fetch_threadinfo函数的具体用法?PHP fetch_threadinfo怎么用?PHP fetch_threadinfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fetch_threadinfo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: group_data_change

 /**
  * Called on each
  * - add / edit / delete post
  * - thread move
  * - thread soft delete
  * 
  * Don't reindex all post on each new one. That's expensive.
  * Do it only on thread soft delete. In other case - reindex
  * only first post.
  */
 public function group_data_change($id)
 {
     $thread_info = fetch_threadinfo($id);
     if (!$thread_info) {
         return false;
     }
     if ($thread_info['isdeleted']) {
         // if thread is soft deleted - update all childs
         return $this->delete_thread($id);
     }
     $first_post_info = array('contentypeid' => $this->get_contenttypeid(), 'primaryid' => $thread_info['firstpostid']);
     $indexer = vBSphinxSearch_Core::get_instance()->get_core_indexer();
     return $indexer->index($first_post_info);
 }
开发者ID:rcdesign,项目名称:vb-sphinx_search,代码行数:24,代码来源:post.php


示例2: editPost

function editPost($edit)
{
    global $vbulletin;
    $postinfo = fetch_postinfo($edit['postid']);
    $foruminfo = fetch_foruminfo($edit['forumid']);
    $threadinfo = fetch_threadinfo($edit['threadid']);
    $threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost');
    $threadman->set_existing($threadinfo);
    $threadman->set_info('forum', $foruminfo);
    $threadman->set_info('thread', $threadinfo);
    $threadman->set('title', $edit['title']);
    $threadman->set('prefixid', $edit['prefixid']);
    $threadman->save();
    $postman =& datamanager_init('Post', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
    $postman->set_existing($postinfo);
    $postman->setr('title', $edit['title']);
    $postman->setr('pagetext', $edit['pagetext']);
    $postman->save();
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:19,代码来源:function.php


示例3: vbseo_send_notification_pingback

function vbseo_send_notification_pingback($threadid, $postid, $vbseo_linkback_uri, $title, $message, $approve = 1, $sendtocp = 1)
{
    global $vbulletin;
    if (!$vbulletin) {
        return;
    }
    if (!$vbulletin->options['enableemail']) {
        return;
    }
    @define('VBSEO_PREPROCESSED', true);
    $threadinfo = fetch_threadinfo($threadid);
    $foruminfo = fetch_foruminfo($threadinfo['forumid']);
    $threadinfo['title'] = unhtmlspecialchars($threadinfo['title']);
    $foruminfo['title_clean'] = unhtmlspecialchars($foruminfo['title_clean']);
    vbmail_start();
    $evalemail = array();
    if ($approve && VBSEO_PINGBACK_NOTIFY) {
        $useremails = $vbulletin->db->query_read("\nSELECT user.*, subscribethread.emailupdate\nFROM " . vbseo_tbl_prefix('subscribethread') . " AS subscribethread\nINNER JOIN " . vbseo_tbl_prefix('user') . " AS user ON (subscribethread.userid = user.userid)\nLEFT JOIN " . vbseo_tbl_prefix('usergroup') . " AS usergroup ON (usergroup.usergroupid = user.usergroupid)\nLEFT JOIN " . vbseo_tbl_prefix('usertextfield') . " AS usertextfield ON (usertextfield.userid = user.userid)\nWHERE subscribethread.threadid = {$threadid} AND\nsubscribethread.emailupdate IN (1, 4) AND\nuser.usergroupid <> 3 AND\n(usergroup.genericoptions & " . ($vbulletin->bf_ugp_genericoptions['isbannedgroup'] + 0) . ") = 0\n");
        while ($touser = $vbulletin->db->fetch_array($useremails)) {
            if ($vbulletin->usergroupcache["{$touser['usergroupid']}"]['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isbannedgroup'] + 0) {
                continue;
            }
            $touser['username'] = unhtmlspecialchars($touser['username']);
            $touser['languageid'] = iif($touser['languageid'] == 0, $vbulletin->options['languageid'], $touser['languageid']);
            if (empty($evalemail)) {
                $evalemail = vbseo_get_email_templates('vbseo_notify_linkbacks');
            }
            eval(iif(empty($evalemail["{$touser['languageid']}"]), $evalemail["-1"], $evalemail["{$touser['languageid']}"]));
            if ($touser['emailupdate'] == 4 and !empty($touser['icq'])) {
                $touser['email'] = $touser['icq'] . '@pager.icq.com';
            }
            vbmail($touser['email'], $subj, $msg);
        }
    }
    $evalemail = vbseo_get_email_templates('vbseo_notify_linkbacks_mod');
    $more_emails = explode(' ', VBSEO_PINGBACK_NOTIFY_BCC);
    if ($sendtocp) {
        foreach ($more_emails as $email) {
            eval($evalemail["-1"]);
            vbmail($email, $subj, $msg);
        }
    }
    vbmail_end();
}
开发者ID:holandacz,项目名称:nb4,代码行数:44,代码来源:functions_vbseo_linkback.php


示例4: post_save_each

 function post_save_each($doquery = true)
 {
     global $vbphrase;
     if (!$this->condition) {
         if ($postinfo =& $this->info['postinfo']) {
             $dataman =& datamanager_init('Post', $this->registry, ERRTYPE_SILENT, 'threadpost');
             $dataman->set_existing($postinfo);
             $dataman->set('infraction', $this->fetch_field('points') == 0 ? 1 : 2);
             $dataman->save();
             unset($dataman);
             $threadinfo =& $this->info['threadinfo'];
         }
         if ($userinfo =& $this->info['userinfo']) {
             $userdata =& datamanager_init('User', $this->registry, ERRTYPE_SILENT);
             $userdata->set_existing($userinfo);
             if ($points = $this->fetch_field('points')) {
                 $userdata->set('ipoints', "ipoints + {$points}", false);
                 $userdata->set('infractions', 'infractions + 1', false);
             } else {
                 $userdata->set('warnings', 'warnings + 1', false);
             }
             $userdata->save();
             unset($userdata);
             if ($points) {
                 $this->update_infraction_groups($this->fetch_field('action'), $points);
             }
             // Insert thread
             if ($this->registry->options['uiforumid'] and $foruminfo = fetch_foruminfo($this->registry->options['uiforumid'])) {
                 $infractioninfo = array('title' => $this->fetch_field('customreason') ? unhtmlspecialchars($this->fetch_field('customreason')) : fetch_phrase('infractionlevel' . $this->fetch_field('infractionlevelid') . '_title', 'infractionlevel', '', false, true, 0), 'points' => $points, 'note' => unhtmlspecialchars($this->fetch_field('note')), 'message' => $this->info['message'], 'username' => unhtmlspecialchars($userinfo['username']), 'threadtitle' => unhtmlspecialchars($threadinfo['title']));
                 if ($threadinfo['prefixid']) {
                     // need prefix in correct language
                     $infractioninfo['prefix_plain'] = fetch_phrase("prefix_{$threadinfo['prefixid']}_title_plain", 'global', '', false, true, 0, false) . ' ';
                 } else {
                     $infractioninfo['prefix_plain'] = '';
                 }
                 eval(fetch_email_phrases($postinfo ? 'infraction_thread_post' : 'infraction_thread_profile', 0, $points > 0 ? 'infraction_thread_infraction' : 'infraction_thread_warning'));
                 $dataman =& datamanager_init('Thread_FirstPost', $this->registry, ERRTYPE_SILENT, 'threadpost');
                 $dataman->set_info('forum', $foruminfo);
                 $dataman->set_info('is_automated', true);
                 $dataman->set_info('mark_thread_read', true);
                 $dataman->set('allowsmilie', true);
                 $dataman->setr('userid', $this->fetch_field('whoadded'));
                 $dataman->set('title', $subject);
                 $dataman->setr('pagetext', $message);
                 $dataman->setr('forumid', $foruminfo['forumid']);
                 $dataman->set('visible', true);
                 $threadid = $dataman->save();
                 // Update infraction with threadid
                 $infdata =& datamanager_init('Infraction', $this->registry, ERRTYPE_SILENT);
                 $infractioninfo = array('infractionid' => $this->fetch_field('infractionid'));
                 $infdata->set_existing($infractioninfo);
                 $infdata->set('threadid', $threadid);
                 $infdata->save();
                 unset($infdata);
             }
         }
     } else {
         if ($this->setfields['action'] and ($this->fetch_field('action') == 1 or $this->fetch_field('action') == 2)) {
             $this->reset_infraction();
             $this->update_infraction_groups($this->existing['action'], $this->existing['points']);
             if ($this->fetch_field('action') == 2 and $threadid = $this->fetch_field('threadid') and $threadinfo = fetch_threadinfo($threadid) and $foruminfo = $this->registry->forumcache["{$threadinfo['forumid']}"] and $userid = $this->fetch_field('actionuserid')) {
                 // Reversed
                 $infractioninfo = array('reason' => unhtmlspecialchars($this->fetch_field('actionreason')));
                 eval(fetch_email_phrases('infraction_post', 0, $this->existing['points'] > 0 ? 'infraction_post_infraction' : 'infraction_post_warning'));
                 $dataman =& datamanager_init('Post', $this->registry, ERRTYPE_SILENT, 'threadpost');
                 $dataman->set_info('thread', $threadinfo);
                 $dataman->set_info('forum', $foruminfo);
                 $dataman->set('threadid', $threadinfo['threadid']);
                 $dataman->set('userid', $userid);
                 $dataman->set('allowsmilie', true);
                 $dataman->set('visible', true);
                 $dataman->set('title', $subject);
                 $dataman->set('pagetext', $message);
                 $dataman->save();
                 unset($dataman);
             }
         }
     }
     ($hook = vBulletinHook::fetch_hook('infractiondata_postsave')) ? eval($hook) : false;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:80,代码来源:class_dm_infraction.php


示例5: intval

         $destthreadid = intval($matches[2]);
     } else {
         if (preg_match('#(postid|p)=([0-9]+)#', $vbulletin->GPC['mergethreadurl'], $matches)) {
             $destpostid = verify_id('post', $matches[2], 0);
             if ($destpostid == 0) {
                 // do invalid url
                 eval(standard_error(fetch_error('mergebadurl')));
             }
             $postinfo = fetch_postinfo($destpostid);
             $destthreadid = $postinfo['threadid'];
         } else {
             eval(standard_error(fetch_error('mergebadurl')));
         }
     }
     $destthreadid = verify_id('thread', $destthreadid);
     $destthreadinfo = fetch_threadinfo($destthreadid);
     $destforuminfo = fetch_foruminfo($destthreadinfo['forumid']);
     if ($destthreadinfo['isdeleted'] and !can_moderate($destthreadinfo['forumid'], 'candeleteposts') or !$destthreadinfo['visible'] and !can_moderate($destthreadinfo['forumid'], 'canmoderateposts')) {
         if (can_moderate($destthreadinfo['forumid'])) {
             print_no_permission();
         } else {
             eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
         }
     }
 }
 $userbyuserid = array();
 $unique_thread_user = array();
 $posts = $db->query_read_slave("\n\t\tSELECT post.postid, post.threadid, post.visible, post.title, post.username, post.dateline, post.parentid, post.userid,\n\t\t\tthread.forumid, thread.title AS thread_title, thread.postuserid, thread.visible AS thread_visible, thread.firstpostid,\n\t\t\tthread.sticky, thread.open, thread.iconid,\n\t\t\tIF(subscribethread.emailupdate IS NULL, 0, 1) AS issubscribed, user.autosubscribe\n\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\tINNER JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = post.userid AND subscribethread.canview = 1)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS user ON (post.userid = user.userid)\n\t\tWHERE postid IN (" . implode(',', $postids) . ")\n\t\tORDER BY post.dateline\n\t");
 while ($post = $db->fetch_array($posts)) {
     if (!can_moderate($post['forumid'], 'canmanagethreads')) {
         eval(standard_error(fetch_error('you_do_not_have_permission_to_manage_threads_and_posts', $post['title'], $post['thread_title'], $vbulletin->forumcache["{$post['forumid']}"]['title'])));
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:inlinemod.php


示例6: vB_Attach_Display_Content

         $attach = new vB_Attach_Display_Content($vbulletin, 'vBForum_Post');
         $postattach = $attach->fetch_postattach($posthash);
     }
     // ### PREVIEW POST ###
     $postpreview = process_post_preview($newpost, 0, $postattach);
     $_REQUEST['do'] = 'newthread';
     $newpost['message'] = htmlspecialchars_uni($newpost['message']);
     $podcasturl = htmlspecialchars_uni($newpost['podcasturl']);
     $podcastsize = $newpost['podcastsize'] ? $newpost['podcastsize'] : '';
     $podcastkeywords = htmlspecialchars_uni($newpost['podcastkeywords']);
     $podcastsubtitle = htmlspecialchars_uni($newpost['podcastsubtitle']);
     $podcastauthor = htmlspecialchars_uni($newpost['podcastauthor']);
     $explicitchecked = $newpost['podcastexplicit'] ? 'checked="checked"' : '';
 } else {
     // ### NOT PREVIEW - ACTUAL POST ###
     $threadinfo = fetch_threadinfo($newpost['threadid']);
     // need the forumread variable from this
     mark_thread_read($threadinfo, $foruminfo, $vbulletin->userinfo['userid'], TIMENOW);
     ($hook = vBulletinHook::fetch_hook('newthread_post_complete')) ? eval($hook) : false;
     if ($newpost['postpoll']) {
         $vbulletin->url = 'poll.php?' . $vbulletin->session->vars['sessionurl'] . "t={$newpost['threadid']}&polloptions={$newpost['polloptions']}";
         if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) {
             eval(print_standard_redirect('redirect_postthanks', true, true));
         } else {
             eval(print_standard_redirect('redirect_postthanks_nopermission', true, true));
         }
     } else {
         if ($newpost['visible']) {
             if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) {
                 $vbulletin->url = fetch_seo_url('thread', $threadinfo, array('p' => $newpost['postid'] . "#post{$newpost['postid']}"));
                 eval(print_standard_redirect('redirect_postthanks'));
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:newthread.php


示例7: post_save_each

 /**
  * Updating the votecount for that thread
  *
  * @param	boolean	Do the query?
  */
 function post_save_each($doquery = true)
 {
     // Are we handeling a multi DM
     if (!$this->condition or $this->existing['vote'] != $this->fetch_field('vote')) {
         if ($this->info['thread']) {
             $threadinfo =& $this->info['thread'];
         } else {
             $threadinfo = fetch_threadinfo($this->fetch_field('threadid'));
         }
         if (!$this->condition) {
             // Increment the vote count for the thread that has just been voted on
             $threadman =& datamanager_init('Thread', $this->registry, ERRTYPE_SILENT, 'threadpost');
             $threadman->set_existing($threadinfo);
             $threadman->set('votetotal', "votetotal + " . intval($this->fetch_field('vote')), false);
             $threadman->set('votenum', 'votenum + 1', false);
             $threadman->save();
         } else {
             // this is an update
             $votediff = $this->fetch_field('vote') - $this->existing['vote'];
             $threadman =& datamanager_init('Thread', $this->registry, ERRTYPE_SILENT, 'threadpost');
             $threadman->set_existing($threadinfo);
             $threadman->set('votetotal', "votetotal + {$votediff}", false);
             $threadman->save();
         }
         if ($this->fetch_field('userid') == $this->registry->userinfo['userid']) {
             set_bbarray_cookie('thread_rate', $this->fetch_field('threadid'), $this->fetch_field('vote'), 1);
         }
     }
     ($hook = vBulletinHook::fetch_hook('threadratedata_postsave')) ? eval($hook) : false;
 }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:35,代码来源:class_dm_threadrate.php


示例8: fetch_permissions

// *********************************************************************************
// check forum permissions
$forumperms = fetch_permissions($thread['forumid']);
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
    print_no_permission();
}
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($thread['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0)) {
    print_no_permission();
}
// *********************************************************************************
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
// *********************************************************************************
// jump page if thread is actually a redirect
if ($thread['open'] == 10) {
    $destthreadinfo = fetch_threadinfo($threadinfo['pollid']);
    exec_header_redirect(fetch_seo_url('thread|js', $destthreadinfo, $pageinfo));
}
// *********************************************************************************
// get ignored users
$ignore = array();
if (trim($vbulletin->userinfo['ignorelist'])) {
    $ignorelist = preg_split('/( )+/', trim($vbulletin->userinfo['ignorelist']), -1, PREG_SPLIT_NO_EMPTY);
    foreach ($ignorelist as $ignoreuserid) {
        $ignore["{$ignoreuserid}"] = 1;
    }
}
DEVDEBUG('ignored users: ' . implode(', ', array_keys($ignore)));
// *********************************************************************************
// filter out deletion notices if can't be seen
if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canseedelnotice'] or can_moderate($threadinfo['forumid'])) {
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showthread.php


示例9: canPostComment

	private function canPostComment($threadid, $user)
	{
		$commentinfo = fetch_threadinfo($threadid);

		// if user did not submit the article or user is guest, check reply others permission
		$userid = $user->get_field('userid');
		if ( empty($userid) OR ($userid != $commentinfo['postuserid']) )
		{
			return $user->hasForumPermission($commentinfo['forumid'], 'canreplyothers');
		}

		// if current user submitted article, check reply own forum permission
		else
		{
			return $user->hasForumPermission($commentinfo['forumid'], 'canreplyown');
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:comments.php


示例10: print_submit_row

        print_submit_row($vbphrase['prune_threads'], NULL, 5);
    } else {
        if ($vbulletin->GPC['type'] == 'move') {
            print_submit_row($vbphrase['move_threads'], NULL, 5);
        }
    }
}
// ###################### Start move/prune select - finish! #######################
if ($_POST['do'] == 'dothreadsselfinish') {
    $vbulletin->input->clean_array_gpc('p', array('thread' => TYPE_ARRAY, 'destforumid' => TYPE_INT));
    if (!empty($vbulletin->GPC['thread'])) {
        require_once DIR . '/includes/functions_databuild.php';
        if ($vbulletin->GPC['type'] == 'prune') {
            echo '<p>' . $vbphrase['deleting_threads'];
            foreach ($vbulletin->GPC['thread'] as $threadid => $confirm) {
                $threadinfo = fetch_threadinfo($threadid);
                if (empty($forumids["{$threadinfo['forumid']}"])) {
                    // make sure we have access to prune / move this thread, if not then skip it
                    continue;
                }
                $threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_SILENT, 'threadpost');
                $threadman->set_existing($threadinfo);
                $threadman->delete(0);
                unset($threadman);
                echo ". \n";
                vbflush();
            }
            echo $vbphrase['done'] . '</p>';
            define('CP_REDIRECT', 'index.php?do=home');
            print_stop_message('pruned_threads_successfully_modcp');
        } else {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:thread.php


示例11: fetch_thread

function fetch_thread($threadid)
{
    global $vbulletin;
    $threadinfo = fetch_threadinfo($threadid);
    if (!$threadinfo) {
        return false;
    }
    return array('id' => intval($threadinfo['threadid']), 'forumid' => intval($threadinfo['forumid']), 'title' => str($threadinfo['title']), 'replycount' => intval($threadinfo['replycount']), 'open' => $threadinfo['open'] == 1);
}
开发者ID:reima,项目名称:restful-vb,代码行数:9,代码来源:functions.php


示例12: undelete_post

function undelete_post($postid, $countposts, $postinfo = NULL, $threadinfo = NULL, $counterupdate = true)
{
	global $vbulletin, $vbphrase;

	// Valid postinfo array will contain: postid, threadid, visible, userid, username, title
	// Invalid post or post is not deleted
	if (!$postinfo AND !$postinfo = fetch_postinfo($postid))
	{
		return;
	}

	// Valid threadinfo array will contain: threadid, forumid, visible, firstpostid
	if (!$threadinfo AND !$threadinfo = fetch_threadinfo($postinfo['threadid']))
	{
		return;
	}

	if ($threadinfo['firstpostid'] == $postid)
	{
		// undelete thread
		undelete_thread($threadinfo['threadid'], $countposts, $threadinfo);
		return;
	}

	// Post is not deleted
	if ($postinfo['visible'] != 2)
	{
		return;
	}

	// Only increment post for a visible thread in a counting forum
	if ($countposts AND $postinfo['userid'] AND $threadinfo['visible'] == 1)
	{
		$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT);
		$userdata->set_existing($postinfo);
		$userdata->set('posts', 'posts + 1', false);
		$userdata->set_ladder_usertitle_relative(1);
		$userdata->save();
		unset($userdata);
	}

	$deletiondata =& datamanager_init('Deletionlog_ThreadPost', $vbulletin, ERRTYPE_SILENT, 'deletionlog');
	$deletioninfo = array('type' => 'post', 'primaryid' => $postid);
	$deletiondata->set_existing($deletioninfo);
	$deletiondata->delete();
	unset($deletiondata, $deletioninfo);

	$postman =& datamanager_init('Post', $vbulletin, ERRTYPE_SILENT, 'threadpost');
	$postman->set_existing($postinfo);
	$postman->set('visible', 1);
	$postman->save();

	if ($counterupdate)
	{
		build_thread_counters($postinfo['threadid']);
		build_forum_counters($threadinfo['forumid']);
	}

	fetch_phrase_group('threadmanage');
	$postinfo['forumid'] = $threadinfo['forumid'];

	require_once(DIR . '/includes/functions_log_error.php');
	log_moderator_action($postinfo, 'post_y_by_x_undeleted', array($postinfo['title'], $postinfo['username']));
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:64,代码来源:functions_databuild.php


示例13: verify_ui_permissions

 public function verify_ui_permissions()
 {
     global $vbulletin;
     if (!$vbulletin->options['threadtagging']) {
         print_no_permission();
     }
     global $vbphrase;
     $threadinfo = $this->fetch_content_info();
     // *********************************************************************************
     // check for visible / deleted thread
     if (!$threadinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts') or $threadinfo['isdeleted'] and !can_moderate($threadinfo['forumid'])) {
         eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $this->registry->options['contactuslink'])));
     }
     // *********************************************************************************
     // jump page if thread is actually a redirect
     if ($threadinfo['open'] == 10) {
         $destthreadinfo = fetch_threadinfo($threadinfo['pollid']);
         exec_header_redirect('thread|js', $destthreadinfo);
     }
     // *********************************************************************************
     // Tachy goes to coventry
     if (in_coventry($threadinfo['postuserid']) and !can_moderate($threadinfo['forumid'])) {
         eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $this->registry->options['contactuslink'])));
     }
     // *********************************************************************************
     // get forum info
     $foruminfo = fetch_foruminfo($threadinfo['forumid']);
     // *********************************************************************************
     // check forum permissions
     $forumperms = fetch_permissions($threadinfo['forumid']);
     if (!($forumperms & $this->registry->bf_ugp_forumpermissions['canview']) or !($forumperms & $this->registry->bf_ugp_forumpermissions['canviewthreads'])) {
         print_no_permission();
     }
     if (!($forumperms & $this->registry->bf_ugp_forumpermissions['canviewothers']) and ($threadinfo['postuserid'] != $this->registry->userinfo['userid'] or $this->registry->userinfo['userid'] == 0)) {
         print_no_permission();
     }
     // *********************************************************************************
     // check if there is a forum password and if so, ensure the user has it set
     verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
     //		return $show;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:thread.php


示例14: _is_forum_closed

 /**
  *  Check forum status
  *
  * @return bool
  */
 private function _is_forum_closed()
 {
     $threadinfo = fetch_threadinfo($this->item['threadid']);
     $ignored_forums = explode(',', $this->registry->options['vbv_ignored_forums']);
     if ($this->registry->options['vbv_ignore_forum_childs']) {
         $foruminfo = fetch_foruminfo($threadinfo['forumid']);
         foreach ($ignored_forums as $ignored_forum_id) {
             if (in_array(intval($ignored_forum_id), explode(',', $foruminfo['parentlist']))) {
                 return true;
             }
         }
     } else {
         if (in_array($threadinfo['forumid'], $ignored_forums)) {
             return true;
         }
     }
     return false;
 }
开发者ID:rcdesign-cemetery,项目名称:vb-votes,代码行数:23,代码来源:class_votes.php


示例15: SubscribeThread

function SubscribeThread($who, $threadid)
{
    global $db, $vbulletin, $server, $structtypes, $lastpostarray;
    $result = RegisterService($who);
    if ($result['Code'] != 0) {
        $retval['Result'] = $result;
        return $retval;
    }
    $threadinfo = fetch_threadinfo($threadid);
    $foruminfo = fetch_foruminfo($threadinfo['forumid'], false);
    if (!$foruminfo['forumid']) {
        return ErrorResult("invalid_forumid_subscribe_thread");
    }
    $forumperms = fetch_permissions($foruminfo['forumid']);
    if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview'])) {
        return ErrorResult("no_forum_permission_subscribe_thread");
    }
    if (!$foruminfo['allowposting'] or $foruminfo['link'] or !$foruminfo['cancontainthreads']) {
        return ErrorResult("forum_closed_subscribe_thread");
    }
    if (!verify_forum_password($foruminfo['forumid'], $foruminfo['password'], false)) {
        return ErrorResult("invalid_forum_password_subscribe_thread");
    }
    if ($threadinfo['threadid'] > 0) {
        if (!$threadinfo['visible'] and !can_moderate($threadinfo['forumid'], 'canmoderateposts') or $threadinfo['isdeleted'] and !can_moderate($threadinfo['forumid'], 'candeleteposts')) {
            return ErrorResult('cannot_view_thread_subscribe_thread');
        }
        if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) or ($vbulletin->userinfo['userid'] != $threadinfo['postuserid'] or !$vbulletin->userinfo['userid']) and !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'])) {
            return ErrorResult("no_thread_permission_subscribe_thread");
        }
        $emailupdate = 1;
        // Instant notification by email
        $folderid = 0;
        // Delfault folder
        /*insert query*/
        $db->query_write("\r\n            REPLACE INTO " . TABLE_PREFIX . "subscribethread (userid, threadid, emailupdate, folderid, canview)\r\n            VALUES (" . $vbulletin->userinfo['userid'] . ", {$threadinfo['threadid']}, {$emailupdate}, {$folderid}, 1)\r\n        ");
        // TODO: remove this HACK!
        $threadinfo['threadtitle'] = $threadinfo['title'];
        $retval['Thread'] = ConsumeArray($threadinfo, $structtypes['Thread']);
    } else {
        return ErrorResult("invalid_threadid_subscribe_thread");
    }
    $result['RemoteUser'] = ConsumeArray($vbulletin->userinfo, $structtypes['RemoteUser']);
    $retval['Result'] = $result;
    return $retval;
}
开发者ID:TheProjecter,项目名称:vbulletinbot,代码行数:46,代码来源:vbulletinbot.php


示例16: verify_id

    if ($vbulletin->GPC['pollid']) {
        $pollinfo = verify_id('poll', $vbulletin->GPC['pollid'], 0, 1);
        $pollid =& $pollinfo['pollid'];
    }
} else {
    if ($vbulletin->GPC['forumid']) {
        $foruminfo = verify_id('forum', $vbulletin->GPC['forumid'], 0, 1);
        $forumid =& $foruminfo['forumid'];
        if (($foruminfo['styleoverride'] == 1 or $vbulletin->userinfo['styleid'] == 0) and !defined('BYPASS_STYLE_OVERRIDE')) {
            $codestyleid =& $foruminfo['styleid'];
        }
    } else {
        if ($vbulletin->GPC['pollid'] and THIS_SCRIPT == 'poll') {
            $pollinfo = verify_id('poll', $vbulletin->GPC['pollid'], 0, 1);
            $pollid =& $pollinfo['pollid'];
            $threadinfo = fetch_threadinfo($pollinfo['threadid']);
            $threadid =& $threadinfo['threadid'];
            $foruminfo = fetch_foruminfo($threadinfo['forumid']);
            $forumid =& $foruminfo['forumid'];
            if (($foruminfo['styleoverride'] == 1 or $vbulletin->userinfo['styleid'] == 0) and !defined('BYPASS_STYLE_OVERRIDE')) {
                $codestyleid = $foruminfo['styleid'];
            }
        }
    }
}
// #############################################################################
// ######################## START TEMPLATES & STYLES ###########################
// #############################################################################
$userselect = false;
// is style in the forum/thread set?
if ($codestyleid) {
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:global.php


示例17: array_map

    case 'checkVietSubManga':
        $filter = 'mangatitle';
        $rawKeywords = array_map('trim', explode(',', getPost('mangaNames')));
        $mangaObject = new Manga();
        $existedMangas = array();
        $keywords = array();
        foreach ($rawKeywords as $rawKeyword) {
            if ($rawKeyword && !in_array($rawKeyword, $keywords)) {
                $keywords[] = $rawKeyword;
            }
        }
        if ($keywords) {
            foreach ($keywords as $key => $keyword) {
                $result = $mangaObject->setFilter($filter)->setKeyword($keyword)->getCollection();
                if ($result) {
                    $existedMangas = array_merge($result, $existedMangas);
                }
            }
        }
        if ($existedMangas) {
            $existedList = array();
            foreach ($existedMangas as $existedManga) {
                $threadId = $existedManga->getThreadId();
                $existedList[] = construct_phrase($vbphrase['yrms_ajax_dupplicatewarning_element'], fetch_seo_url('thread', fetch_threadinfo($threadId)), $existedManga->getMangaTitle());
            }
            $existedList = implode('', $existedList);
            $warning = construct_phrase($vbphrase['yrms_ajax_dupplicatewarning'], $vbphrase['yrms_manga'], $existedList);
            echo $warning;
        }
        break;
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:AJAX.php


示例18: getPost

$pageTitle = $vbphrase['yrms_edit'];
$messagetype = "info";
$message = $vbphrase['yrms_inputtip'];
$inputData = $manga->getData();
//unset($inputData['vbphrase']);
//unset($inputData['db']);
//unset($inputData['vbulletin']);
//print_pre($inputData);
if (isPost()) {
    $inputData = getPost();
    $error = findInputError($inputData);
    if (!$error) {
        $manga->setData($inputData);
        if ($inputData['posturl']) {
            $threadId = extract_threadid_from_url($inputData['posturl']);
            $threadInfo = fetch_threadinfo($threadId);
            if ($threadInfo['forumid'] == $manga->getForumId()) {
                $manga->setThreadId($threadInfo['threadid'])->setPostId($threadInfo['firstpostid'])->setPosterId($threadInfo['postuserid']);
            } elseif ($threadInfo['forumid'] == $manga->getOnlineForumId()) {
                $manga->setPosterId($threadInfo['postuserid']);
            }
        }
        $manga->save();
        $messagetype = "success";
        $message = construct_phrase($vbphrase['yrms_msg_success_general'], $vbphrase['yrms_edit'], $vbphrase['yrms_manga'], $manga->getMangaTitle());
        $contenttemplatename = 'yrms_message';
    } else {
        $messagetype = "error";
        $message = nl2br(construct_phrase($vbphrase['yrms_msg_error_head'], $vbphrase['yrms_mangaadd']) . "\n" . $error);
    }
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:vietsubmanga_mangaedit.php


示例19: verify_id

 }
 if (!$mergethreadid) {
     if (preg_match('#[\\?&](postid|p)=([0-9]+)#', $vbulletin->GPC['mergethreadurl'], $matches)) {
         $mergepostid = verify_id('post', $matches[2], 0);
         if ($mergepostid == 0) {
             // do invalid url
             eval(standard_error(fetch_error('mergebadurl')));
         }
         $postinfo = fetch_postinfo($mergepostid);
         $mergethreadid = $postinfo['threadid'];
     } else {
         eval(standard_error(fetch_error('mergebadurl')));
     }
 }
 $mergethreadid = verify_id('thread', $mergethreadid);
 $mergethreadinfo = fetch_threadinfo($mergethreadid);
 $mergeforuminfo = fetch_foruminfo($mergethreadinfo['forumid']);
 if ($mergethreadinfo['open'] == 10 or $mergethreadid == $threadid) {
     if (can_moderate($mergethreadinfo['forumid'])) {
         eval(standard_error(fetch_error('mergebadurl')));
     } else {
         eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
     }
 }
 if ($mergethreadinfo['isdeleted'] and !can_moderate($mergethreadinfo['forumid'], 'candeleteposts') or !$mergethreadinfo['visible'] and !can_moderate($mergethreadinfo['forumid'], 'canmoderateposts')) {
     if (can_moderate($mergethreadinfo['forumid'])) {
         print_no_permission();
     } else {
         eval(standard_error(fetch_error('invalidid', $idname, $vbulletin->options['contactuslink'])));
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:postings.php


示例20: do_get_thread


//.........这里部分代码省略.........
                }
            }
        }
    }
    // *********************************************************************************
    // make the forum jump in order to fill the forum caches
    $navpopup = array('id' => 'showthread_navpopup', 'title' => $foruminfo['title_clean'], 'link' => fetch_seo_url('thread', $threadinfo));
    construct_quick_nav($navpopup);
    // *********************************************************************************
    // get forum info
    $forum = fetch_foruminfo($thread['forumid']);
    $foruminfo =& $forum;
    // *********************************************************************************
    // check forum permissions
    $forumperms = fetch_permissions($thread['forumid']);
    if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
        json_error(ERR_NO_PERMISSION);
    }
    if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) and ($thread['postuserid'] != $vbulletin->userinfo['userid'] or $vbulletin->userinfo['userid'] == 0)) {
        json_error(ERR_NO_PERMISSION);
    }
    // *********************************************************************************
    // check if there is a forum password and if so, ensure the user has it set
    if (!verify_forum_password($foruminfo['forumid'], $foruminfo['password'])) {
        // FRNR
        json_error(ERR_NEED_PASSWORD, RV_NEED_FORUM_PASSWORD);
    }
    // verify that we are at the canonical SEO url
    // and redirect to this if not
    //verify_seo_url('thread|js', $threadinfo, array('pagenumber' => $_REQUEST['pagenumber']));
    // *********************************************************************************
    // jump page if thread is actually a redirect
    if ($thread['open'] == 10) {
        $destthreadinfo = fetch_threadinfo($threadinfo['pollid']);
        exec_header_redirect(fetch_seo_url('thread|js', $destthreadinfo, $pageinfo));
    }
    // *********************************************************************************
    // get ignored users
    $ignore = array();
    if (trim($vbulletin->userinfo['ignorelist'])) {
        $ignorelist = preg_split('/( )+/', trim($vbulletin->userinfo['ignorelist']), -1, PREG_SPLIT_NO_EMPTY);
        foreach ($ignorelist as $ignoreuserid) {
            $ignore["{$ignoreuserid}"] = 1;
        }
    }
    DEVDEBUG('ignored users: ' . implode(', ', array_keys($ignore)));
    // *********************************************************************************
    // filter out deletion notices if can't be seen
    if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canseed 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fetch_trimmed_title函数代码示例发布时间:2022-05-15
下一篇:
PHP fetch_textarea_width函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap