Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Sitemaps

2

Comments

  • so any ideas?
  • You should Google for "robots.txt".

    It's a text file that all search engine spiders will look for in the root of your website.

    So if your domain is http://www.londonfgss.com/ (it isn't, that's mine), then Google, Yahoo, MSN, etc are all looking for http://www.londonfgss.com/robots.txt

    If you visit that file on my domain (the link above), then you will see that there the robots.txt file contains a line that points the search engine spiders to the Sitemap file that we create.

    That's how the search engine spiders find the sitemap and know the URL's to crawl.
  • hi David,

    cool extension. But I've a little problem with generating dynamic URLs (static links are ok).
    Everytime I want to generate the sitemap the following error appears:

    Error Message
    An error occurred while attempting to retrieve the Users.
    Affected Elements
    Sitemaps.GetUsers();

    The error occurred on or near: Unknown column 'u.lum_DateLastActive' in 'field list'

    I guess it's a problem with a database connection, but I've no idea what or where to change this ;)

    hope you, or somebody else, could help me...
    thanks!
  • Hmm, what version of Vanilla are you using?
  • I'm using v1.1.2
    But I've added some stuff for connecting Vanilla to my CMS
    http://modxcms.com/forums/index.php/topic,14109.msg99816.html#msg99816

    This script just adds some CMS specific variables for the user management.
  • DavidK, thank you very much for your help. Works now !
  • I've just checked my "Google tools for webmasters" account and there seems to be some errors that I cannot figure out.

    This is the message I get from https://www.google.com/webmasters/tools/sitemap?sitemapUrl=... : (do you have any clue of how to fix them?)

    Sitemap warnings for http://pignonfixe.com/forum/extension.php?PostBackAction=sitemap.xml
    This Sitemap has the following warnings. These warnings will not prevent normal processing of your Sitemap or crawling of your site. However, we encourage you to investigate and fix these issues within your site. [?]

    Warnings
    Line:
    59
    Invalid date
    An invalid date was found. Please fix the date or formatting before resubmitting. [?] Parent tag:
    Tag:
    Value:
    Date found: url
    lastmod
    c
    Sep 10, 2007
  • Hi, I have this error when trying to reach sitemap.xml : Fatal error: Non-static method Sitemaps::RenderUrlNode() cannot be called statically in d:\www\mydomain.fr\htdocs\forum\extensions\Sitemaps\default.php on line 145 The line145 is : echo RenderUrlNode($customUrl[0], $customUrl[1], $customUrl[2], $customUrl[3]);
  • nice addons, just want to add.

    I'm using vanilla 1.1.3 and this addons needs few tweaking before you can "safely" used it. Literally, it doesn't work out of the box.

    Follow my instruction. The first thing you should do before you enabling this "sitemaps addons" is to created a "robots.txt" and placed it in your root directory. add the the following code inside the robots.txt
    #sitemaps Sitemap: http://blog.kaizeku.com/extension.php?PostBackAction=sitemap.xml
    obviously you'll need to changed the url with your website url.

    next, open ../extensions/Sitemaps/default.php
    find on line 46
    $customUrls = array( array('http://www.londonfgss.com/', date('Y-m-d H:i:s', mktime()), 'hourly', 1.0), array('http://www.londonfgss.com/discussions/', date('Y-m-d H:i:s', mktime()), 'hourly', 0.8), array('http://www.londonfgss.com/categories/'), array('http://www.londonfgss.com/categories/1/'), array('http://www.londonfgss.com/categories/2/'), array('http://www.londonfgss.com/categories/3/'), array('http://www.londonfgss.com/categories/4/'), array('http://www.londonfgss.com/categories/5/'), array('http://www.londonfgss.com/categories/6/'), array('http://www.londonfgss.com/categories/7/'), array('http://www.londonfgss.com/categories/8/'), array('http://www.londonfgss.com/page/Links/'), array('http://www.londonfgss.com/extension.php?PostBackAction=GoogleMapDirectory'), );

    replace it with
    $customUrls = array( array($this->Context->Configuration['BASE_URL'], date('Y-m-d H:i:s', mktime()), 'hourly', 1.0), array($this->Context->Configuration['BASE_URL'].'discussions/', date('Y-m-d H:i:s', mktime()), 'hourly', 0.8), array($this->Context->Configuration['BASE_URL'].'categories/'), array($this->Context->Configuration['BASE_URL'].'categories/1/'), array($this->Context->Configuration['BASE_URL'].'categories/2/'), array($this->Context->Configuration['BASE_URL'].'categories/3/'), array($this->Context->Configuration['BASE_URL'].'categories/4/'), array($this->Context->Configuration['BASE_URL'].'categories/5/'), array($this->Context->Configuration['BASE_URL'].'categories/6/'), array($this->Context->Configuration['BASE_URL'].'categories/7/'), array($this->Context->Configuration['BASE_URL'].'categories/8/'), array($this->Context->Configuration['BASE_URL'].'page/Links/'), array($this->Context->Configuration['BASE_URL'].'extension.php?PostBackAction=GoogleMapDirectory'), );

    Still in the same files. on line 127
    find
    echo "<?xml version='1.0' encoding='UTF-8'?>\n<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>\n";
    add before
    header('Content-Type: text/xml');


    Lastly on line 229
    Find
    if ($Context->SelfUrl == 'extension.php' && $PostBackAction == 'sitemap.xml') {

    Replace with
    if ($Context->SelfUrl == 'extension.php' && $_GET['PostBackAction'] == 'sitemap.xml') {

    thats all, open your Settings CP > extensions >sitemaps and activated it the sitemaps and double check your sitemap http://www.mywebsite.com/extension.php?PostBackAction=sitemap.xml


    hope somebody might find this post useful.
  • Hello

    We want to use this plug-in on vanilla 1.1.4. Has anyone used it?

    Further, our forum is a subdirectory on a root which is a wordpress installation with already a sitemap plugin installed.

    would this interfere with the existing sitemap?
  • Chaoskaizer, thanks for your instruction.
  • Does it work with friendly urls?
  • Has anyone got this to work with php4? I have not tried yet. I was just checking.
  • Okay, I was able to get this work on PHP4 and Vanilla 1.1.4

    This is what I had to do.

    Change everywhere there is a date('c' to date('Y-m-d'

    Follow the steps here from above chaoskaizer Sitemaps # 30

    however, you don't need these two lines unless you have these pages or extensions installed.
    <strike> array($this->Context->Configuration['BASE_URL'].'page/Links/'), array($this->Context->Configuration['BASE_URL'].'extension.php?PostBackAction=GoogleMapDirectory'), </strike>
    Instead of the above directions do this:
    On Line 229, Change this
    if ($Context->SelfUrl == 'extension.php' AND ForceIncomingString('PostBackAction','') == 'sitemap.xml'){

    Now, for those of you who use a forum in a subdirectory,

    I recommend you read: http://sitemaps.org/protocol.php#index
    Basically, you have a sitemap index file on your webserver root, This sitemap index file then will direct the search engine to the various sitemaps you might have in different directories.

    Another FYI: Sitemaps can only contain 50,000 URL's and be a max size of 10MB. http://sitemaps.org/faq.php#faq_sitemap_size
  • I noticed that discussions that are marked as members only are showing up in my sitemap. How do I change the $sql->AddWhere clause to only have discussions that are public?
  • I think it must be useful to write Sitemap generated by this addon into .xml file using Cron.
    I tried to do this by following cron record every hour:
    php /path/to/vanillainru/www/extension.php?PostBackAction=sitemap.xml >/path/to/vanillainru/www/sitemap.xml

    sitemap.xml generates but it's 0 bytes empty file.
    What am I doing wrong?

    -------------------------------
    Russian Vanilla community
  • @RusCom: Couldn't you just use mod rewrite or htaccess rules to handle that?
  • Yeah, right. I made it using rewrite rule, thanks.
  • Can you tell me the exact path to add this sitemap to google coz its give me an error regarding the path
  • Mmmm, any clues on how to implement that rewrite rule, RusCom? Thanks...
Sign In or Register to comment.