Sitemap

Discussions and support about the different URL Rewriting techniques for phpBB.

Moderator: Moderators


Sitemap

Postby raptaparty » Fri Jul 10, 2009 6:08 pm

sitemap as this edit for the Ultimate SEO URL phpBB SEO V 0.6.0 in advanced mode?

<?php

// PHPBB 4.0 Sitemap Modification
// Greensboring.com
// Version 4.0 - January 11, 2009


// Enter The Path to Your PHPBB Forum if different then root.
// Example: $path='/forum/';

$path='/';

// Change Nothing Below Here:
// ********************************************************************

$domainpath='http://'.$_SERVER['HTTP_HOST'].$path;

// Connect

define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

include($phpbb_root_path . 'config.' . $phpEx);
include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);

$db = new $sql_db();

$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);

// Send initial Data

echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";

// Send Index

echo '<url>
<loc>'.$domainpath.'</loc>
</url>';


// Send Topics

$sql = 'SELECT * FROM '.$table_prefix.'topics WHERE topic_approved=1 ORDER BY topic_id DESC';
$result = $db->sql_query($sql);
while ($data=mysql_fetch_array($result)) {

echo '<url>
<loc>'.$domainpath.'viewtopic.php?f='.$data['forum_id'].'&amp;t='.$data['topic_id'].'</loc>
</url>';

}

// Send Forums

$sql = 'SELECT * FROM '.$table_prefix.'forums WHERE parent_id!=0';
$result = $db->sql_query($sql);
while ($data=mysql_fetch_array($result)) {

echo '<url>
<loc>'.$domainpath.'viewforum.php?f='.$data['forum_id'].'</loc>
</url>';

}


// Send Closing Tags

echo ' </urlset>';


?>
raptaparty
 
Posts: 3
Joined: Fri Jul 10, 2009 1:35 am

Advertisement

Re: Sitemap

Postby dcz » Sat Jul 11, 2009 12:28 pm

If you want a real sitemap gnerator ready for uge amouts of urls, please use GYM sitemaps & rss, it will auto-dectect your Ultimate SEO URL settings.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: VoilaBot [Bot] and 3 guests


 
cron