Here is the file that I open after saving it (it did not fit in the last post)
PHP Code:
<?php
/************************************************************************************
* vBSEO 3.1.0 for vBulletin v3.x.x by Crawlability, Inc. *
*-----------------------------------------------------------------------------------*
* Copyright ? 2005-2007, Crawlability, Inc. All rights reserved. *
* You may not redistribute this file or its derivatives without written permission. *
* *
* Sales Email: sales@crawlability.com *
* *
*----------------------------vBSEO IS NOT FREE SOFTWARE-----------------------------*
* http://www.crawlability.com/vbseo/license/ *
************************************************************************************/
error_reporting(0);
$vbseo_url_ = $_GET['vbseourl'];
if (ini_get("magic_quotes_gpc"))
{
$vbseo_url_ = stripslashes($vbseo_url_);
}
$vbseo_url_suggest = '';
switch ($vbseo_url_)
{
case 'vbseo.php':
exit;
break;
case 'vbseocp.php':
case 'cron.php':
case 'cron.html':
include $vbseo_url_;
exit;
break;
}
include_once('includes/functions_vbseo.php');
include_once('includes/config.' . VBSEO_VB_EXT);
$vbseo_fullurl = VBSEO_TOPREL . $vbseo_url_;
if (VBSEO_IN_PINGBACK && ($vbseo_url_ == 'vbseo-xmlrpc/'))
{
if (!defined('THIS_SCRIPT'))
@define('THIS_SCRIPT', 'newreply');
include dirname(__FILE__) . '/global.' . VBSEO_VB_EXT;
vbseo_extra_inc('linkback');
vbseo_xmlrpc_proc();
exit;
}
if (VBSEO_REDIRECT_PRIV_EXTERNAL && ($vbseo_url_ == VBSEO_REDIRECT_URI))
{
$uredir = urldecode($_GET['redirect']);
$uredir = preg_replace('#&(?![a-z0-9\#]+;)#si', '&', $uredir);
if (preg_match('#^https?:\/\/#', $uredir) && !preg_match('#["<>]#', $uredir))
{
echo '<html><head><meta http-equiv="refresh" content="0;url=' . $uredir . '"></head><body></body></html>';
exit;
}
}
if (!VBSEO_ENABLED && preg_match('#^(.*?\.php)/(.*)$#', $vbseo_url_, $vu_match) &&
file_exists($vu_match[1]))
$vbseo_url_ = $vu_match[1];
define('VBSEO_BASEURL', basename($vbseo_url_));
unset($_REQUEST['vbseourl']);
unset($_GET['vbseourl']);
unset($HTTP_SERVER_VARS['vbseourl']);
unset($HTTP_POST_VARS['vbseourl']);
unset($HTTP_GET_VARS['vbseourl']);
global $g_cache;
$g_cache = array('forum' => array(),
'thread' => array(),
'post' => array(),
'user' => array(),
'usernm' => array()
);
define('VBSEO_RELPATH', isset($_GET['vbseorelpath']));
if (VBSEO_RELPATH)
chdir($_GET['vbseorelpath']);
if (($vbseo_url_[0] == '/') || strstr($vbseo_url_, '../') || (isset($_GET['vbseorelpath']) && (($_GET['vbseorelpath'][0] == '/') || strstr($_GET['vbseorelpath'], './../')))
)
{
vbseo_404();
}
$vbseo_file_exists = (file_exists($vbseo_url_) || (file_exists(basename($vbseo_url_)) && strstr($vbseo_url_, '.' . VBSEO_VB_EXT))) && ($vbseo_url_[strlen($vbseo_url_)-1] != '/');
$vbseo_file_exists_deep = file_exists($vbseo_url_) && strstr($vbseo_url_, '/');
$vbseo_found = false;
define('VBSEO_PREPROC', 1);
$vbseo_proc = VBSEO_ENABLED;
if ($vbseo_proc)
{
preg_match('#^(.+?)(_(?:ltr|rtl)?)(\.gif)$#', $vbseo_url_, $ticom);
$vbseo_url_i = $ticom[1] . $ticom[3];
if (!$vbseo_url_i) $vbseo_url_i = $vbseo_url_;
if (VBSEO_REWRITE_TREE_ICON &&
($gifpos = strpos($vbseo_url_, '.gif')) &&
(substr($vbseo_url_, 0, strlen(VBSEO_ICON_PREFIX)) == VBSEO_ICON_PREFIX) &&
((vbseo_check_url('VBSEO_URL_THREAD_TREE_ICON', substr($vbseo_url_i, strlen(VBSEO_ICON_PREFIX), $gifpos + 4), true)) ||
(vbseo_check_url('VBSEO_URL_FORUM_TREE_ICON', substr($vbseo_url_i, strlen(VBSEO_ICON_PREFIX), $gifpos + 4), true))
)
)
{
if ($vbseo_file_exists)
$vbseo_f = $vbseo_url_;
else
$vbseo_f = str_replace('.gif', $ticom[2] . '.gif', VBSEO_TREE_ICON);
$ifile = @fopen($vbseo_f, 'r');
$image_content = @fread($ifile, filesize($vbseo_f));
@fclose($ifile);
Header ('Content-type: image/gif');
Header ('Content-Length: ' . strlen($image_content));
echo $image_content;
exit();
}
else
if (VBSEO_CHECK_WWWDOMAIN && !strstr($_SERVER['HTTP_HOST'], 'www.') && !strstr($_SERVER['HTTP_HOST'], 'localhost'))
{
vbseo_get_options();
if (strstr($vboptions['bburl'], 'www.'))
{
vbseo_safe_redirect($vboptions['bburl'] . '/' . $vbseo_requrl);
}
}
$vbseo_is_arc = (
preg_match('#^(' . preg_quote(VBSEO_ARCHIVE_ROOT, '#') . '(?:index\.' . VBSEO_VB_EXT . '[/\?]?)?)([^/]*)/?$#', '/' . $vbseo_requrl . '/', $arcm) || preg_match('#^(/archive/(?:index\.' . VBSEO_VB_EXT . '[/\?]?)?)(.*)#', '/' . $vbseo_requrl, $arcm));
$vbseo_move_tohp = ($hp_list = VBSEO_HOMEPAGE_ALIASES) &&
preg_match('#^(' . str_replace('\|', '|', preg_quote($hp_list, '#')) . ')$#', $vbseo_requrl);
if ($vbseo_move_tohp)
{
vbseo_get_options();
if (VBSEO_HOMEPAGE != $vbseo_requrl)
vbseo_safe_redirect(VBSEO_HOMEPAGE);
}
else
if ($vbseo_is_arc)
{
preg_match('#t-(\d+)(?:-p-(\d+))?#', $arcm[2], $tidm);
$thread_id = $tidm[1];
$page = $tidm[2] ? $tidm[2] : 1;
if ($thread_id && VBSEO_REDIRECT_ARCHIVE)
vbseo_get_options();
global $bbuserinfo;
if ($thread_id && VBSEO_REDIRECT_ARCHIVE && !$_COOKIE[$bbuserinfo['cprefix'] . 'pda'])
{
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
$threadids = array($thread_id);
vbseo_get_thread_info($threadids);
$vbseo_url_ = (VBSEO_REWRITE_THREADS ? vbseo_thread_url($thread_id, $page) : 'showthread.' . VBSEO_VB_EXT . '?' . VBSEO_THREADID_URI . '=' . $thread_id);
vbseo_safe_redirect($vbseo_url_);
}
else
if (preg_match('#\.css$#', $vbseo_requrl))
{
$vbseo_url_ = 'archive/' . $arcm[2];
$vbseo_file_exists = true;
}
else
if ($arcm[1] != VBSEO_ARCHIVE_ROOT || !strstr('/' . $vbseo_requrl, $arcm[1]))
{
vbseo_safe_redirect(VBSEO_ARCHIVE_ROOT . $arcm[2], array(), true);
}
else
{
$sm = (
(substr(PHP_OS, 0, 3) == 'WIN' AND stristr($_SERVER['SERVER_SOFTWARE'], 'apache') === false) OR (strpos(@php_sapi_name(), 'cgi') !== false AND @!get_cfg_var('cgi.fix_pathinfo')))
? '?' : '/';
chdir('archive/');
$vbseo_stop = VBSEO_TOPREL . 'archive/index.' . VBSEO_VB_EXT . $sm . $arcm[2];
vbseo_set_self($vbseo_stop);
if ($sm == '?')
$_SERVER['QUERY_STRING'] = $arcm[2];
define('VBSEO_BASE_URL', substr(VBSEO_ARCHIVE_ROOT, 0, strlen(VBSEO_ARCHIVE_ROOT)-1));
preg_match('#f-(\d+)#', $arcm[2], $tidm);
if ($tidm[1])
{
vbseo_get_options();
vbseo_get_forum_info();
if (isset($g_cache['forum']) && !isset($g_cache['forum'][$tidm[1]]))
{
if (VBSEO_404_HANDLE == 2)
{
$vbseo_incf = VBSEO_404_CUSTOM;
if ($vbseo_incf[0] != '/')
$vbseo_incf = dirname(__FILE__) . '/' . $vbseo_incf;
include($vbseo_incf);
exit;
}
else
vbseo_404_routine($vbseo_url_);
}
}
ob_start();
include (dirname(__FILE__) . '/archive/index.' . VBSEO_VB_EXT);
$output = ob_get_contents();
ob_clean();
$GLOBALS['vbseo_notop_url'] = true;
$output = make_crawlable($output);
echo $output;
exit();
}
}
if (VBSEO_IS_ROBOT)
{
$vbseo_non_clean = array('pp', 'highlight', 'order', 'sort', 'daysprune', 'referrerid');
foreach($vbseo_non_clean as $vbseo_nn)
if (isset($_GET[$vbseo_nn]))
vbseo_safe_redirect($vbseo_url_, $vbseo_non_clean);
}
$hlpar = 'highlight';
$vbseo_hlpar = 'vbseo_highlight';
if (VBSEO_SEARCH_REDIRECT && isset($_COOKIE) && isset($_GET[$hlpar]))
{
setcookie($vbseo_hlpar, $_GET[$hlpar]);
vbseo_safe_redirect($vbseo_url_, array($hlpar));
}
if (isset($_COOKIE[$vbseo_hlpar]))
{
setcookie('vbseo_highlight', '');
$_GET[$hlpar] = $_REQUEST[$hlpar] = $_COOKIE[$vbseo_hlpar];
}
if (VBSEO_THREAD_301_REDIRECT && !$_POST && $vbseo_file_exists)
{
$vbseo_noproc = true;
if (!VBSEO_RELPATH && !$vbseo_file_exists_deep)
{
$vbseo_noproc = false;
if (VBSEO_REWRITE_BLOGS && (VBSEO_BASEURL == 'blog.' . VBSEO_VB_EXT) && count($_GET) > 0)
{
if ($_GET['u'])
vbseo_get_user_info(array($_GET['u']));
$red_url_ = '';
if ($_GET[VBSEO_BLOG_CATID_URI] && $_GET['u'])
{
vbseo_get_blog_cats($_GET[VBSEO_BLOG_CATID_URI]);
$red_url_ = vbseo_blog_url($_GET['page'] ? VBSEO_URL_BLOG_CAT_PAGE : VBSEO_URL_BLOG_CAT, $_GET);
}
else
if ($_GET['u'] && !$_GET['page'] && !$_GET['do'])
{
$red_url_ = vbseo_blog_url(VBSEO_URL_BLOG_USER, $_GET);
}
else
if ($_GET['b'] && count($_GET) == 1)
{
vbseo_get_blog_info(array($_GET['b']));
$red_url_ = vbseo_blog_url(VBSEO_URL_BLOG_ENTRY, $_GET);
}
else
if ($_GET['do'] == 'comments' && !$_GET['type'])
$red_url_ = vbseo_blog_url($_GET['page'] ? VBSEO_URL_BLOG_CLIST_PAGE : VBSEO_URL_BLOG_CLIST, $_GET);
else
if ($_GET['do'] == 'list' && (!$_GET['blogtype'] || in_array($_GET['blogtype'], array('latest', 'recent'))))
{
if ($_GET['d'])
$red_url_ = vbseo_blog_url($_GET['page'] ? VBSEO_URL_BLOG_DAY_PAGE : VBSEO_URL_BLOG_DAY, $_GET);
else
if ($_GET['m'])
$red_url_ = vbseo_blog_url($_GET['page'] ? VBSEO_URL_BLOG_MONTH_PAGE : VBSEO_URL_BLOG_MONTH, $_GET);
else
$red_url_ = vbseo_blog_url($_GET['page'] ? VBSEO_URL_BLOG_LIST_PAGE : VBSEO_URL_BLOG_LIST, $_GET);
}
else
if ($_GET['do'] == 'bloglist')
$red_url_ = vbseo_blog_url($_GET['page'] ? VBSEO_URL_BLOG_BLIST_PAGE : VBSEO_URL_BLOG_BLIST, $_GET);
if ($red_url_)
vbseo_safe_redirect($red_url_, array(VBSEO_USERID_URI, VBSEO_BLOG_CATID_URI, 'b', 'do', 'page', 'blogtype', 'd', 'm', 'y'));
}
else
if (((VBSEO_REWRITE_THREADS && (VBSEO_BASEURL == 'showthread.' . VBSEO_VB_EXT)) ||
(VBSEO_REWRITE_PRINTTHREAD && ($print = 1) && (VBSEO_BASEURL == 'printthread.' . VBSEO_VB_EXT)))
)
{
$newurl = '';
if (isset($_GET['goto']))
{
if ($_GET['goto'] == 'nextnewest')
$vbseo_format = VBSEO_URL_THREAD_NEXT;
elseif ($_GET['goto'] == 'nextoldest')
$vbseo_format = VBSEO_URL_THREAD_PREV;
if ($vbseo_format)
{
define('THIS_SCRIPT', 'showthread');
vbseo_get_options();
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
$threadid = $_GET[VBSEO_THREADID_URI];
vbseo_get_thread_info($threadid);
$newurl = vbseo_thread_url($threadid, '', $vbseo_format);
}
}
else
if (!isset($_REQUEST['do']))
{
define('THIS_SCRIPT', 'showthread');
$threadid = $_GET[VBSEO_THREADID_URI] ? $_GET[VBSEO_THREADID_URI] : $_GET['threadid'];
$r_post_id = $_GET[VBSEO_POSTID_URI] ? $_GET[VBSEO_POSTID_URI] : $_GET['postid'];
$r_post_id = preg_replace('|#.*$|', '', $r_post_id);
$newurl = '';
if ($r_post_id)
{
define('VBSEO_PRIVATE_REDIRECT_POSTID', $r_post_id);
}
else
if ($threadid)
{
vbseo_get_options();
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
vbseo_get_thread_info($threadid);
$newurl = vbseo_thread_url($threadid,
(VBSEO_ENABLE_GARS && $_GET[VBSEO_PAGENUM_URI_GARS]) ? $_GET[VBSEO_PAGENUM_URI_GARS] : $_GET['page'],
(VBSEO_ENABLE_GARS && $_GET[VBSEO_PAGENUM_URI_GARS]) ? VBSEO_URL_THREAD_GARS_PAGENUM :
($print ? (($_GET['page'] + 0 > 1) ? VBSEO_URL_THREAD_PRINT_PAGENUM : VBSEO_URL_THREAD_PRINT) : '')
);
}
}
if ($newurl)
{
$tinfo = $g_cache['thread'][$threadid];
$is_public = vbseo_forum_is_public($g_cache['forum'][$tinfo['forumid']]);
if ($is_public)
vbseo_safe_redirect($newurl,
array(VBSEO_ENABLE_GARS?VBSEO_PAGENUM_URI_GARS:'', VBSEO_THREADID_URI, 'threadid', 'postid', 'page',
($_GET['pp'] == $vboptions['maxposts'])?'pp':''
));
else
{
define('VBSEO_PRIVATE_REDIRECT_URL', $newurl);
define('VBSEO_PRIVATE_REDIRECT_THREAD', $threadid);
}
}
}
else
if (VBSEO_REWRITE_SHOWPOST && (VBSEO_BASEURL == 'showpost.' . VBSEO_VB_EXT))
{
define('THIS_SCRIPT', 'showpost');
vbseo_get_options();
vbseo_prepare_seo_replace();
$r_post_id = $_GET[VBSEO_POSTID_URI];
vbseo_get_forum_info();
if (VBSEO_POSTBIT_PINGBACK == 2)
$find_prepostthread_ids = array($r_post_id);
vbseo_get_post_thread_info($r_post_id, true);
vbseo_get_thread_info($find_postthreads);
if (VBSEO_POSTBIT_PINGBACK == 2)
$vbseo_url_ = vbseo_thread_url_postid($r_post_id);
else
$vbseo_url_ = vbseo_post_url($r_post_id, $_GET['postcount']);
vbseo_safe_redirect($vbseo_url_, array(VBSEO_POSTID_URI, 'postcount'));
}
else
if (VBSEO_REWRITE_MEMBER_LIST && (VBSEO_BASEURL == 'memberlist.' . VBSEO_VB_EXT))
{
if (!in_array($_REQUEST['do'], array('search', 'process')))
{
$vbseo_url_ = vbseo_memberlist_url($_GET['ltr'], $_GET[VBSEO_PAGENUM_URI]);
$strip_params = array('ltr', 'do', VBSEO_PAGENUM_URI);
if ($_GET['sort'] == VBSEO_DEFAULT_MEMBERLIST_SORT) $strip_params[] = 'sort';
if ($_GET['order'] == VBSEO_DEFAULT_MEMBERLIST_ORDER) $strip_params[] = 'order';
vbseo_safe_redirect($vbseo_url_, $strip_params);
}
}
else
if (VBSEO_REWRITE_MEMBERS && (VBSEO_BASEURL == 'member.' . VBSEO_VB_EXT))
{
if (!$_GET['find'])
{
$userid = $_GET[VBSEO_USERID_URI] ? $_GET[VBSEO_USERID_URI] : $_GET['userid'];
if ($userid)
{
vbseo_get_user_info(array($userid));
$vbseo_url_ = vbseo_member_url($userid);
vbseo_safe_redirect($vbseo_url_, array(VBSEO_USERID_URI, 'userid'));
}
}
else
if ($_GET['find'] == 'lastposter')
{
$find_forum_last = array($_GET[VBSEO_FORUMID_URI]);
vbseo_get_options();
vbseo_get_forum_info();
if ($_GET[VBSEO_FORUMID_URI])
{
$userid = $g_cache['forum'][$_GET[VBSEO_FORUMID_URI]]['lastposter'];
}
else
{
vbseo_get_thread_info($_GET[VBSEO_THREADID_URI]);
$userid = $g_cache['thread'][$_GET[VBSEO_THREADID_URI]]['lastposter'];
}
vbseo_get_user_info(array($userid));
$vbseo_url_ = vbseo_member_url(0, $userid);
vbseo_safe_redirect($vbseo_url_, array(VBSEO_FORUMID_URI, 'find', VBSEO_THREADID_URI));
}
}
else
if (VBSEO_REWRITE_ANNOUNCEMENT && (VBSEO_BASEURL == 'announcement.' . VBSEO_VB_EXT) && !isset($_GET['do']))
{
define('THIS_SCRIPT', 'announcement');
vbseo_get_options();
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
$r_forum_id = $_GET['f'] ? $_GET['f'] : $_GET['forumid'];
$r_ann_id = $_GET['a'] ? $_GET['a'] : $_GET['announcementid'];
if (!$r_forum_id && $r_ann_id)
{
$anna = vbseo_get_forum_announcement(0, $r_ann_id);
$r_forum_id = $anna['forumid'];
}
vbseo_get_forum_announcement($r_forum_id);
$newurl = vbseo_announcement_url($r_forum_id, $r_ann_id);
if ($newurl)
{
$is_public = vbseo_forum_is_public($g_cache['forum'][$r_forum_id], '', 1);
if ($is_public)
vbseo_safe_redirect($newurl, array(VBSEO_FORUMID_URI, 'forumid', 'a', 'announcementid'));
else
{
define('VBSEO_PRIVATE_REDIRECT_SUGGEST', $newurl);
}
}
}
else
if (VBSEO_REWRITE_FORUM && (VBSEO_BASEURL == 'forumdisplay.' . VBSEO_VB_EXT))
{
define('THIS_SCRIPT', 'forumdisplay');
$r_forum_id = $_GET['f'] ? $_GET['f'] : $_GET['forumid'];
$vbseo_newurl = '';
$vbseo_unset_arr = array(VBSEO_FORUMID_URI, 'forumid', 'page');
if ($r_forum_id == 'home')
{
$vbseo_newurl = '';
}elseif (preg_match('#^\d+$#', $r_forum_id))
{
vbseo_get_options();
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
if ((($g_cache['forum'][$r_forum_id]['daysprune'] == $_GET['daysprune']) && !$_GET['order']
) || !$_GET['daysprune'])
$vbseo_unset_arr[] = 'daysprune';
if ((!$_GET['sort'] || $_GET['sort'] == VBSEO_DEFAULT_FORUMDISPLAY_SORT) && $_GET['order'] == VBSEO_DEFAULT_FORUMDISPLAY_ORDER)
{
$vbseo_unset_arr[] = 'sort';
$vbseo_unset_arr[] = 'order';
}
$vbseo_newurl = vbseo_forum_url($r_forum_id, $_GET['page']);
}
else
{
vbseo_set_self ('forumdisplay.' . VBSEO_VB_EXT);
require ('forumdisplay.' . VBSEO_VB_EXT);
exit();
}
if ($vbseo_newurl)
{
$is_public = vbseo_forum_is_public($g_cache['forum'][$r_forum_id]);
if ($is_public)
vbseo_safe_redirect($vbseo_newurl, $vbseo_unset_arr);
else
{
$globaltemplates = $phrasegroups = $specialtemplates = array();
include 'global.' . VBSEO_VB_EXT;
vbseo_get_options();
vbseo_get_forum_info();
$is_public = vbseo_forum_is_public($g_cache['forum'][$r_forum_id], 0, true);
if ($is_public)
vbseo_safe_redirect($vbseo_newurl, $vbseo_unset_arr);
}
}
}
else
$vbseo_noproc = true;
}
if ($vbseo_noproc)
{
if (!isset($vbseo_crules))
{
$vbseo_crules = array();
foreach($GLOBALS['vbseo_custom_rules'] as $k => $v)
if ($k)
$vbseo_crules['#' . str_replace(array('#', '&'), array('\#', '&(?:amp;)?'), $k) . '#'] = str_replace('[NF]', '', $v);
}
if ($vbseo_crules)
{
$newurl = preg_replace(array_keys($vbseo_crules), $vbseo_crules, $vbseo_requrl);
if ($vbseo_requrl != $newurl)
{
if ($_GET['vbseorelpath'])$newurl = $_GET['vbseorelpath'] . $newurl;
vbseo_safe_redirect($newurl, array(), 1);
}
}
}
}
if (!$vbseo_file_exists)
{
$c301_fw = vbseo_fw_customurl('301');
$vbseo_url_2 = $c301_fw ? preg_replace(array_keys($c301_fw), $c301_fw, $vbseo_requrl) : $vbseo_requrl;
if ($vbseo_url_2 != $vbseo_requrl)
{
vbseo_safe_redirect($vbseo_url_2, array(), strstr($vbseo_url_2, '?') ? true : false);
}
else
if ($vbseo_url_2 = vbseo_back_customurl($vbseo_url_, 'rules'))
{
vbseo_set_self($_GET['vbseorelpath'] . $vbseo_url_2);
$vbseo_purl = parse_url(preg_replace('#\?.*$#', '', $vbseo_url_2));
$vbseo_found_fn = $vbseo_purl['path'];
$vbseo_found = true;
}
if (!$vbseo_found && !VBSEO_RELPATH)
{
if (VBSEO_REWRITE_POLLS && $arr = vbseo_check_url('VBSEO_URL_POLL', $vbseo_url_))
{
vbseo_set_self('poll.' . VBSEO_VB_EXT . '?' . VBSEO_ACTION_URI . '=showresults&' . VBSEO_POLLID_URI . '=' . $arr['poll_id']);
$vbseo_found_fn = 'poll.' . VBSEO_VB_EXT;
$vbseo_found = true;
}
else
if (VBSEO_REWRITE_ATTACHMENTS &&
(substr($vbseo_url_, 0, strlen(VBSEO_ATTACHMENTS_PREFIX)) == VBSEO_ATTACHMENTS_PREFIX) && $arr = vbseo_check_url('VBSEO_URL_ATTACHMENT', substr($vbseo_url_, strlen(VBSEO_ATTACHMENTS_PREFIX))))
{
preg_match('#^(\d+)(d\d+)?(t)?#', $arr['attachment_id'], $atm);
vbseo_set_self('attachment.' . VBSEO_VB_EXT . '?attachmentid=' . $atm[1] . (isset($atm[3])?'&thumb=1':''));
$vbseo_found_fn = 'attachment.' . VBSEO_VB_EXT;
$vbseo_found = true;
}
else
if (VBSEO_REWRITE_SHOWPOST && $arr = vbseo_check_url('VBSEO_URL_POST_SHOW', $vbseo_url_))
{
if (VBSEO_POSTBIT_PINGBACK == 2)
{
vbseo_get_options();
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
$r_post_id = $arr['post_id'];
$find_prepostthread_ids = array($r_post_id);
vbseo_get_post_thread_info($r_post_id, true);
vbseo_get_thread_info($find_postthreads);
$vbseo_url_ = vbseo_thread_url_postid($r_post_id);
vbseo_safe_redirect($vbseo_url_, array(VBSEO_POSTID_URI, 'postcount'));
}
vbseo_set_self('showpost.' . VBSEO_VB_EXT . '?' . VBSEO_POSTID_URI . '=' . $arr['post_id'] . '&postcount=' . $arr['post_count']);
$vbseo_found_fn = 'showpost.' . VBSEO_VB_EXT;
$vbseo_found = true;
}
else
if (VBSEO_REWRITE_THREADS &&
($vbseo_arr = vbseo_check_url('VBSEO_URL_THREAD_NEWPOST', $vbseo_url_)) ||
($vbseo_arr2 = $vbseo_arr = vbseo_check_url('VBSEO_URL_THREAD_LASTPOST', $vbseo_url_))
)
{
define('THIS_SCRIPT', 'showthread');
vbseo_set_self($q = 'showthread.' . VBSEO_VB_EXT . '?' . VBSEO_THREADID_URI . '=' . $arr['thread_id'] . '&goto=' . (isset($arr2) ? 'lastpost' : 'newpost'));
define('VBSEO_GT_POST', $q);
if (defined('VBSEO_NEW_LAST_POST_COOKIE') && VBSEO_NEW_LAST_POST_COOKIE)
{
$postid = 0;
}
else
{
$globaltemplates = $phrasegroups = $specialtemplates = array();
include 'global.' . VBSEO_VB_EXT;
vbseo_get_options();
vbseo_prepare_seo_replace();
vbseo_get_forum_info();
$postid = $vbseo_arr2 ? vbseo_get_last_post($vbseo_arr['thread_id']) : vbseo_get_new_post($vbseo_arr['thread_id']);
}
if ($postid)
{
$tmode = $_COOKIE[$bbuserinfo['cprefix'] . "threadedmode"];
if ($tmode == 'threaded' || $tmode == 'hybrid')
{
vbseo_safe_redirect(VBSEO_GT_POST, array(VBSEO_THREADID_URI, 'goto'));
}
else
{
$find_prepostthread_ids = array($postid);
vbseo_get_post_thread_info($postid, true);
vbseo_get_thread_info($find_postthreads);
$vbseo_url_ = vbseo_thread_url_postid($postid);
$ti = $g_cache['thread'][$arr['thread_id']];
if ($GAS_settings &&
preg_match('#\b' . $ti['forumid'] . '\b#', $GAS_settings['forums'])
)
{
$_SERVER['QUERY_STRING'] = 'conly=1';
}
vbseo_safe_redirect($vbseo_url_, array(VBSEO_THREADID_URI, 'goto'));
}
}
else
{
$vbseo_found_fn = 'showthread.' . VBSEO_VB_EXT;
$vbseo_found = true;
}
}
else
if (VBSEO_REWRITE_THREADS &&
($vbseo_arr = vbseo_check_url('VBSEO_URL_THREAD_GOTOPOST_PAGENUM', $vbseo_url_)) ||
($vbseo_arr = vbseo_check_url('VBSEO_URL_THREAD_GOTOPOST', $vbseo_url_))
)