News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Google Sitemaps

Started by Davilac, June 05, 2005, 10:17:49 AM

Previous topic - Next topic

Harro

I found the line of code where the error is.
But I can't see what's wrong with it:
// + ($modSettings['ob_googlebot_count_most_online'] ? $return['num_spiders'] : 0)
How can I fix it?

jerm

this just creats the xml file correct?
it doesn't automaticly generate a file for us so that we can link it to google?

[Unknown]

Quote from: electrohome88 on June 14, 2005, 01:02:48 AM
this just creats the xml file correct?
it doesn't automaticly generate a file for us so that we can link it to google?

Give Google the link to the script.

-[Unknown]

jerm

ahh okay, the first time i asked it to link sitemap.php it gave me an error.. i just tried again and it worked fine. thanks

bluevoodu

looks good to me.

So only the categories are included with the site map? 
I know if all the posts were there... that would be massive.

thanks unknown!  I appreciate it.  And it works good to boot.

†B†V†
We want you to join:
Chicken Dinner Gaming Community

bluevoodu

#25
I don't know why... but when I submit the file to Google sitemap..... It says it cannot be found.  I triple checked the URL..

Anyone know why?

Also, what all is supposed to be shown by this php file?  It starts to show users, but it doesn't do the whole list of users, just a few.
Are all messages supposed to be there as well?

THanks for your help.
BV
We want you to join:
Chicken Dinner Gaming Community

[Unknown]


Davilac

Works fine, only that only catch dinamic URLs. That could be an improvement if could work with the short urls  ;)

Davilac

I made my modification to fit this what was saying before:

this is the script modified to fit short urls. Just search and replace this piece of code

Quote// Now the boards!
foreach ($boards as $board)
{
   echo '
   <url>
      <loc>', $scripturl, '/board,', $board['id'], '.0.html</loc>
      <lastmod>', posts_max_time($board['times']), '</lastmod>
      <changefreq>', posts_to_freq($board['times']), '</changefreq>
      <priority>', posts_to_priority(0.8, $board['times']), '</priority>
   </url>';
}

// Popular topics too...
foreach ($topics as $topic)
{
   echo '
   <url>
      <loc>', $scripturl, '/topic,', $topic['id'], '.0.html</loc>
      <lastmod>', posts_max_time($topic['times']), '</lastmod>
      <changefreq>', posts_to_freq($topic['times']), '</changefreq>
      <priority>', posts_to_priority(0.7, $board['times']), '</priority>
   </url>';
}

very easy  ;)

Davilac

I also was thinking if could do something like this:

Quote//mi modificación

$identidicador=1;
while ($identificador != 60)
{
   echo '
   <url>
      <loc>', $scripturl, '/topic,', $identificador, '.0.html</loc>
      <lastmod>', posts_max_time($topic['times']), '</lastmod>
      <changefreq>', posts_to_freq($topic['times']), '</changefreq>
      <priority>', posts_to_priority(0.7, $board['times']), '</priority>
   </url>';
   $identificador++;
}

About the topics, the most important for Google. (Don't use directly my code because has a little bug, I only know Java, not PHP  ;))

I see important make a sitemap which had as many topics as we can

bluevoodu

Quote from: [Unknown] on June 17, 2005, 11:21:04 PM
Works fine for me.  I'm using:

http://www.simplemachines.org/community/sitemap.php

-[Unknown]
does the name have to state: sitemap.php ?

mine is:
http://www.egameaddiction.com/forums/smfsmap.php
Its there and works.... but for some odd reason, Google stats that it can't find it

That URL... I copied directly from the google sitemap page.

†B†V†
We want you to join:
Chicken Dinner Gaming Community

Owdy

File name cant be issue.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

bluevoodu

#32
Quote from: Owdy on June 18, 2005, 05:46:45 PM
File name cant be issue.
I figured as all the other sitemap files I worked with had no problem with changing the filename.

I can't figure out why this one is giving me a problem.... or why Google is stating it cannot find it when the link is right.

Edit: I just resubmitted it with a different filename just for curiosity sake.

†B†V†
We want you to join:
Chicken Dinner Gaming Community

bluevoodu

Quote from: Davilac on June 18, 2005, 03:05:56 AM
I made my modification to fit this what was saying before:

this is the script modified to fit short urls. Just search and replace this piece of code

Quote// Now the boards!
foreach ($boards as $board)
{
   echo '
   <url>
      <loc>', $scripturl, '/board,', $board['id'], '.0.html</loc>
      <lastmod>', posts_max_time($board['times']), '</lastmod>
      <changefreq>', posts_to_freq($board['times']), '</changefreq>
      <priority>', posts_to_priority(0.8, $board['times']), '</priority>
   </url>';
}

// Popular topics too...
foreach ($topics as $topic)
{
   echo '
   <url>
      <loc>', $scripturl, '/topic,', $topic['id'], '.0.html</loc>
      <lastmod>', posts_max_time($topic['times']), '</lastmod>
      <changefreq>', posts_to_freq($topic['times']), '</changefreq>
      <priority>', posts_to_priority(0.7, $board['times']), '</priority>
   </url>';
}

very easy  ;)

sorry... not sure I understand, what does this do?

†B†V†
We want you to join:
Chicken Dinner Gaming Community

Davilac

Just a little modifiction to make a sitemap for short url SMF forums

bluevoodu

Quote from: Owdy on June 18, 2005, 05:46:45 PM
File name cant be issue.

I don't know why... but after I changed my filename, they found the submission.

No clue why...

@ Davilac -  thanks for letting me know

BV
We want you to join:
Chicken Dinner Gaming Community

Harro

Here is a sitemap thingy that I'm making right now:
http://harro.sin.khk.be/forums/test.php
Worked yesterday. had over 300 yahoo bots on my forum :D

Skoen

Strange error.

Warning: Cannot modify header information - headers already sent by (output started at /home/nordicra/public_html/forum/Sources/Load.php(1040) : eval()'d code:407) in /home/nordicra/public_html/forum/sitemap.php on line 8

Line 8 is: header('Content-Type: text/plain');

This is with version 1.0.4, language Norwegian, if that means anything.

Someone please help.
Alf Otto 'Skoen' Fagermo
Retired Norwegian translator


[Unknown]

Why is a template or language file even being loaded, and why is it trying to modify the headers?

-[Unknown]

Trekkie101

Google Sitemap Report of todays crawl:
Quote
Denied URLs
We have successfully received your sitemap! However, we found some URLs listed in your sitemap that we cannot accept. The list below is a sampling of the URLs we could not accept, with links that explain the type of error and how to correct it.
URL  Error 
http://www.t101.astahost.com/place/index.php?action=profile;u=19  URL not under sitemap domain 
http://www.t101.astahost.com/place/index.php?action=profile;u=23  URL not under sitemap domain 
http://www.t101.astahost.com/place/index.php?action=profile;u=80  URL not under sitemap domain

It happened before and I just hit re-submit, but it came back.



Advertisement: