letin->options['keywords'] . "\" />
1 ? construct_phrase($vbphrase['page_x'], $p) . " " : "") . $foruminfo['description_clean'] . "\" />
";
}
else
{
$do = 'index';
$metatags = "options['keywords'] . "\" />
options['description'] . "\" />";
}
($hook = vBulletinHook::fetch_hook('archive_process_start')) ? eval($hook) : false;
if ($pda AND $vbulletin->userinfo['userid'] == 0 AND $vbulletin->GPC['login'] AND $do != 'error')
{
$do = 'login';
}
if ($pda AND $vbulletin->userinfo['userid'] > 0 AND $vbulletin->GPC['message'] AND false)
{
$do = 'message';
}
// ad locations
$ad_templates = fetch_ad_templates(array('ad_archive_above_content1', 'ad_archive_above_content2', 'ad_archive_below_content'));
$output .= "
";
($hook = vBulletinHook::fetch_hook('archive_postheader')) ? eval($hook) : false;
// ********************************************************************************************
// display board
if ($do == 'index')
{
$output .= print_archive_navigation(array());
$output .= "
$vbphrase[view_full_version]: ' . $vbulletin->options['bbtitle'] . "
\n";
$output .= "
";
$output .= $ad_templates['ad_archive_above_content1'];
$output .= $ad_templates['ad_archive_above_content2'];
$output .= "
";
$output .= "
\n";
$output .= print_archive_forum_list();
$output .= "
\n";
}
if ($Coventry = fetch_coventry('string'))
{
$globalignore = "AND " . iif($do == 'forum', 'thread.post', 'post.') . "userid NOT IN ($Coventry) ";
}
else
{
$globalignore = '';
}
// ********************************************************************************************
// display forum
if ($do == 'forum')
{
// list threads
$output .= print_archive_navigation($foruminfo);
$output .= "
$vbphrase[view_full_version] : $foruminfo[title_clean]
\n
\n";
$output .= "
";
$output .= $ad_templates['ad_archive_above_content1'];
$output .= $ad_templates['ad_archive_above_content2'];
$output .= "
";
if ($foruminfo['cancontainthreads'])
{
if (!$p)
{
$p = 1;
}
$output .= print_archive_page_navigation($foruminfo['threadcount'], $vbulletin->options['archive_threadsperpage'], "f-$foruminfo[forumid]");
$threads = $db->query_read_slave("
SELECT threadid, title, prefixid, lastpost, replycount
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND visible = 1
AND open <> 10
$globalignore
ORDER BY dateline " . iif($pda, 'DESC', 'ASC') . "
LIMIT " . ($p - 1) * $vbulletin->options['archive_threadsperpage'] . ',' . $vbulletin->options['archive_threadsperpage']
);
$start = ($p - 1) * $vbulletin->options['archive_threadsperpage'] + 1;
if ($pda AND false)
{
$output .= "
New Thread";
}
$output .= "
\n
\n";
while ($thread = $db->fetch_array($threads))
{
if ($vbulletin->options['wordwrap'] != 0)
{
$thread['title'] = fetch_word_wrapped_string($thread['title']);
}
$thread['title'] = fetch_censored_text($thread['title']);
$thread['prefix_plain_html'] = ($thread['prefixid'] ? htmlspecialchars($vbphrase["prefix_$thread[prefixid]_title_plain"]) : '');
($hook = vBulletinHook::fetch_hook('archive_forum_thread')) ? eval($hook) : false;
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
{
$output .= "\t- $thread[prefix_plain_html] $thread[title]" . iif($pda, " (" . construct_phrase($vbphrase['x_replies'], $thread['replycount']) . ")") . "
\n";
}
else if ($vbulletin->options['archive_threadtype'] OR $pda)
{
$output .= "\t- $thread[prefix_plain_html] options['bburl'] .
'/archive/index.php' . (SLASH_METHOD ? '/' : '?') . "t-$thread[threadid].html" . ARCHIVE_SESSION_URL . "\">$thread[title]" . iif($pda, " (" . construct_phrase($vbphrase['x_replies'], $thread['replycount']) . ")") . "
\n";
}
else
{
$output .= "\t- $thread[prefix_plain_html] $thread[title]
\n";
}
}
$output .= "
\n
\n";
}
else
{
$output .= "
\n";
$output .= print_archive_forum_list($f);
$output .= "
\n";
}
}
// ********************************************************************************************
// display thread
if ($do == 'thread')
{
if (!$vbulletin->options['archive_threadtype'])
{
// if we are not using the archive threadtype, invisibly redirect to the full thread view
exec_header_redirect(fetch_seo_url('thread|js|bburl', $threadinfo));
}
if ($vbulletin->options['wordwrap'] != 0)
{
$threadinfo['title'] = fetch_word_wrapped_string($threadinfo['title']);
}
$threadinfo['title'] = fetch_censored_text($threadinfo['title']);
$output .= print_archive_navigation($foruminfo, $threadinfo);
$output .= "
$vbphrase[view_full_version] : "
. ($threadinfo['prefix_plain_html'] ? "$threadinfo[prefix_plain_html] " : '' )
. "$threadinfo[title]
\n
\n";
if ($p == 0)
{
$p = 1;
}
$output .= "
";
$output .= $ad_templates['ad_archive_above_content1'];
$output .= $ad_templates['ad_archive_above_content2'];
$output .= "
";
$output .= print_archive_page_navigation($threadinfo['replycount'] + 1, $vbulletin->options['archive_postsperpage'], "t-$threadinfo[threadid]");
$posts = $db->query_read_slave("
SELECT post.postid, post.pagetext, IFNULL( user.username , post.username ) AS username, dateline
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = post.userid)
WHERE threadid = $threadinfo[threadid]
AND visible = 1
$globalignore
ORDER BY dateline ASC
LIMIT " . (($p - 1) * $vbulletin->options['archive_postsperpage']) . ',' . $vbulletin->options[archive_postsperpage]
);
if ($pda AND false)
{
$output .= "
New Reply";
}
$i = 0;
while ($post = $db->fetch_array($posts))
{
$i++;
$post['pagetext_simp'] = strip_bbcode($post['pagetext']);
$post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline']);
$post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);
if ($vbulletin->options['wordwrap'] != 0)
{
$post['pagetext_simp'] = fetch_word_wrapped_string($post['pagetext_simp']);
}
$post['pagetext_simp'] = fetch_censored_text($post['pagetext_simp']);
($hook = vBulletinHook::fetch_hook('archive_thread_post')) ? eval($hook) : false;
$output .= "\n
$post[username]
$post[postdate], $post[posttime]
";
$output .= "
" . nl2br(htmlspecialchars_uni($post['pagetext_simp'])) . "
\n\n";
}
}
// ********************************************************************************************
// display login
if ($do == 'login')
{
$output .= print_archive_navigation(array());
$output .= "
$vbphrase[view_full_version]: ' . $vbulletin->options['bbtitle'] . "
\n";
$output .= "
";
$output .= $ad_templates['ad_archive_above_content1'];
$output .= $ad_templates['ad_archive_above_content2'];
$output .= "
";
if (SLASH_METHOD)
{
$loginlink = 'index.php' . (!empty($querystring) ? "/$querystring" : '') . '?' . $vbulletin->session->vars['sessionurl'] . 'login=1';
}
else
{
$loginlink = 'index.php?' . (!empty($querystring) ? "$querystring&" : '') . $vbulletin->session->vars['sessionurl'] . 'login=1';
}
$output .= "
\n";
$output .= "$vbphrase[log_in]\n";
$output .= "\n";
$output .= "
\n";
}
// ********************************************************************************************
// display error
if ($do == 'error')
{
$output .= print_archive_navigation(array());
$output .= "
$vbphrase[view_full_version]: ' . $vbulletin->options['bbtitle'] . "
\n";
$output .= "
";
$output .= $ad_templates['ad_archive_above_content1'];
$output .= $ad_templates['ad_archive_above_content2'];
$output .= "
";
$output .= "
\n";
$output .= $error_message;
$output .= "
\n";
}
// ad locations
($hook = vBulletinHook::fetch_hook('archive_complete')) ? eval($hook) : false;
$output .= $ad_templates['ad_archive_below_content'];
$output .= "
$vbphrase[vbulletin_copyright]
";
if (defined('NOSHUTDOWNFUNC'))
{
exec_shut_down();
}
echo $output;
($hook = vBulletinHook::fetch_hook('archive_complete_postoutput')) ? eval($hook) : false;
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 09:54, Thu May 26th 2011
|| # CVS: $RCSfile$ - $Revision: 40911 $
|| ####################################################################
\*======================================================================*/
?>