Helpful Information
 
 
Category: vBulletin.org Forum
v2 update of .html SE listing hack.

As seen originaly here (http://www.vbulletin.com/forum/showthread.php?s=&threadid=797) for v 1.1x ...

<script language="php">

/*
##############################################################################
# vBulletin Static HTML Creator Version 1.06 #
# Copyright 2000 Paul Pearson wandrer@glcomputers.com #
# Created 6/1/00 Last Modified 6/1/00 #
# Scripts Archive at: http://www.glcomputers.com/Wandrer/ #
##############################################################################
*/

/*
##############################################################################
# Randomize #
##############################################################################
*/

srand((double)microtime()*1000000);

/*
##############################################################################
# Load Required Variables #
##############################################################################
*/

include ("admin/config.php");

$filename_prefix = "topic";
$filename_suffix = ".html";

/*
##############################################################################
# Lets Setup and Connect to the Database #
##############################################################################
*/

$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);

$querythreads = "SELECT threadid FROM thread ORDER BY threadid ASC";
$resultthreads = mysql_query($querythreads,$db);

if (mysql_affected_rows($db)==0) {
echo "No threads";
exit;
}

/*
##############################################################################
# Lets Find the Threads #
##############################################################################
*/

$indexfilename = "index-thread" . $filename_suffix;
$indexpointer = fopen("$indexfilename", "w");

while ($thread_array = mysql_fetch_array($resultthreads)) {

/*
##############################################################################
# Go one-by-one through the thread query #
##############################################################################
*/
$threadfilename = $filename_prefix . $thread_array[threadid] . $filename_suffix;
$filepointer = fopen("$threadfilename", "w");
$filedata = '<!--#include virtual=';
$filedata .= "\"showthread.php?threadid=";
$filedata .= "$thread_array[threadid]" . "\"-->";
fwrite ($filepointer, $filedata);
fwrite ($indexpointer, "<p><a href=\"$threadfilename\">$threadfilename</a></p><br>");
fclose($filepointer);
echo "$thread_array[threadid] completed...<br>";
}
fclose($indexpointer);
exit();

</script>

Can anyone update this to work with v2? This script alone has been getting me 300+ unique visitors a day from the Search Engines(Thank you Wandrer!!) I just tried to update my .html files as i do at the begining of everymonth, but it looks like this dosent work with v2 :) An update would be awesome.

yes an update would be nice :)

i never got the original to work :(

bump? :) I still cant figure out how to get this to work wtih v2.

pretty please :D

Is this the one that creates static html files? i don't think you really want to do this for search engines, there are better ways.

The easyiest way can be found at sitepoint forums. It basically makes it so that www.domain.com/forums/showthread.php/4323 is converted to

www.domain.com/forums/showthread.php?threadid=4323 and search engines do index the former.

Another option is to use an apache re-write. This can be found in the chit chat forum in a thread started by me on apache rewrite. The code you want is the bit posted by fastfoward.

Alternativly, wait until wluke releases his search engine hack (no idea if he has started it yet though). I think he is working on including keyword density, alternative pages for search engines etc so would probably be better but the apache one is probably the best to get you started. INMHO creating static pages is very crude way to do it, server intensive, wastes space and is not dynamically updated.

INMHO creating static pages is very crude way to do it, server intensive, wastes space and is not dynamically updated.


Are we knocking other forum software again? ;)

hehe.. me.. nah one of the people here with no infopop hatred as i never had the "fortune" to use their software.

I think even them would agree that having dynamic pages and static pages at the same time is crude.... oh wait... i forgot about ubb6 :(










privacy (GDPR)