Hello,
how can I create a sitemap like this one: Web Hatt? - Türkiyenin En Güncel Forumu
This is a discussion on vbulletin sitemap.php within the General Discussion forums, part of the vBulletin SEO Discussion category; Hello, how can I create a sitemap like this one: Web Hatt? - Türkiyenin En Güncel Forumu...
Hello,
how can I create a sitemap like this one: Web Hatt? - Türkiyenin En Güncel Forumu
Mehr Besucher für dein Forum: vBulletin SEO Optimierung
Okay,
i have found this hack.
sitemap.php:
How can I rewrite the URL's from "showthread.php?t=" to the vbseo URL format:PHP Code:<?php
$script = 'sitemap.php';
$count = 100;
$lastpost = true;
$asc = false;
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('SKIP_SESSIONCREATE', 1);
define('DIE_QUIETLY', 1);
define('THIS_SCRIPT', 'sitemap');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special data templates from the datastore
$phrasegroups = array('forum');
$specialtemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
// We don't want no stinkin' sessionhash
$vbulletin->session->vars['sessionurl'] =
$vbulletin->session->vars['sessionurl_q'] =
$vbulletin->session->vars['sessionurl_js'] =
$vbulletin->session->vars['sessionhash'] = '';
$vbulletin->input->clean_array_gpc('r', array(
'offset' => TYPE_UINT,
));
if($vbulletin->GPC['offset']) $offset=$vbulletin->GPC['offset'];
else $offset = 0;
// check to see if there is a forum preference
foreach (array_keys($vbulletin->forumcache) AS $forumid)
{
$forumperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];
if ($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']
AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'])
AND (($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
AND verify_forum_password($forumid, $vbulletin->forumcache["$forumid"]['password'], false)
)
{
$forumchoice[] = $forumid;
}
}
if (!empty($forumchoice))
{
$forumsql = "AND thread.forumid IN(" . implode(',', $forumchoice) . ")";
}
else
{
$forumsql = "";
}
if (empty($forumchoice))
{ // no access to view selected forums
exit;
}
$threadcount = $db->query_first_slave("
SELECT count(*) AS totalthreads
FROM " . TABLE_PREFIX . "thread AS thread
WHERE 1=1
$forumsql
AND thread.visible = 1
AND open <> 10
");
$totalthreads = $threadcount['totalthreads'];
$threadcache = array();
// query last threads from visible / chosen forums
$threads = $db->query_read_slave("
SELECT thread.threadid, thread.title, thread.lastpost
FROM " . TABLE_PREFIX . "thread AS thread
WHERE 1=1
$forumsql
AND thread.visible = 1
AND open <> 10
ORDER BY " . ($lastpost ? "thread.lastpost" : "thread.dateline") . ($asc?" ASC ":" DESC ") ."
LIMIT ".$offset.",$count
");
while ($thread = $db->fetch_array($threads))
{ // fetch the threads
// remove sessionhash from urls:
$threadcache[] = $thread;
}
$output .= $stylevar[htmldoctype];
$output .= "<html xmlns='http://www.w3.org/1999/xhtml' dir='$stylevar[textdirection]' lang='$stylevar[languagecode]' xml:lang='$stylevar[languagecode]'><head>";
$output .= "<meta http-equiv='Content-Type' content='text/html; charset=".$stylevar[charset]."' />";
$output .= "<title>".$vbulletin->options['bbtitle']."</title></head><body>";
$output .= "\r\n<br/><h1>".$vbphrase['view_full_version'].": <a href='".$vbulletin->options['bburl']."'>".$vbulletin->options['bbtitle']."</a></h1>";
$output .= "\r\n<br/>".$vbphrase['go_to_page'];
$page_current=intval($offset/$count)+1;
$page_max=intval($totalthreads/$count)+1;
for($i=1;$i<=$page_max;$i++)
{
if($i<=20||$i==$page_max||($i>$page_current-5&&$i<$page_current+5)) {
$output .= "<a href='".$script."?offset=".(($i-1)*$count)."'>".$i."</a> ";
}
}
if (!empty($threadcache))
{
foreach ($threadcache AS $threadnum => $thread)
{
$output .= "\r\n<br/>» <a href='". $vbulletin->options['bburl'] . "/showthread.php?t=".$thread['threadid']."'>".$thread['title']."</a>";
}
}
$output .= "</body></html>";
echo $output;
?>
Shisha & Wasserpfeifen Forum
What should I edit in the sitemap.php
Mehr Besucher für dein Forum: vBulletin SEO Optimierung
you need to incorporate the vbseo_any_url() function around your links.
see: vBSEO Functions for Extensibility for more info.
Mehr Besucher für dein Forum: vBulletin SEO Optimierung
Hello Linh ,
You need to contact the mod author and ask their asistance.
Mert Gökçeimam / Crawlability Inc.
vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!
Twitter:@Depkac
Personal Blog : Mert Gökçeimam
Simple Sitemap - vBulletin.org Forum
Yes, and now? How do I rewrite the vbulletin url's to to vbseo url's??
Mehr Besucher für dein Forum: vBulletin SEO Optimierung