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.
Options

Google sitemaps?

13

Comments

  • Options
    edited December 2006
    Ok here is what i have, however the date does not come out right for some reason :( It is very rough and not even in the forum extension format, but it seems to work for the most part.... PS: My site is http://nightfusion.net/sitemap.xml to see the demo, of course mine is themed, just look at the source code to see it without the theme. __________________________________________________________________________________________________________________________ <?php //Settings //Database Settings $username = "db_username"; $password = "db_password"; $hostname = "localhost"; $database = "db_name"; //Server Settings $server_url = "site_url"; $url_prefix = "discussion/"; $url_suffix = ""; //End Settings //----------------------------------------------------------------------------------- //Database Connection $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db($database,$dbh) or die("Could not select Discussion database"); $result = mysql_query("SELECT DiscussionID, Name, DateLastActive FROM LUM_Discussion"); header("Content-type: text/xml"); $default_sitemap_header = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\"\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">\n\n"; print($default_sitemap_header); //Run the loop while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { echo "\t<url>\n"; echo "\t\t<loc>" . '' . $server_url . $url_prefix . $row{'DiscussionID'} . "/" . $row{'Name'} . $url_suffix . "</loc>\n"; echo "\t\t<lastmod>" . '' . gmdate('Y-m-d\TH:i:s'.'+00:00', $row{'DateLastActive'}) . '' . "</lastmod>\n"; echo "\t\t<changefreq>" . 'always' . "</changefreq>\n"; echo "\t\t<priority>" . '0.5' . "</priority>\n"; echo "\t</url>\n"; } echo "</urlset>"; mysql_close($dbh); ?> ___________________________________________________________________________________________________________ I will update if i get something else done. Note, i have this in the root area of my site, as sitemap.php
  • Options
    also, the name seems to be wrong, apparently the rewrite mod does it like name-part-spaces-like-this. When the database has the spaces like this, name part space like this. any ideas on this?
  • Options
    any update? Mine seems to do the job atm, but its bad at getting the name and date. :(
  • Options
    Havn't been able to spend much work on this--work related deadlines loom until the end of the year :-(

    Its still a priority for me though.
  • Options
    ic ok, sounds good. Can you whisper me what you have so far? Maybe i can help figure something out. Also, i would like to say that phpbb-seo.com has an AMAZING google sitemap setup. it actually creates sitemaps for each category (or forum in phpbb), and then has a Main sitemaps sitemap. The main sitemap is actually a sitemap to the other sitemaps. Check out live on one of my forums... http://www.hyundaituners.com/sitemap.php here is the post about the sitemaps addon for phpbb http://www.phpbb-seo.com/boards/phpbb-seo-mods/mx-google-sitemaps-vt21.html I know you dont have time for anything like this. I just wanted to point it out, incase in the future we can do something more effient for the large forums out there.
  • Options
    I have figured out how to get the names for friendly urls. :-D.
  • Options
    Personally, I find very little use in a sitemap. It only adds to your burden and doesn't increase the ranking of your pages, nor does it stop google from still having to spider the page (and others).

    Why an XML sitemap is BAD
  • Options
    I have to say, I kinda looked at Google Sitemaps when they released it and came away scratching my head thinking "Why bother?"

    Anyone answer that?
  • Options
    edited December 2006
    Well thats fine and good. but some of us want to use the tools Google PROVIDES for our use. They dont make them if they are of any use. At the very least google will find pages it didnt know about before, and have update times, so it can spider the more updated pages faster. The biggest advantage is the fact that you can see the error codes that Google gets with pages. either way, i have this working. I will post it in a few minutes EDIT: Heres teh download link http://www.sportman1280.com/projects/sitemaps/Vanilla%20Sitemaps.zip It is not setup for vanilla extensions yet, so you will have to put the file in your root directory. and then open the file and edit the database configuration to that of your database. I hope that this helps to get the vanilla extension version made faster :-D
  • Options
    Would it not be a big security hole to have this file at the root level containing all of the database details?

    Is there a recommended means of protecting it?
  • Options
    Not all the database details. Just the IDs and titles. Its all public information anyway, save compiled in one place. I suppose some user-agent, or IP checks could be in place. Or you could just give it a random name and then ping the engines--so they only know what it is. ::insert standard disclaimer, 'security-by-obscurity is not really security'::
  • Options
     Quote: WallPhone  Not all the database details. Just the IDs and titles. Its all public information anyway, save compiled in one place.
    Yes sir, ALL the database details in the sitemap.php file...

    //Database Settings
    $username = "franken";
    $password = "stein";
    $hostname = "db222587z.pair.com";
    $database = "franken_vanilla";


    They are all there for the taking.
  • Options
    Personally I've found that when using Google Site Maps, Google neglected a lot of my content on my site!

    Removing the sitemap completely made Google find all of my content on its own.

    I believe using it is counterproductive to getting good page rank since I think Google weighs your content by looking at the sitemap and only puts up content that isn't a duplicate or related. Don't quote me on that but from my experience, if you want google to traverse your entire site and add it to the search engine, don't use sitemap at all. Let google bot do the work.

    ------
    Take a break and enjoy a webcomic!
    nemu*nemu
  • Options
    Can i ask how is it a any different from db.php in the conf folder of vanilla? Im still learning php, so i would like to know the difference, or how it could be more secure.
  • Options
    Good question sportman1280,
    I suppose database.php is not as conspicuous as sitemap.php at the root level and would never appear in the URL field in a browser?

    In short, I don't know, maybe it's not an issue as I now believe (thanks WallPhone), any browsers/robots get the parsed result of the PHP and not the code itself.
  • Options
    so then it should work fine :-D. good.
  • Options
    We have developed one too and we'll be releasing it soon for the vanilla community
  • Options
    any updates on this? im using theversion now that was posted before and it seems to work but a plugin , maybe even with an automatic update once a ay or sth like that would be much better.
  • Options
    i was a bit quick to use this. it does create the sitemap with all urls BUT the urls have one flaw. the plugin adds a "forum" at the end of all urls rendering them useless. so all urls look like http://www.examplesite.com/forum/discussiontitle-forum any fix for this in sight?
  • Options
    Any update on this friends.. something to make sitemaps for google and yahoo?
This discussion has been closed.