Google Sitmap Problem with "<lastmod>" Date

Support for the phpBB2 SEO mods released in the phpBB2 SEO Toolikt forum.

Moderator: Moderators

Google Sitmap Problem with "<lastmod>" Date

Postby handy1 » Thu Jun 29, 2006 2:52 pm

I get Unix epoch time for the following KB sitemap. When you go to this sitemap the KB articles have the correct <lastmod> data and time. I'm assuming Google won't like this time, which never changes!
Code: Select all
<sitemap>
<loc>http://www.handymanxchange.com/sitemap-kbcat.xml</loc>
<lastmod>1970-01-01T00:00:00+00:00</lastmod>
</sitemap>

Anyone have any fix?

If you need to check it out just click my webpage link and then append sitemaps.xml
handy1
 
Posts: 17
Joined: Wed Jun 28, 2006 1:41 pm
Location: Appleton, WI

Advertisement

Postby dcz » Thu Jun 29, 2006 3:14 pm

Yes I see.

Together with Kb you should be very cautious about security.

You know you need cat and articles to have comments on for this to work.

So looking at the file :

open :


Code: Select all
mx_ggsitemaps/includes/index_kb.php


Find :


Code: Select all
         echo "\t\t" . '<lastmod>' .  gmdate('Y-m-d\TH:i:s'.'+00:00', $last_ever ) . '</lastmod>' . "\n";


Replace with :


Code: Select all
         echo "\t\t" . '<lastmod>' .  gmdate('Y-m-d\TH:i:s'.'+00:00', $last_kb_comment ) . '</lastmod>' . "\n";


and the last comment date for all kb cat should be now used as last mod date, as it should ;)
Last edited by dcz on Thu Jun 29, 2006 9:11 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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby handy1 » Thu Jun 29, 2006 8:11 pm

dcz wrote:Together with Kb you should be very cautious about security.

What do you mean by this? KB together with what sitemaps or phpbb?

I looked for the code to change in sitemap_kb.php, and it wasn't there. I found it in index_kb.php, changed it, and it seemed to work!

Thanks again!
handy1
 
Posts: 17
Joined: Wed Jun 28, 2006 1:41 pm
Location: Appleton, WI

Postby dcz » Thu Jun 29, 2006 8:44 pm

handy1 wrote:
dcz wrote:Together with Kb you should be very cautious about security.

What do you mean by this? KB together with what sitemaps or phpbb?

The mod itself ;) please read this and this.

Here are some more general advises about security.

Adding .htaccess with
Code: Select all
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>


in it in every includes/ db/ and other module's includes folders for those running Apache is a wise advise as well.

As well Options -Indexes can be cool in the root's .htaccess.

For those lucky enough to run a single ip :

Code: Select all
Satisfy any
Order Deny,Allow
Allow from xxx.xxx.xxx.xxx
Deny from all


where xxx.xxx.xxx.xxx is your ip (can be a list)

handy1 wrote:I looked for the code to change in sitemap_kb.php, and it wasn't there. I found it in index_kb.php, changed it, and it seemed to work!

Thanks again!


Oups I meant index_kb.php you are right ;)

I edited my first post :D

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


Return to phpBB2 SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest


 
cron