Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Reply
 
Thread Tools
Forum Site Map for Search Engines Details »»
Forum Site Map for Search Engines
Version: 1.00, by Webdork Webdork is offline
Developer Last Online: Nov 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-03-2002 Last Update: Never Installs: 8
Is in Beta Stage  
No support by the author.

Just a very quick hack that will print a static php page listing your categories and topics.

Search engines like Google wont index a dynamic URL off a dynamic URL so by providing a static page listing your topics dynamic URL's you will get a deeper crawl. I know there are different approaches on this board to optimizing for Google, but try this as well. It works

I then just create a link from the home page to the this file (you should try and name it sitemap.php or something similar.

Please note that I have deliberately not used any vbulletin templates etc... the goal of this page is to be as simple and clean as possible for crawlers like Google and AlltheWeb to index as much as possible.

Example of output here: http://www.sizematters.com.au/forums/sitemap.php

Just cut and paste the code and play. In another version I made it so the first 100 characters of the first post in each topic was created, but I dont think it helps much.

PHP Code:

<?php require('./global.php');

// This file can be saved as any name, but upload to your forum dir.

// Only real variables for you to change. Include the trailing /

$siteurl "http://www.sizematters.com.au/forums";
$sitename "SizeMatters";

// You can safely edit the header and footer as well.

?>

<html>

<head>
<title>SizeMatters Forum Site Map</title>
<meta name="description" content="">
<meta name="keywords" content="">

<style>
<!--
h1           { font-family: Verdana; font-size: 14pt; color: #666666 }
h2           { font-family: Verdana; font-size: 12pt; color: #666666 }
body         { font-family: Verdana; font-size: 8pt; color: #666666 }
p            { font-family: Verdana; font-size: 8pt; color: #666666 }
-->
</style>

</head>

<body>

<?php

echo "\r\n<h1>$sitename Forum Site Map</h1>\r\n";

echo 
"\r\n<p>Click here to return to <a href='$siteurl/'>$sitename</a></p>\r\n";

echo 
"\r\n<h2>$sitename Forum Categories</h2>\r\r\n";

$result mysql_query("SELECT title, forumid, description FROM forum ORDER BY forumid");

echo 
"<b>Number of Forums: </b>".mysql_num_rows($result)."<br><br>\r\n";

while(
$row mysql_fetch_assoc($result))
{
      echo 
"<a href='$siteurl/forumdisplay.php?s=&forumid=".$row["forumid"]."'>".$row["title"]."</a> - ".$row["description"]."<br>\r\n";

}

echo 
"\r\n<h2>$sitename Most Recent Forum Topics</h2>\r\r\n";

$result mysql_query("SELECT title, threadid FROM thread ORDER BY threadid LIMIT 20");

echo 
"<b>20 Most Recent Topics</b><br><br>\r\n";

while(
$row mysql_fetch_assoc($result))
{
      echo 
"<a href='$siteurl/showthread.php?s=&threadid=".$row["threadid"]."'>".$row["title"]."</a><br>\r\n";
      
}

echo 
"\r\n<h2>$sitename Forum Topics</h2>\r\r\n";

$result mysql_query("SELECT title, threadid FROM thread ORDER BY title");

echo 
"<b>Number of Topics: </b>".mysql_num_rows($result)."<br><br>\r\n";

while(
$row mysql_fetch_assoc($result))
{
      echo 
"<a href='$siteurl/showthread.php?s=&threadid=".$row["threadid"]."'>".$row["title"]."</a><br>\r\n";
}

?>

</body>

</html>
If you do make some changes that you think work well - please share

NOTE: This version WILL show contents of private forums if you have them. If you have certain forums you dont want to have their content listed - see the revised code a couple of posts below.

Show Your Support

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

Comments
  #12  
Old 11-04-2002, 08:56 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I suggest you place the php code in a text file, so that it is hidden from unlicensed members, and so that members can download it onto their hard disk. Good idea, btw.
Reply With Quote
  #13  
Old 11-04-2002, 02:53 PM
MaXxed MaXxed is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works well. Thanks!

Max.
Reply With Quote
  #14  
Old 11-04-2002, 06:01 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way with META NAME keywords to force Google not to index the forums, but only to index this file?

Something in the likes of:
META NAME="ROBOTS" CONTENT="INDEX,NOFOLLOW"

and in the normal forums:
META NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW"

or wouldn't that make a difference?

If so, where would I place the META NAME? In the header template?
Reply With Quote
  #15  
Old 11-04-2002, 07:10 PM
Webdork Webdork is offline
 
Join Date: Dec 2001
Location: Melbourne, Australia
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well - you would simply use a robots.txt file - much easier in my opinion, but I would never restrict Google from trying to index anything.
Reply With Quote
  #16  
Old 11-09-2002, 10:40 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What if you have some forums that you still have in your control panel but you have them turned off to not show on your forum. Code still shows them. How to exclude those types of forums from the map?
Reply With Quote
  #17  
Old 11-10-2002, 06:02 PM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great! I have it installed on both of my sites.
Reply With Quote
  #18  
Old 11-18-2002, 04:49 AM
CRego3D CRego3D is offline
 
Join Date: May 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way to make this work off a template ? so we can include $header and $footer ?
Reply With Quote
  #19  
Old 11-23-2002, 07:05 PM
Automated Automated is offline
 
Join Date: Sep 2002
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would i go about making the page adobt the header and footer templates so it looks like a normal page not just a doorway page?

Thanks
Matthew
Reply With Quote
  #20  
Old 11-28-2002, 11:30 PM
Webdork Webdork is offline
 
Join Date: Dec 2001
Location: Melbourne, Australia
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made it deliberately so that you wouldnt have headers and footers - or anything to distract the search engines from their job of indexing

Having said that though a header and footer can EASILY be added. Its just a html file after all. Add your header and footer before and after the php code.
Reply With Quote
  #21  
Old 12-08-2002, 08:45 PM
corn's Avatar
corn corn is offline
 
Join Date: Nov 2001
Location: Holland
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks great man !!
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 01:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06350 seconds
  • Memory Usage 2,309KB
  • 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
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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