vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   v2 update of .html SE listing hack. (https://vborg.vbsupport.ru/showthread.php?t=10368)

Joe 03-03-2001 07:20 PM

As seen originaly here for v 1.1x ...

Code:

<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.

03-03-2001 07:33 PM

yes an update would be nice :)

i never got the original to work :(

03-05-2001 12:35 AM

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

03-05-2001 07:56 AM

pretty please :D

03-06-2001 02:12 PM

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

http://www.domain.com/forums/showthr...?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.

03-06-2001 02:38 PM

Quote:

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? ;)

03-06-2001 07:28 PM

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 :(


All times are GMT. The time now is 08:57 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.01044 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete