[Archive] mx Google Sitemaps 1.0.1

The GYM Sitemaps and RSS module and it's plug-ins.
Google Yahoo MSN Sitemaps (United 0.9).
RSS 2.0 Feeds and Yahoo! urllist.txt.

Moderator: Moderators

Postby MaestroX » Sat Aug 12, 2006 5:03 pm

ok, the box is one as well as the header and footer, check here:

http://www.music-web.org/sitemap.php
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Advertisement

Postby dcz » Sat Aug 12, 2006 5:14 pm

which fix worked for the empty message ?

Now the weird thing is that you miss the xml header and footer.

Have you edited the sitemap.php file ?

$I_header and $I_footer should be set in it, and then outputted before and after the content we see.

Make sure you have the original code for this ones, because, they are inserted correctly in the other maps.

++
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby MaestroX » Sat Aug 12, 2006 5:19 pm

I removed this:



// Never know who might have tricked us ;-)
else
{
mx_sitemaps_message_die(GENERAL_MESSAGE, 'Invalid request');

}



i thought putting my sitemap.php here would help:
Code: Select all
<?php
/***************************************************************************
*                             sitemap.php
*                            -------------------
*   begin                : Saturday, Feb 20, 2006
*   copyright            : (C) dcz
*   Contact              : www.phpbb-seo.com
*
*   $Id: sitemap.php, v1.0.1 2006/06/14 18:05:13 fds Exp $
*
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

//mxBB PORTAL
// YOU SHOULD SET HERE THE CORRECT PATH IN CASE YOUR PORTAL IN INSTALLED
// IN A SUB FOLDER (STARTING FROM ROOT E.G. 'mxBB/')
$mx_root_path = '';


   define('IN_PHPBB', true);
   $phpbb = TRUE;
   // YOU HAVE TO SET THE CORRECT PATH FOR PHPBB IF YOU WANT
   // TO USE THIS  SITEMAP SYSTEM OUTSIDE OF THE PHPBB FOLDER
   // AND TO LOOK AT LINE 72 too ;-)
   $mx_root_path = $module_root_path2 = $module_root_path = $phpbb_root_path = '';
   include($phpbb_root_path . 'extension.inc');
   include($phpbb_root_path . 'common.'.$phpEx);
   // Start session management
   $userdata = session_pagestart($user_ip, PAGE_INDEX);
   init_userprefs($userdata);


// Good old heavy method. Do this here to allow for sitemap installation at the server root level
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$server_name = trim($board_config['server_name']);
$server_protocol = 'http://'; // No https here, since it's ment for google Bots
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) . '/' : '/';
$root_url = $server_protocol . $server_name . $server_port;
$server_url = $root_url . $script_name;
if(substr($server_url, -1, 1) != "/")
{
   $server_url .= "/";
}

// Comment this line if you put your sitemap in the root folder
// and phpbb installed in a subfolder.
$root_url = ($phpbb) ? $server_url : $root_url;


//
// Include common module stuff...
//
include($module_root_path . 'mx_ggsitemaps/includes/common_GGsitemaps.' . $phpEx);


// Grab ggsitemaps config
$sql = "SELECT * FROM " . GGSITEMAP_TABLE;
if( !$result = $db->sql_query($sql) )
{
   mx_sitemaps_message_die(GENERAL_ERROR, "Couldn't get Google sitemaps config information", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
   $ggsitemap_config[$row['config_name']] = $row['config_value'];
}
// Even this is too much to stay for nothing
$db->sql_freeresult($result);

// Set some usefull vars
$sql_limit = $ggsitemap_config['sitemap_sql_limit'];
$url_limit = $ggsitemap_config['sitemap_url_limit'];
$sitemap_ver = $ggsitemap_config['sitemap_ver'];
$C_info = $ggsitemap_config['sitemap_c_info'];
$Rewrite_sitemap = ( $ggsitemap_config['sitemap_rewrited'] == "TRUE" ) ? TRUE : FALSE;
$is_index = false;
$started = false;
$query_ok = TRUE;

// Since echo is the fast way here, let's define headers and footers
// Those are inteded to allow validation
//Sitemaps
// DO NOT REMOVE (C) INFOS !!!
$S_header = '<?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">
<!--   Generated by mx Google Sitemaps ' . $sitemap_ver . ' - ' . $C_info . ' -->' . "\n";
$S_footer = '</urlset>';
//Sitemap index
// DO NOT REMOVE (C) INFOS !!!
$I_header = '<?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">
<!--   Generated by mx Google Sitemaps ' . $sitemap_ver . ' - ' . $C_info . ' -->' . "\n";
$I_footer = '</sitemapindex>';

// Load sitemaps, I know this mean that all module are included here
// even if they end not being asked for, but what is the cost of
// even a dozen $_GET performed in several includes for a page that's
// not supposed to be even loaded ten times a day?
$location = $module_root_path . 'mx_ggsitemaps/includes';

$dir = @opendir( $location );

while( $file = @readdir($dir) )
{
   if( preg_match("/^sitemap_.*?\." . $phpEx . "$/", $file) )
   {
      include_once($location . '/' . $file);
   }
}
@closedir($dir);

// Check if nobody tricked us
if ($started)
{
   mx_sitemaps_redirect(append_sid("index.$phpEx"));
}
// Nothing matched so it's an index
elseif (!$started)
{
   $is_index = true;

   // Load sitemap index
   $dir = @opendir( $location );

   while( $file = @readdir($dir) )
   {
      if( preg_match("/^index_.*?\." . $phpEx . "$/", $file) )
      {
         include_once($location . '/' . $file);
      }
   }
   @closedir($dir);
}
// End output if necessary
if ($started)
{
   echo $I_footer;
   exit;
}

?>
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Postby dcz » Sat Aug 12, 2006 5:25 pm

All right so it seems your settings does not allow these var to be passed this way.

Please change this :
Code: Select all
elseif (!$started)
{
   $is_index = true;

   // Load sitemap index
   $dir = @opendir( $location );

   while( $file = @readdir($dir) )
   {
      if( preg_match("/^index_.*?\." . $phpEx . "$/", $file) )
      {
         include_once($location . '/' . $file);
      }
   }
   @closedir($dir);
}
// End output if necessary
if ($started)
{
   echo $I_footer;
   exit;
}



to


Code: Select all
elseif (!$started)
{
   $is_index = true;
   header("Content-type: text/xml");
   echo $I_header;
   // Load sitemap index
   $dir = @opendir( $location );

   while( $file = @readdir($dir) )
   {
      if( preg_match("/^index_.*?\." . $phpEx . "$/", $file) )
      {
         include_once($location . '/' . $file);
      }
   }
   @closedir($dir);
}
// End output if necessary
if ($is_index)
{
   echo $I_footer;
   exit;
}


in this piece of code and then delete this part form index_forum.php.

Code: Select all
   //Output start if necessary
   if (!$started)
   {
      header("Content-type: text/xml");
      $started = true;
      echo $I_header;
   }


which seems to be useless in your case for some obscure reasons (the var is set, it's just an include in between ...)

The next version will not use the same method as this one for this part ;)

++
Last edited by dcz on Sat Aug 12, 2006 6:48 pm, edited 1 time in total.
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby MaestroX » Sat Aug 12, 2006 5:35 pm

great, fixed!!!

works perfectly now:
http://www.music-web.org/sitemap.php

Now just the mod rewrite settings?
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Postby dcz » Sat Aug 12, 2006 5:50 pm

yes.

The problem with this mod, now that I look at it further, is that it's not designed in a universal way.

There is no filtering function in the mod, the one that transform titles in something that can be injected in URLs, here every thing is coded in append_sid.

The thing is, it's no handy nor efficient at all to go through such method while outputing up to 50 000 URLs, you need to go rather straight forward in this case.

I'll have to build up a function repdroducing the steps performed in happend_sid, but it will work ;)

++
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby dcz » Sat Aug 12, 2006 6:04 pm

PMed ;)
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby MaestroX » Mon Aug 14, 2006 8:37 am

I have a wiki installed on my board. I am using the mx_Google_Sitemap_txt_plugin for yor sitemap mod. Would this url be sufficent for dirrecting google to index my wiki:

http://www.music-web.org/wiki/*.*

Thanks
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Postby dcz » Mon Aug 14, 2006 9:25 am

Nope, you need to list true URLs in there.

That's why I talked about sitespider to build the list.

++
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby MaestroX » Mon Aug 14, 2006 4:17 pm

could you explain more please
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Postby dcz » Mon Aug 14, 2006 4:25 pm

At the end of this post
there is a dl link to sitespider.

This is just a bot that will crawl your site after you'll have set it up correctly, take a look at the help files, it's rather simple to use.

Don't forget to basically repeat the robots.txt exclusion in it, as well you can narrow the crawl to a single folder.

Then, it will output a txt file with your url list in it you'll just have to rename to url_list.txt and upload to the mx_ggsitemaps/includes folder.

A wise thing is to look at the list before sending it, just in case some URLs that should not be there are not listed.

As well, try the output Google sitemaps side.

I'll soon provide even better solutions to list extra content, in all case remember the listed url in the Google sitemap must not be located in a folder being above the sitemap.php file one.

++
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby MaestroX » Mon Aug 14, 2006 8:54 pm

Thanks for helping me out, but i'm having some trouble.

it's rather simple to use.


I'm a dumbass ok!

lol, well i use the deault setting to see if it works, i press the icon on my desktop, then nothing. Egg timer goes round a bit but no output url.
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Postby dcz » Tue Aug 15, 2006 8:42 am

No you are not.

Please start a new topic if needed though, in the robots forum as we are attempting to crawl a web site.

Upon install you should have two new folders : C:\WorldWideWeb-X.com and C:\Program Files\WorldWideWeb-X.com\SiteSpider

In the first one you have SiteSpider.xml in which you should add your settings, in the second one, you'll find the output and SiteSpiderDoc.rtf which will help you out as well.

Then, the software is really basic, no user interface, once you lunch it, it only appears int he task list, you can open up the progress.txt from time to time during the crawl to see it going forward. Once done, there should be a NumUnspidered = 0 in it, and the sitespider program do not show up any more in the task list.

This post is in french, but there is a sample config file that can help you out a bit.

++
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

Postby MaestroX » Tue Aug 15, 2006 10:42 am

well i double click on it, i see it going into the prcoesses (ALT-CTRL-DEL) but then it dissappears a second afterwards.

Thanks for your help
MaestroX
 
Posts: 39
Joined: Sat Aug 12, 2006 12:03 pm

Postby dcz » Tue Aug 15, 2006 1:48 pm

dcz wrote:Please start a new topic if needed though, in the robots forum as we are attempting to crawl a web site.


Please do ;)
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: 21398
Joined: Fri Apr 28, 2006 9:03 pm

PreviousNext

Return to GYM Sitemaps phpBB2

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest