Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
vBulletin Google Site Map Details »»
vBulletin Google Site Map
Version: 2.41, by T2DMan T2DMan is offline
Developer Last Online: Jun 2018 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 06-29-2005 Last Update: 11-07-2005 Installs: 109
Additional Files Is in Beta Stage  
No support by the author.

There are a few vBulletin Google Site maps around, but none as comprehensive as this that I have seen. This vBulletin Google site map is based on Kalius's work on discussed on his site and at Digitalpoint

FYI, the vBulletin Google Site Map modification contains at least one potential remote file include exploit. You are hereby notified that you should uninstall this modification, including the removal of the vBulletin Google Site Map PHP files from your server. The author of the modification has been notified, and the vBulletin Google Site Map thread has been moved to the Modification Graveyard forum.

Best,
vBorg Staff


vBulletin Google site map
with ability to add extra urls
(c) by T2DMan - Michael Brandon

8Nov05+13hrsGMT - update. Added support for Yahoo Sitemap & bug fix
7Nov05+13hrsGMT - update. Thanks for your help.

I have attached 1 version with 2 different preset configs for your convenience. vBSEO and non vBSEO configs.

Configure in the vbgsitemap-config.php file.
$base=""; // "" if in root, $base="forum/"; //if in the subdirectory forum

It now works well with forum permissions, and the vBulletin's scheduled task system. I have personally installed the reviewed vBGSiteMap on a site with over 200,000 urls. Copes with the large number of urls with no problems.

The vBGSiteMap works well with vbSEO, and it lists all the old url's to allow Google to spider the old url's and so find the 301 redirects to the new, and so delete the old url's from its index.

Compared to the previous versions

  • Sitemap files now written into their own directory - means this can be safely chmod 777 - thanks Sarah King
  • config and class files separated out
  • new help file written
  • many corrections made to the code - amazing what sitting on a piece of code can do, and amazing what you can learn from personally installing on many different servers.
  • Can now work on mysql versions from 3.23.58 to 5+
Specifications
  • works with v3.03 - 3.5
  • access to this file is password protected
