File:  [mozdev] / br / www / sitemap.html
Revision 1.52: download - view: text, annotated - select for diffs - revision graph
Thu Feb 5 19:08:14 2015 UTC (2 years, 10 months ago) by hultmann
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

<?php
    if (!defined('PROJECT_PATH')) {
      define('PROJECT_PATH',  realpath('.'));
    }
    require PROJECT_PATH . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR . 'tipreader.php';

    header("Content-type: text/xml; charset=utf-8");

    echo '<?xml version="1.0" encoding="UTF-8"?>';
    echo "\n";
    echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';

    $tip = new TipReader('firefox');
    WriteTipIndex2($tip, 'firefox');


    $tip = new TipReader('thunderbird');
    WriteTipIndex2($tip, 'thunderbird');

    /*
    sitemapItem('drupal/2009/06/firefox-3.5-e-hoje');
    sitemapItem('drupal/2009/04/twitter');
    sitemapItem('drupal/2009/04/uma-visao-do-thunderbird-3');
    sitemapItem('drupal/2008/12/firefox-3.0.5');
    sitemapItem('drupal/2008/11/eula-about-rights');
    sitemapItem('drupal/2008/11/firefox-3.0.4');
    sitemapItem('drupal/2008/11/firefox-3.0.4');
    sitemapItem('drupal/2008/10/flash-10');
    sitemapItem('drupal/2008/10/links-mailto-no-gmail');
    sitemapItem('drupal/2008/09/thunderbird-2.0.0.17');
    sitemapItem('drupal/2008/09/firefox-3.0.3');
    sitemapItem('drupal/2008/09/firefox-2.0.0.17');
    sitemapItem('drupal/2008/09/sunbird-lightning-0-9');
    sitemapItem('drupal/2008/09/firefox-3.0.2');
    sitemapItem('drupal/2008/08/firebug');
    sitemapItem('drupal/2008/07/firefox-3.1-trara-os-codecs-theora-e-vorbis');
    sitemapItem('drupal/2008/07/thunderbird-2.0.0.16');
    sitemapItem('drupal/2008/07/firefox-3.0.1');
    sitemapItem('drupal/2008/07/firefox-2.0.0.16');
    sitemapItem('drupal/2008/07/botoes-do-firefox-3');
    sitemapItem('drupal/2008/07/icp-brasil-deve-ser-adicionado-ao-firefox');
    sitemapItem('drupal/2008/07/firefox-2.0.0.15');
    sitemapItem('drupal/2008/06/as-primeiras-24-horas-do-firefox-3');
    sitemapItem('drupal/2008/06/lancado-o-firefox-3');
    sitemapItem('drupal/2008/06/lembretes');
    sitemapItem('drupal/2008/06/firefox-3-sera-lancado-dia-17');
    sitemapItem('drupal/2008/06/enquete-download-day');
    sitemapItem('drupal/2008/06/firefox-3-rc2');
    sitemapItem('drupal/2008/05/download-day-brasil-quase-em-segundo');
    sitemapItem('drupal/2008/05/firebug-para-firefox-3');
    sitemapItem('drupal/2008/05/download-day');
    sitemapItem('drupal/2008/05/firefox-3-tera-rc2');
    sitemapItem('drupal/2008/05/alem-do-firefox-3');
    sitemapItem('drupal/2008/05/firefox-3-rc1');
    sitemapItem('drupal/2008/05/shredder-alpha-1');
    sitemapItem('drupal/2008/05/firefox-3-e-o-site-da-caixa');
    sitemapItem('drupal/2008/05/firefox-3-rc1-quase-pronto');
    sitemapItem('drupal/2008/05/thunderbird-2.0.0.14');
    sitemapItem('drupal/2008/04/firefox-2.0.0.14');
    sitemapItem('drupal/2008/04/firefox-3-traducao-encerrada');
    sitemapItem('drupal/2008/04/sunbird-lightning-0-8');
    sitemapItem('drupal/2008/04/firefox-3-beta-5');
    sitemapItem('drupal/2008/03/novo-about-mozilla-2');
    sitemapItem('drupal/2008/03/amo-br');
    sitemapItem('drupal/2008/03/about-robots');
    sitemapItem('drupal/2008/03/firefox-2.0.0.13');
    sitemapItem('drupal/2008/03/firefox-3-beta-4');
    sitemapItem('drupal/2008/03/novo-about-mozilla');
    sitemapItem('drupal/2008/02/thunderbird-2.0.0.12');
    sitemapItem('drupal/2008/02/mozilla-messaging');
    sitemapItem('drupal/2008/02/firefox-3-beta-3');
    sitemapItem('drupal/2008/02/firefox-2.0.0.12');
    sitemapItem('drupal/2008/01/mozilla-10-anos');
    sitemapItem('drupal/2008/01/firefox-3-em-portugues');
    sitemapItem('drupal/');
    */


    sitemapItem('firefox/about/mozilla.html');
    sitemapItem('firefox/about/robots.html');

    sitemapItem('contato/');
    sitemapItem('noticias/');
    sitemapItem('bbb/');
    sitemapItem('migre.me/');
    sitemapItem('migre.me/all.html');
    sitemapItem('not-a-dev/');
    sitemapItem('multifox/');
    sitemapItem('multifox/?hl=pt-BR');
    sitemapItem('multifox/all.html');
    sitemapItem('multifox/bugs.html');
    sitemapItem('twitter/');
    sitemapItem('eventos/');

    sitemapItem('projeto/vocesabia.html');
    sitemapItem('projeto/ortografia/');
    sitemapItem('projeto/ortografia/arquivos.html');
    sitemapItem('projeto/vocabulario/');

    sitemapItem('newsletter/arquivo.html');
    sitemapItem('newsletter/21.html');
    sitemapItem('newsletter/22.html');
    sitemapItem('newsletter/23.html');
    sitemapItem('newsletter/24.html');
    sitemapItem('newsletter/25.html');
    sitemapItem('newsletter/26.html');


    sitemapItem('sobre/');
    sitemapItem('sobre/crono/');
    sitemapItem('sobre/midia/');
    sitemapItem('sobre/novidades/');
    sitemapItem('sobre/privacidade.html');

    sitemapItem('MPL/');
    //sitemapItem('MPL/eula-fx2.html');

    sitemapItem('');
    sitemapItem('firefox/download/');
    sitemapItem('ajuda/');
    //sitemapItem('firefox/botoes/');
    sitemapItem('firefox/w3c.html');


    sitemapItem('thunderbird/');
    sitemapItem('thunderbird/download/');
    //sitemapItem('thunderbird/botoes/');
    sitemapItem('thunderbird/ajuda/');

    sitemapItem('thunderbird/ajuda/about.html');
    sitemapItem('thunderbird/ajuda/contact.html');
    sitemapItem('thunderbird/ajuda/documentation.html');
    sitemapItem('thunderbird/ajuda/download.html');
    sitemapItem('thunderbird/ajuda/edit.html');
    sitemapItem('thunderbird/ajuda/extensions.html');
    sitemapItem('thunderbird/ajuda/faq.html');
    sitemapItem('thunderbird/ajuda/features.html');
    sitemapItem('thunderbird/ajuda/keyboard.html');
    sitemapItem('thunderbird/ajuda/mouse.html');
    sitemapItem('thunderbird/ajuda/news.html');
    sitemapItem('thunderbird/ajuda/share_mail.html');
    sitemapItem('thunderbird/ajuda/support.html');
    sitemapItem('thunderbird/ajuda/themes.html');
    sitemapItem('thunderbird/ajuda/tips.html');
    sitemapItem('thunderbird/ajuda/share_mail.html');

    sitemapItem('firefox/ajuda/index-2004.html');
    sitemapItem('firefox/ajuda/bugzilla.html');
    sitemapItem('firefox/ajuda/edit.html');
    sitemapItem('firefox/ajuda/faq.html');
    sitemapItem('firefox/ajuda/keyboard.html');
    sitemapItem('firefox/ajuda/menu.html');
    sitemapItem('firefox/ajuda/mouse.html');
    sitemapItem('firefox/ajuda/options.html');
    sitemapItem('firefox/ajuda/tips.html');

    echo "\n</urlset>";



function sitemapItem($url)
{
    echo "\n<url>";
    echo '';
    echo "\n    <loc>http://br.mozdev.org/";
    echo $url;
    echo "</loc>\n";
    echo '</url>';
}


function WriteTipIndex2($tip, $path)
{
   $allCat = $tip->GetCategories();
   $qty = 0;
   foreach ($allCat as $key => $value) {

      $myTips = $tip->GetTipsFor($key);


      for ($index = 0; $index < count($myTips); $index++) {
         if ($tip->SetTip($myTips[$index]) === false) {
            continue;
         }
         $qty++;
         sitemapItem($path . '/' . $myTips[$index]);
      }

   }
}

?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>