当前位置: 首页>>代码示例>>PHP>>正文


PHP fetch_seo_url函数代码示例

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


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

示例1: construct_postings_nav

function construct_postings_nav($foruminfo, $threadinfo)
{
    global $vbulletin, $vbphrase;
    $navbits = array();
    $navbits[fetch_seo_url('forumhome', array())] = $vbphrase['forum'];
    $parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
    foreach ($parentlist as $forumID) {
        $forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
        $navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
    }
    $navbits[fetch_seo_url('thread', $threadinfo)] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
    switch ($_REQUEST['do']) {
        case 'movethread':
            $navbits[''] = $vbphrase['move_thread'];
            break;
        case 'copythread':
            $navbits[''] = $vbphrase['copy_thread'];
            break;
        case 'editthread':
            $navbits[''] = $vbphrase['edit_thread'];
            break;
        case 'deletethread':
            $navbits[''] = $vbphrase['delete_thread'];
            break;
        case 'mergethread':
            $navbits[''] = $vbphrase['merge_threads'];
            break;
    }
    return construct_navbits($navbits);
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:30,代码来源:postings.php

示例2: construct_poll_nav

function construct_poll_nav($foruminfo, $threadinfo)
{
    global $vbulletin, $vbphrase;
    $navbits = array();
    $navbits[fetch_seo_url('forumhome', array())] = $vbphrase['forum'];
    $parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
    foreach ($parentlist as $forumID) {
        $forumTitle = $vbulletin->forumcache["{$forumID}"]['title'];
        $navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
    }
    $navbits[fetch_seo_url('thread', $threadinfo)] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
    switch ($_REQUEST['do']) {
        case 'newpoll':
            $navbits[''] = $vbphrase['post_a_poll'];
            break;
        case 'polledit':
            $navbits[''] = $vbphrase['edit_poll'];
            break;
        case 'showresults':
            $navbits[''] = $vbphrase['view_poll_results'];
            break;
            // are there more?
    }
    return construct_navbits($navbits);
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:25,代码来源:poll.php

示例3: 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();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:comment.php

示例4: get_fbcanonicalurl

/**
* Returns the canonical url pertinent to the content of the page
* 	- for open graph and like button
*
* @return	string, canonical url for the content
*/
function get_fbcanonicalurl()
{
    global $vbulletin, $og_array;
    static $fbcanonicalurl;
    $retval = '';
    $skipcache = false;
    if (empty($fbcanonicalurl)) {
        if (THIS_SCRIPT == 'showthread') {
            global $threadinfo;
            $fbcanonicalurl = create_full_url(fetch_seo_url('thread|js|nosession', $threadinfo, null, null, null, true));
        } else {
            if (THIS_SCRIPT == 'entry') {
                global $bloginfo;
                $fbcanonicalurl = create_full_url(fetch_seo_url('entry|js|nosession', $bloginfo, null, null, null, true));
            } else {
                if (THIS_SCRIPT == 'vbcms' and isset($vbulletin->vbcms['content_type']) and $vbulletin->vbcms['content_type'] == 'Article') {
                    $fbcanonicalurl = isset($vbulletin->vbcms['page_url']) ? $vbulletin->vbcms['page_url'] : $og_array['og:url'];
                } else {
                    // do not cache canonical url in this case
                    $skipcache = true;
                    $retval = $vbulletin->options['bburl'];
                }
            }
        }
    }
    ($hook = vBulletinHook::fetch_hook('fb_canonical_url')) ? eval($hook) : false;
    if ($skipcache) {
        return $retval;
    } else {
        return $fbcanonicalurl;
    }
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:38,代码来源:functions_facebook.php

示例5: _run_query

function _run_query($query)
{
    for ($i = 0; $i < vBSphinxSearch_Core::RECONNECT_LIMIT; $i++) {
        $con = vBSphinxSearch_Core::get_sphinxql_conection();
        if (false != $con) {
            $result_res = mysql_query($query, $con);
            if ($result_res) {
                $table_str = '<table id="results" name="results" border="1">';
                while ($docinfo = mysql_fetch_assoc($result_res)) {
                    // не эстетично, но быстро
                    $link = '';
                    if (isset($docinfo['primaryid'])) {
                        $thread['threadid'] = $docinfo['groupid'];
                        $thread['postidid'] = $docinfo['primaryid'];
                        $link = '<a href="' . fetch_seo_url('thread', $thread) . '#post' . $thread['postidid'] . '">' . $thread['postidid'] . '<a>';
                        $docinfo = array_merge(array('link' => $link), $docinfo);
                    }
                    $head = '<tr><td>' . implode('</td><td>', array_keys($docinfo)) . '</td></tr>';
                    $entry .= '<tr><td>' . implode('</td><td>', $docinfo) . '</td></tr>';
                }
                $table_str .= $head . $entry . '</table>';
                echo $table_str;
                return true;
            }
            echo 'Нет результатов<br />';
        }
    }
    echo 'Ошибка: <br />' . mysql_error() . '<br />';
    return false;
}
开发者ID:rcdesign,项目名称:vb-sphinx_search,代码行数:30,代码来源:sphinx_check.php

示例6: 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();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:visitormessage.php

示例7: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $groupinfo =& $this->content['socialgroup'][$activity['contentid']];
     $userinfo =& $this->content['user'][$activity['userid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     if ($fetchphrase) {
         return array('phrase' => construct_phrase($this->vbphrase['x_created_a_group_y'], fetch_seo_url('member', $userinfo), $userinfo['username'], vB::$vbulletin->session->vars['sessionurl'], $groupinfo['groupid'], $groupinfo['name']), 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('groupinfo', $groupinfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:16,代码来源:group.php

示例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();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:entry.php

示例9: exec_postvar_call_back

function exec_postvar_call_back()
{
    global $vbulletin;
    $vbulletin->input->clean_array_gpc('r', array('forumid' => TYPE_STR));
    $goto = '';
    $url = '';
    // jump from forumjump
    switch ($vbulletin->GPC['forumid']) {
        case 'search':
            $goto = 'search';
            break;
        case 'pm':
            $goto = 'private';
            break;
        case 'wol':
            $goto = 'online';
            break;
        case 'cp':
            $goto = 'usercp';
            break;
        case 'subs':
            $goto = 'subscription';
            break;
        case 'home':
        case '-1':
            $url = fetch_seo_url('forumhome|js', array());
            break;
    }
    // intval() forumid since having text in it is not expected anywhere else and it can't be "cleaned" a second time
    $vbulletin->GPC['forumid'] = intval($vbulletin->GPC['forumid']);
    if ($goto != '') {
        $url = "{$goto}.php?";
        if (!empty($vbulletin->session->vars['sessionurl_js'])) {
            $url .= $vbulletin->session->vars['sessionurl_js'];
        }
    }
    if ($url != '') {
        exec_header_redirect($url);
    }
    // end forumjump redirects
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:forumdisplay.php

示例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();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:post.php

示例11: verify_name

 /**
  * Verify that the name doesn't already exists
  *
  * @param	string	Group Name
  *
  * @return	boolean
  */
 function verify_name(&$name)
 {
     // replace html-encoded spaces with actual spaces
     $name = preg_replace('/&#(0*32|x0*20);/', ' ', $name);
     $name = trim($name);
     if (!$this->condition or $name != $this->existing['name']) {
         $dupegroup = $this->registry->db->query_first("\n\t\t\t\tSELECT *\n\t\t\t\tFROM " . TABLE_PREFIX . "socialgroup\n\t\t\t\tWHERE name = '" . $this->registry->db->escape_string($name) . "'\n\t\t\t\t\tAND groupid <> " . intval($this->fetch_field('groupid')));
         if ($dupegroup) {
             $this->error('group_already_exists_view_x', fetch_seo_url('group', $dupegroup));
             return false;
         }
     }
     if (empty($name)) {
         $this->error('must_enter_group_name');
         return false;
     }
     if (vbstrlen($name, true) > $this->registry->options['sg_name_maxchars']) {
         $this->error('name_too_long_max_x', $this->registry->options['sg_name_maxchars']);
         return false;
     }
     return true;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:29,代码来源:class_dm_socialgroup.php

示例12: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $attachmentinfo =& $this->content['socialgroup_attachment'][$activity['contentid']];
     $groupinfo =& $this->content['socialgroup'][$attachmentinfo['groupid']];
     $userinfo =& $this->content['user'][$activity['userid']];
     if (!$skipgroup) {
         if (!$this->content['group_photo_only'][$attachmentinfo['attachmentid']]) {
             return '';
         }
         foreach ($this->content['socialgroup_attachment_matrix'][$attachmentinfo['groupid']] as $attachmentid) {
             $attachment = $this->content['socialgroup_attachment'][$attachmentid];
             if ($this->content['group_photo_only'][$attachmentid] and $activity['userid'] == $attachment['userid']) {
                 $attach[] = $attachment;
                 unset($this->content['group_photo_only'][$attachmentid]);
             }
         }
         $attach = array_reverse($attach);
         $photocount = count($attach);
     } else {
         $attach = array($attachmentinfo);
         $photocount = count($attach);
     }
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     if ($fetchphrase) {
         return array('phrase' => construct_phrase($this->vbphrase['x_added_y_photos_to_group_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], $photocount, vB::$vbulletin->session->vars['sessionurl'], $groupinfo['groupid'], $groupinfo['name']), 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('attachmentinfo', $attachmentinfo);
         $templater->register('attach', $attach);
         $templater->register('groupinfo', $groupinfo);
         $templater->register('photocount', $photocount);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:37,代码来源:photo.php

示例13: can_moderate

// admin tools

$show['post_queue'] = can_moderate($foruminfo['forumid'], 'canmoderateposts');
$show['attachment_queue'] = can_moderate($foruminfo['forumid'], 'canmoderateattachments');
$show['mass_move'] = can_moderate($foruminfo['forumid'], 'canmassmove');
$show['mass_prune'] = can_moderate($foruminfo['forumid'], 'canmassprune');

$show['post_new_announcement'] = can_moderate($foruminfo['forumid'], 'canannounce');
$show['addmoderator'] = ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']);

$show['adminoptions'] = ($show['post_queue'] OR $show['attachment_queue'] OR $show['mass_move'] OR $show['mass_prune'] OR $show['addmoderator'] OR $show['post_new_announcement']);

$navpopup = array(
	'id'    => 'forumdisplay_navpopup',
	'title' => $foruminfo['title_clean'],
	'link'  => fetch_seo_url('forum', $foruminfo)
);
construct_quick_nav($navpopup);


/////////////////////////////////
if ($foruminfo['cancontainthreads'])
{
	/////////////////////////////////
	if ($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'])
	{
		$foruminfo['forumread'] = $vbulletin->forumcache["$foruminfo[forumid]"]['forumread'];
		$lastread = max($foruminfo['forumread'], TIMENOW - ($vbulletin->options['markinglimit'] * 86400));
	}
	else
	{
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:forumdisplay.php

示例14: do_get_thread

function do_get_thread()
{
    global $vbulletin, $db, $foruminfo, $threadinfo, $postid, $vault, $vbphrase;
    $vbulletin->input->clean_array_gpc('r', array('pagenumber' => TYPE_UINT, 'perpage' => TYPE_UINT, 'password' => TYPE_STR, 'signature' => TYPE_BOOL));
    if (empty($threadinfo['threadid'])) {
        json_error(ERR_INVALID_THREAD);
    }
    $threadedmode = 0;
    $threadid = $vbulletin->GPC['threadid'];
    // Goto first unread post?
    if ($vbulletin->GPC['pagenumber'] == FR_LAST_POST) {
        $threadinfo = verify_id('thread', $threadid, 1, 1);
        if ($vbulletin->options['threadmarking'] and $vbulletin->userinfo['userid']) {
            $vbulletin->userinfo['lastvisit'] = max($threadinfo['threadread'], $threadinfo['forumread'], TIMENOW - $vbulletin->options['markinglimit'] * 86400);
        } else {
            if (($tview = intval(fetch_bbarray_cookie('thread_lastview', $threadid))) > $vbulletin->userinfo['lastvisit']) {
                $vbulletin->userinfo['lastvisit'] = $tview;
            }
        }
        $coventry = fetch_coventry('string');
        $posts = $db->query_first("\n\t    SELECT MIN(postid) AS postid\n\t    FROM " . TABLE_PREFIX . "post\n\t    WHERE threadid = {$threadinfo['threadid']}\n\t    AND visible = 1\n\t    AND dateline > " . intval($vbulletin->userinfo['lastvisit']) . "\n\t    " . ($coventry ? "AND userid NOT IN ({$coventry})" : "") . "\n\t    LIMIT 1\n\t");
        if ($posts['postid']) {
            $postid = $posts['postid'];
        } else {
            $postid = $threadinfo['lastpostid'];
        }
    }
    // *********************************************************************************
    // workaround for header redirect issue from forms with enctype in IE
    // (use a scrollIntoView javascript call in the <body> onload event)
    $onload = '';
    // *********************************************************************************
    // set $perpage
    $perpage = max(FR_MIN_PERPAGE, min($vbulletin->GPC['perpage'], FR_MAX_PERPAGE));
    // FRNR
    //$perpage = sanitize_maxposts($vbulletin->GPC['perpage']);
    // *********************************************************************************
    // set post order
    if ($vbulletin->userinfo['postorder'] == 0) {
        $postorder = '';
    } else {
        $postorder = 'DESC';
    }
    // *********************************************************************************
    // get thread info
    $thread = verify_id('thread', $threadid, 1, 1);
    $threadinfo =& $thread;
    ($hook = vBulletinHook::fetch_hook('showthread_getinfo')) ? eval($hook) : false;
    // *********************************************************************************
    // check for visible / deleted thread
    if (!$thread['visible'] and !can_moderate($thread['forumid'], 'canmoderateposts') or $thread['isdeleted'] and !can_moderate($thread['forumid'])) {
        json_error(ERR_INVALID_THREAD);
    }
    // *********************************************************************************
    // Tachy goes to coventry
    if (in_coventry($thread['postuserid']) and !can_moderate($thread['forumid'])) {
        json_error(ERR_INVALID_THREAD);
    }
    // FRNR Start
    // Check the forum password (set necessary cookies)
    if ($vbulletin->GPC['password'] && $foruminfo['password'] == $vbulletin->GPC['password']) {
        // set a temp cookie for guests
        if (!$vbulletin->userinfo['userid']) {
            set_bbarray_cookie('forumpwd', $foruminfo['forumid'], md5($vbulletin->userinfo['userid'] . $vbulletin->GPC['password']));
        } else {
            set_bbarray_cookie('forumpwd', $foruminfo['forumid'], md5($vbulletin->userinfo['userid'] . $vbulletin->GPC['password']), 1);
        }
    }
    // FRNR End
    // *********************************************************************************
    // do word wrapping for the thread title
    if ($vbulletin->options['wordwrap'] != 0) {
        $thread['title'] = fetch_word_wrapped_string($thread['title']);
    }
    $thread['title'] = fetch_censored_text($thread['title']);
    $thread['meta_description'] = strip_bbcode(strip_quotes($thread['description']), false, true);
    $thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['meta_description'], 500, false)));
    // *********************************************************************************
    // words to highlight from the search engine
    if (!empty($vbulletin->GPC['highlight'])) {
        $highlight = preg_replace('#\\*+#s', '*', $vbulletin->GPC['highlight']);
        if ($highlight != '*') {
            $regexfind = array('\\*', '\\<', '\\>');
            $regexreplace = array('[\\w.:@*/?=]*?', '<', '>');
            $highlight = preg_quote(strtolower($highlight), '#');
            $highlight = explode(' ', $highlight);
            $highlight = str_replace($regexfind, $regexreplace, $highlight);
            foreach ($highlight as $val) {
                if ($val = trim($val)) {
                    $replacewords[] = htmlspecialchars_uni($val);
                }
            }
        }
    }
    // *********************************************************************************
    // 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
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:get_thread.php

示例15: fetch_userinfo

 $username = $userdata->fetch_field('username');
 $email = $userdata->fetch_field('email');
 $userinfo = fetch_userinfo($userid);
 $userdata_rank =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT);
 $userdata_rank->set_existing($userinfo);
 $userdata_rank->set('posts', 0);
 $userdata_rank->save();
 // force a new session to prevent potential issues with guests from the same IP, see bug #2459
 require_once DIR . '/includes/functions_login.php';
 $vbulletin->session->created = false;
 process_new_login('', false, '');
 // send new user email
 if ($vbulletin->options['newuseremail'] != '') {
     $referrer = 'Facebook Connect';
     $ipaddress = IPADDRESS;
     $memberlink = fetch_seo_url('member|nosession', array('userid' => $userid, 'username' => htmlspecialchars_uni($vbulletin->GPC['username'])));
     eval(fetch_email_phrases('newuser', 0));
     $newemails = explode(' ', $vbulletin->options['newuseremail']);
     foreach ($newemails as $toemail) {
         if (trim($toemail)) {
             vbmail($toemail, $subject, $message);
         }
     }
 }
 if ($newusergroupid == 2 and $vbulletin->options['welcomemail']) {
     eval(fetch_email_phrases('welcomemail'));
     vbmail($email, $subject, $message);
 }
 ($hook = vBulletinHook::fetch_hook('register_addmember_complete')) ? eval($hook) : false;
 // now redirect the user to the home page
 $vbulletin->url = str_replace('"', '', $vbulletin->url);
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:register.php


注:本文中的fetch_seo_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。