the same password as the database via the vBulletin includes/config.php file
  • creates an index file and multiple gzipped site maps to less than the maximum permitted by Google (I have in fact restricted it to 3k url's, rather than 50k as my browser takes a while to process the file when checking it)
  • creates a gzipped file containing the urls for Yahoo Sitemap
  • the site map files are created in the /vbgsitemap/files directory which needs to be chmod to 777
adds
  • forums - with paginations of forums (excluding redirects and password protected forums)
  • threads - with pagination of threads (excluding invisible threads=soft deleted, and threads inside password protected forums)
  • archive forum pages with paginations
  • archive versions of threads with paginations
  • members
extra
  • extra urls from other program types
  • add a new url per line onto file.txt, and a gzipped file will be created for it, and added to the site index file.
How to install
  • unzip the files
  • copy the vbgsitemap folder to your root directory
  • chmod the vbgsitemap/files directory to 777
  • copy vbgsitemap.php to your root directory
  • copy the includes/cron/vbgsitemap-cron.php file to your vbulletin includes/cron/ directory
  • look over the configuration options on the /vbgsitemap/vbgsitemap-config.php file
    • $base="" or "forum/" - if your forum is the actual root, or in the forum directory etc.
    • $addthreadarchive=false; - whether you want the archive version of the threads to be added or not.
    • the rest should not need to be changed
    • change to $xtrafile="file.txt"; if you have additional urls that you want included from another package, get a list of those url's and add them to file.txt.
  • Then access the /vbgsitemap/index.php file in your browser to get things happening.
  • The username/password is the username/password of your database.
  • Add the resulting one index file to Google sitemaps: http://www.yourdomain.com/vbgsitemap.php
  • Add the other file to Yahoo sitemaps
    http://www.yourdomain.com/vbgsitemap/files/urllist.gz
  • A cron job can be setup in the vbulletin scheduled tasks

    • ./includes/cron/vbgsitemap-cron.php
    • depending on the number of posts/new threads to your forum, set to run daily or weekly etc. The cron will automatically ping Google and return success/failure into the cron log.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #122  
Old 10-17-2005, 06:07 AM
cynix2 cynix2 is offline
 
Join Date: Apr 2005
Location: Reno, NV
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have min in the public_html folder
Reply With Quote
  #123  
Old 10-17-2005, 05:48 PM
Citizen Citizen is offline
 
Join Date: Sep 2005
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is my multi.php file. If anyone can help me figure out why it is creating all the links in my sitemap as http://domain.comdomain.com instead of http://domain.com, it would be greatly appreciated.

Code:
<?php
/**************************************************************
Google site map for vBulletin
(c) by T2DMan - Michael Brandon 
    michael@time2dine.co.nz

Get updates from http://forum.time2dine.co.nz/showthread.php?t=3976

version 1.22 12 July 2005
- corrected lastmod time-was incorrectly using z being universal time, when needed
 to be local time.
- coded for vBSEO (url rewrite)-thanks Juan Carlos-as at 11/july/05 not yet promoted
- and amendment to allow for reg globals off - thanks Sarah King
- and not showing last post/mod for forum when no posts in the forum
- I had not used the prefix for the setting database query - thanks again Sarah


-access to this file is password protected 
 the same password as the database via the vb includes/config.php file

-creates an index file and multiple site maps to less than the max 
 permitted by Google

-the site map files are created in the root directory
-for the program to create the files, the root directory must be minimum chmod 750
-or note the names of the files and precreate them yourself
-the program will create the $file if it does not already exist

adds 
-rewritten url's if the vBSEO url rewrite has been added (and original urls if needed)
-forums - with paginations of forums (excluding redirects and password protected)
-threads - with pagination of threads (excluding invisible threads=soft deleted, and threads inside password protected forums)
-archive forum pages with paginations
-archive versions of threads with paginations 
-members

restrictions
-not programmed regarding forum permissions - but although Google may try to get the pages, it will get a permission denied message, so we can live with that.

extra
-extra urls from other program types
-configure vbsitemap-xtrafile.php (add in name of following file - file.txt)
-add a new url per line onto file.txt, and a gzipped file will be created for it, and added to the site index file.


**************************************************************
inspired by
http://forums.digitalpoint.com/showthread.php?t=17798

http://code.google.com/sm_thirdparty.html
*/


$v='3.5';//vBulletin version 3.5 (or leave as zero for v3.3-3.7)

//directory that the vBulletin forum is in. 
//comment out the one not applicable to your forum
//$base=""; // "" if in root
$base="forums/"; //if in the subdirectory forum

$vbseo_installed = false; //url rewrite hack - not yet released
$vbseo_oldurls = false; //show the old pre url rewrite urls - so Google can see that they have changed

extract($_REQUEST);

require $base.'includes/config.php';
if ($v==3.5){
$dbusername=$config['MasterServer']['username'];
$dbpassword=$config['MasterServer']['password'];
$servername=$config['MasterServer']['servername'];
$dbname=$config['Database']['dbname'];
$tableprefix=$config['Database']['tableprefix'];
}

//**************************************************************
head();


if (empty($username) && empty($password)) entry(true); 
elseif($dbusername<>$username AND $dbpassword<>$password) entry(false);

($ping=="on")?$ping=true:$ping=false;
//**************************************************************


//add members userid pages to the sitemap
$adduserid=true;

// root - home page
$http="http://domain.com";

//add lastmod flag for threads & forums-based on the date/time of lastpost
$lastmod=true;//true;//false; - if false, it will use the current time

// add thread archive urls to site map
// will add them if firstly the archives are enabled,
// and then checks that you want to add them
$addarchive=true;
$addthreadarchive=false;//false; #- personally I go straight to the actual threads

$archiveurl="archive/index.php/";

//add pagination of forums and threads
$addforumpagination=true;
$addthreadpagination=true;

// the var string for forum display
// if your url is forumdisplay.php?f=73  then this would be f=
$forumq = '?f=';
$pageq = '&amp;page='; #pagination of forum & thread pages

// the var string for your thread display
// if your url is  showthread.php?t=872 then is t=
$threadq = '?t=';

// the var string for your member display
// if your url is  member.php?u=872 then is t=
$memberq = '?u=';


// url text file names - make them writable - or make your root directory chmod 777 and it will create itself.!!!
//starts from scratch - add the resulting file to your own master site map index
$sitemapindex="sitemap_vb_index.xml";

$numoffiles=1; //running total of the number of file we are up to

$file1 = 'sitemap'; //additional files are created with sitemap2.xml.gz etc
$file2 = '.xml.gz';

$file = $file1.$numoffiles.$file2;

// forum priority , thread priority, member priority, change frequency thread and forum see the sitemaps documentation
$fpriority = "0.8";
$tpriority = '1.0';    
$mpriority = '0.1';    


$fchange ='daily' ;
$tchange ='weekly';    
$mchange ='monthly';    

// base and forum base change and priority
$bchange ='hourly';
$bpriority = '1.0';


//counting number of url's processed
//rounded down from max 50k url's allowed-kept to 20k so the file is not too large to check manually - the program goes several over the number specified
$max=20000;//49500;
$maxsize=10000000; //10meg - rounded down 

//end of configuration
//**************************************************************

$txt=""; //contains the xml string that gets written to $file
$size=0; //counts the characters in the file up to max size then new file
$countertotal=0;//total url's in all the files
$counter=0; //running total of number of url's in a file

if($vbseo_installed)
{
	include 'vbsitemap-vbseo.php';
}

include('vbsitemap-xtrafile.php');

// base url of the forum with trailing slash
$home=$http.$_SERVER['HTTP_HOST']."/";
$base = $home.$base;

//**************************************************************
//open multi page file
$multifile=$sitemapindex;

if(!file_exists($home.$multifile)) $notopen=1;

$multihandle = fopen($multifile, "w");
if($notopen) chmod($multifile, 0777);

//control file	
fwrite( $multihandle, '<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/siteindex.xsd">
');


//**************************************************************
//setting variables from database

$basestr = " $bchange $bpriority";
$fstr = " $fchange $fpriority";
$tstr = " $tchange $tpriority";
$setting = $tableprefix."setting";

$connection = mysql_connect($servername, $dbusername, $dbpassword ) or die("Database is down please try again");
$db = mysql_select_db($dbname, $connection) or die ("NO DATABASE" );

$fquery="SELECT varname,value from $setting where varname = 'archiveenabled' or varname='archive_threadsperpage' or varname = 'archive_postsperpage' or varname = 'maxthreads' or varname = 'maxposts' or varname = 'timeoffset'";
$results = mysql_query($fquery) or DIE("$fquery" );


while ($result=mysql_fetch_array($results)){
	$$result['varname']=$result['value'];
}
//stop div by zero errors
if($archive_threadsperpage==0) $archive_threadsperpage=1;
if($archive_postsperpage==0) $archive_postsperpage=1;
	
($timeoffset>0)?$plusminus="+":$plusminus="-";
$timeoffset=$plusminus.date("H:i",mktime($timeoffset,0,0,1,1,2005)); 

$timeoffset1=date("O")/100; 
($timeoffset1>0)?$plusminus="+":$plusminus="-";
$timeoffset1=$plusminus.date("H:i",mktime($timeoffset1,0,0,1,1,2005)); 

//**************************************************************
//write new file to sitemap index
$a = date("Y-m-d\TH:i:s$timeoffset1");

//xtrafile - configure vbsitemap-xtrafile.php to include a list of url's
//the url's will be added to their own file and added to the sitemap index
if($xtrafile){

xtra();

fwrite( $multihandle, "<sitemap>
   <loc>{$home}{$xtrafilegz}</loc>
   <lastmod>{$a}</lastmod>
</sitemap>
");

}
//end xtra file

fwrite( $multihandle, "<sitemap>
   <loc>{$home}{$file}</loc>
   <lastmod>{$a}</lastmod>
</sitemap>
");

//**************************************************************
//open first site map file

if(!file_exists($home.$file)){
	$notopen=1;
} 
$handle = gzopen($file, 'w9');

if($notopen==1){
	chmod($file, 0777);
}

$txt='<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">

';

gzwrite($handle, $txt);
$size+=strlen($txt);


//**************************************************************
//home pages - including archive home page

$txt="<url>
<loc>{$home}</loc>
<lastmod>{$a}</lastmod>
<changefreq>{$bchange}</changefreq>
<priority>{$bpriority}</priority>
</url>

";
$counter++;


if($base<>$home){
$txt.="<url><loc>{$base}</loc>
<lastmod>{$a}</lastmod>
<changefreq>{$bchange}</changefreq>
<priority>{$bpriority}</priority>
</url>

";
$counter++;
}


if($archiveenabled and $addarchive){
$txt.="
<url><loc>{$base}{$archiveurl}</loc>
<lastmod>{$a}</lastmod>
<changefreq>{$bchange}</changefreq>
<priority>{$bpriority}</priority>
</url>

";
$counter++;
}

$forums = $tableprefix."forum";
$threads = $tableprefix."thread";
$members = $tableprefix."user";                            



//**************************************************************
//add forums - both actual (and pagination) and archive (and pagination)

$fquery = "SELECT forumid, lastpost, threadcount FROM $forums where link='' and  password='' order by forumid";

$results = mysql_query($fquery) or DIE("$fquery" );
$num_rows = mysql_num_rows($results);

while ($row=mysql_fetch_array($results))
{
if(!$lastmod or $row['lastpost']*1==0) $row['lastpost']=time();

if($vbseo_oldurls){
    $urlx = $base."forumdisplay.php".$forumq.$row['forumid'];    
   	$txt.= "<url>
<loc>{$urlx}</loc>
";

	$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost']). "</lastmod>
";
	$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;
}

// =================== vBSEO ========================
if($vbseo_installed) 
$url = $base.vbseo_url_forum($row['forumid']);
 else
$url = $base."forumdisplay.php".$forumq.$row['forumid'];    

$txt.= "<url>
<loc>{$url}</loc>
";

$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;

//add pagination of forum
if($addforumpagination and ceil($row['threadcount']/$maxthreads)>1){
for ($ai = 2; $ai <= ceil($row['threadcount']/$maxthreads); $ai++){

if($vbseo_oldurls){
$url5 = $base."forumdisplay.php{$forumq}{$row['forumid']}$pageq{$ai}";
	$txt.="<url>
<loc>{$url5}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;
}

 // =================== vBSEO ========================
 if($vbseo_installed)
$url4 = $base.vbseo_url_forum($row['forumid'], $ai);
    else
$url4 = $base."forumdisplay.php{$forumq}{$row['forumid']}$pageq{$ai}";

	$txt.="<url>
<loc>{$url4}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;
counter();

	}
} //end when only one page for forum 


//archive
if($archiveenabled and $addarchive){

$url2 = $base."archive/index.php/f-".$row['forumid'].".html";

$txt.="<url>
<loc>{$url2}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;

//add pagination for archive - based on threads per forum
if(ceil($row['threadcount']/$archive_threadsperpage)>1){

for ($ai = 2; $ai <= ceil($row['threadcount']/$archive_threadsperpage); $ai++){
	$url3 = $base."archive/index.php/f-{$row['forumid']}-p-{$ai}.html";
	$txt.="<url>
<loc>{$url3}</loc>
<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;
counter();
	}
} //end when only one page for forum archive
}//end of archive

}//end of forum loop

gzwrite($handle, $txt);
$size+=strlen($txt);
$txt='';

//**************************************************************
//add threads - both actual and archive versions

$tquery = "SELECT ".($vbseo_installed?"$threads.title, $threads.forumid, ":"")."threadid, $threads.lastpost,$threads.replycount FROM $threads,$forums where visible=1 and $threads.forumid=$forums.forumid and password='' order by threadid desc";

$results = mysql_query($tquery) or DIE("$tquery" );
$num_rows = mysql_num_rows($results);

while ($row=mysql_fetch_array($results)){

if(!$lastmod or $row['lastpost']*1==0) $row['lastpost']=time();

if($vbseo_oldurls){
   $url2 = $base."showthread.php".$threadq.$row['threadid'];    
   $txt .= "<url>
<loc>{$url2}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$tchange}</changefreq>
<priority>{$tpriority}</priority>
</url>

";
$counter++;
}   

  // =================== vBSEO ========================
  if($vbseo_installed)
   $url = $base.vbseo_url_thread($row);
   else 
   $url = $base."showthread.php".$threadq.$row['threadid'];    

   $txt .= "<url>
<loc>{$url}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$tchange}</changefreq>
<priority>{$tpriority}</priority>
</url>

";
$counter++;

//add pagination for threads - based on posts per threads
if(ceil($row['replycount']/$maxposts)>1){
for ($ai = 2; $ai <= ceil($row['replycount']/$maxposts); $ai++){

if($vbseo_oldurls){
   $url6 = "{$base}showthread.php{$threadq}{$row['threadid']}{$pageq}{$ai}";    
	$txt.="<url>
<loc>{$url6}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;
}

// =================== vBSEO ========================
if($vbseo_installed)
 $url5 = $base.vbseo_url_thread($row,$ai);
else
 $url5 = "{$base}showthread.php{$threadq}{$row['threadid']}{$pageq}{$ai}";    


	$txt.="<url>
<loc>{$url5}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>

";
$counter++;
counter();
	}
} //end when only one page for threads

//achive site map
$url2 = $base."archive/index.php/t-".$row['threadid'].".html";
if($archiveenabled and $addthreadarchive){
$txt.="<url>
<loc>{$url2}</loc>
";
$txt.="<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>
";
$txt.="<changefreq>{$tchange}</changefreq>
<priority>{$tpriority}</priority>
</url>

";
$counter++;

//add pagination for archive - based on threads per forum
if(ceil($row['replycount']/$archive_postsperpage)>1){

for ($ai = 2; $ai <= ceil($row['replycount']/$archive_postsperpage); $ai++){
	$url3 = $base."archive/index.php/t-{$row['threadid']}-p-{$ai}.html";
	$txt.="<url>
<loc>{$url3}</loc>";
$txt.="
<lastmod>".date("Y-m-d\TH:i:s$timeoffset",$row['lastpost'])."</lastmod>";
$txt.="<changefreq>{$fchange}</changefreq>
<priority>{$fpriority}</priority>
</url>
";
$counter++;
	}
} //end when only one page for forum archive

}//end of archive
$counter++;
counter();
gzwrite($handle, $txt);
$size+=strlen($txt);
$txt='';

}//end of look for threads


//**************************************************************
//add members profile pages

if($adduserid) {
$tquery = "SELECT userid".($vbseo_installed?",username":"")." FROM $members";

$results = mysql_query($tquery) or DIE("$tquery" );
$num_rows = mysql_num_rows($results);

for ( $i = 0; $i < $num_rows; $i++)
{
   $row = mysql_fetch_row($results);

if($vbseo_oldurls){
   $url2 = $base."member.php".$memberq.$row[0];    
   $txt .= "<url>
<loc>{$url2}</loc>
<changefreq>{$mchange}</changefreq>
<priority>{$mpriority}</priority>
</url>

";

$counter++;
}

// =================== vBSEO ========================
if($vbseo_installed)
 $url = $base.vbseo_url_member($row[0],$row[1]);
else
 $url = $base."member.php".$memberq.$row[0];    

   $txt .= "<url>
<loc>{$url}</loc>
<changefreq>{$mchange}</changefreq>
<priority>{$mpriority}</priority>
</url>

";

$counter++;
counter();
gzwrite($handle, $txt);
$size+=strlen($txt);
$txt='';

}
}//end of member loop



//close site map file
gzwrite($handle, "</urlset>");
gzclose($handle);

//close index file
fwrite( $multihandle, "</sitemapindex>");
fclose($multihandle);


//****************************************************
//ping Google
if($ping){
$google_url = 'http://www.google.com/webmasters/sitemaps/ping?sitemap=';
$ping_url = rawurlencode( $home . $multifile);

$churl = @fopen($google_url.$ping_url,'r');
($churl) ? $message='<b>Google ping - success</b>. This ping acts as an automated resubmit.': $message='<b>Google ping - failure</b>. Please check configurations. Google may be down - try logging in to <a target="_blank" href="https://www.google.com/webmasters/sitemaps/login">Google Site Maps</a> and resubmitting';

}

//**************************************************************
//report on files written

echo "<font color=red>";
if($ping){
echo"Google has been pinged with the index file location. $message<br /><br />You do not need to have the site index file listed on your account, but if you do, you are able to see the last time that Google uploaded the file via the Google account.";
} else{
echo "Please manually add the site map index file to your Google account.<br /><br />It the file has been changed since last time, Google will revisit the files, but better to manually click on the Google account resubmit link";
}

echo "</font><br /><br />";

?>
<hr /><br />
<a target="_blank" href="<?=$home.$sitemapindex?>">Google site map index file</a> <font color=red><?=$home.$sitemapindex?></font><br /><br /> 
<?=$xtrafilemessage?>
<a target="_blank" href="<?=$home.$file?>">Site map file <?=$numoffiles?></a> <font color=red><?=$home.$file?></font> <br />

<?















//****************************************************
//finish
$countertotal+=$counter;
?>
<br/>
size <?=$size?>, 
number of url's <?=$counter?><br /><br />
finished - <?=$countertotal?> url's<br /><br />
<a href="<?=$_SERVER['PHP_SELF']?>">Recreate files</a>
<?
$counter=0;
footer();
exit;

//****************************************************
function counter(){
global $countertotal,$counter,$size,$handle,$max,$maxsize,$txt,$file1,$file2,$numoffiles,$home,$multihandle,$base;

if($size>=$maxsize or $counter>=$max){

	$a = date("Y-m-d\TH:i:s$timeoffset");

	gzwrite($handle, $txt);
	$size+=strlen($txt);

	echo "size $size, ";
	echo "number of url's $counter<br />";

	$size=0;//cumulative text length of file
	$txt="";

	gzwrite($handle, '</urlset>');
	gzclose($handle);

	$numoffiles++;
	$countertotal+=$counter;
	$counter=0;//number of url's
	
	//new data file
	$file=$file1.$numoffiles.$file2;
	
	if(!file_exists($home.$file)){
		$notopen=1;
	} 
	$handle = gzopen($file, 'w9');
	
	if($notopen==1){
		chmod($file, 0750);
	}
	
?>
<br /><a target="_blank" href="<?=$home.$file?>">Site map file <?=$numoffiles?></a>  <font color=red><?=$home.$file?></font> <br />
<?

	//write file header to new file
	$txt='<?xml version="1.0" encoding="UTF-8"?>';
	$txt.='
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">';

	gzwrite($handle, $txt);
	$size+=strlen($txt);
	$txt='';

	//write new file to sitemap index
	fwrite( $multihandle, "<sitemap>
   <loc>{$home}{$file}</loc>
   <lastmod>$a</lastmod>
</sitemap>
");
	


}
}

//**************************************************************
function head(){

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style TYPE="text/css">
h1,tr,td,ul,li,input{
	font-family:Arial, Helvetica, sans-serif,Tahoma,Geneva;
	font-size:12px;
}

h1{
	margin-bottom:0;
	font-weight:bold;
	color:#993366;
	font-size:16px;
}
</style>

<title>vBulletin Google Sitemap Creator-Time2Dine MarketItOnline</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<body>
<table>
<tr><td>
<form ACTION="<?=$_SERVER['PHP_SELF']?>" METHOD="post">
<h1>vBulletin Google Site Map Creator v1.22 12 July 2005</h1>
by T2DMan - Michael Brandon,<br /><br />
<b>A Google site map is one step:</b>
<ul style="margin:0;">
<li>Make sure you also have your onpage optimization correct, 
<li>and plenty of links - see the <a onmouseover="window.status='http://www.link-vault.com';return true;" onmouseout="window.status=' ';return true;" href="http://www.link-vault.com/?ss=820">Link Vault</a>
<li>see the experts at <a href="http://www.marketitonline.co.nz">MarketItOnline</a>
<li>see <a href="http://forum.time2dine.co.nz/showthread.php?t=3976">vBulletin Google Site Map</a> for script updates</li>
</ul>
<br />
<b>Google Site Maps</b><br />
<a target="_blank" href="https://www.google.com/webmasters/sitemaps/login">Login</a><br />
<a target="_blank" href="https://www.google.com/webmasters/sitemaps/docs/en/about.html">What is Google Site Maps</a><br />
<a target="_blank" href="https://www.google.com/webmasters/sitemaps/docs/en/protocol.html">Google Site Maps Protocol</a><br />
<a target="_blank" href="https://www.google.com/webmasters/sitemaps/stats">Google Site Map Stats</a><br /><br />

<?
}

//**************************************************************
function entry($correct){

?>
<b>Instructions</b><br/>
Please make sure that you have personalized the configuration of this file (directly on the file)<br />
- You can either ping the Google servers with the option below, or manually submit the one site index file after logging in to Google
<br /><br />

<?if(!$correct){?><font color=red><b>Incorrect username/password</b></font><br /><br /><?}?>
Username <input name=username><br /><br />
Password <input name=password type=password><br /><br />
(same as database details)<br /><br />
Ping <input name=ping type=checkbox><br /><br />
<input type=submit value="Create vBulletin Google Site Map">
</form>
<?
footer();
exit;
}

//**************************************************************
function footer(){

?>
</body>
</html>
<?
}

?>
Reply With Quote
  #124  
Old 10-17-2005, 06:18 PM
cynix2 cynix2 is offline
 
Join Date: Apr 2005
Location: Reno, NV
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this:


Replace:
Code:
// root - home page
$http="http://domain.com";
with:
Code:
// root - home page
$http="http://";

Hope that helps.
Reply With Quote
  #125  
Old 10-17-2005, 06:50 PM
Citizen Citizen is offline
 
Join Date: Sep 2005
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works now. Thanks for all the help!
Reply With Quote
  #126  
Old 10-18-2005, 09:16 PM
Mr Chad's Avatar
Mr Chad Mr Chad is offline
 
Join Date: Jul 2005
Posts: 911
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the spiders are seeing this:

/forums/archive/index.php/t-857.html

When it should be this:

/forums/archive/index.php/index.php?t-857.html

what do i need to edit?
Reply With Quote
  #127  
Old 10-19-2005, 05:04 AM
T2DMan T2DMan is offline
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by chatbum
the spiders are seeing this:

/forums/archive/index.php/t-857.html

When it should be this:

/forums/archive/index.php/index.php?t-857.html

what do i need to edit?
In the config options, you will see:
$archiveurl="archive/index.php/";

change it to:
$archiveurl="archive/index.php?";
Reply With Quote
  #128  
Old 10-19-2005, 06:04 AM
Unexplained.tv Unexplained.tv is offline
 
Join Date: Oct 2005
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I don't see this working... I have enterd my username and password from both my Vbulletin admin account and my Database account- nothing works.

What's up with that?
Reply With Quote
  #129  
Old 10-19-2005, 06:27 AM
cynix2 cynix2 is offline
 
Join Date: Apr 2005
Location: Reno, NV
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make sure your version setting is correct.
Reply With Quote
  #130  
Old 10-19-2005, 09:10 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i need help with this

i try to log in it keeps telling me wrong username/password

am inot suppoe to use the username and password from the database? anyone whilling to help me understand and make this work?

Thanks
Reply With Quote
  #131  
Old 10-19-2005, 09:27 PM
Mr Chad's Avatar
Mr Chad Mr Chad is offline
 
Join Date: Jul 2005
Posts: 911
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T2DMan
In the config options, you will see:
$archiveurl="archive/index.php/";

change it to:
$archiveurl="archive/index.php?";
what config options?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06870 seconds
  • Memory Usage 2,360KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete