Mercurial > SimpleWebPresenter
comparison sitemap.php @ 67:37dee99c1f8c
Improve documentation
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 11 Oct 2012 22:30:07 +0200 |
| parents | b7efe2ecbc11 |
| children | dd4ddedca4c5 |
comparison
equal
deleted
inserted
replaced
| 66:74f7b64bdb78 | 67:37dee99c1f8c |
|---|---|
| 1 <? | 1 <? |
| 2 /** | 2 /** |
| 3 * @file | 3 * @file |
| 4 * Generates a sitemap | 4 * Generates a sitemap |
| 5 * @todo reuse functionality from InputParser | |
| 5 */ | 6 */ |
| 7 | |
| 8 /// The final output variable | |
| 6 $out = '<?xml version="1.0" encoding="UTF-8"?>'; | 9 $out = '<?xml version="1.0" encoding="UTF-8"?>'; |
| 7 $out .= "\n"; | 10 $out .= "\n"; |
| 8 $out .= '<urlset | 11 $out .= '<urlset |
| 9 xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | 12 xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" |
| 10 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 13 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 11 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 | 14 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 |
| 12 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> | 15 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> |
| 13 '; | 16 '; |
| 14 include_once 'CacheTimeCheck.inc'; | 17 include_once 'CacheTimeCheck.inc'; |
| 15 | 18 |
| 19 /// @cond | |
| 16 $baseDir = dirname(__FILE__); | 20 $baseDir = dirname(__FILE__); |
| 17 $cache = CacheTimeCheck::instance(__FILE__); | 21 $cache = CacheTimeCheck::instance(__FILE__); |
| 18 $cache->includeOnce('common-functions.inc', $baseDir); | 22 $cache->includeOnce('common-functions.inc', $baseDir); |
| 19 | 23 |
| 20 | 24 |
| 21 $cache = CacheTimeCheck::instance(__FILE__); | 25 $cache = CacheTimeCheck::instance(__FILE__); |
| 22 $cache->includeOnce('Options.inc', dirname(__FILE__)); | 26 $cache->includeOnce('Options.inc', dirname(__FILE__)); |
| 27 /// @endcond | |
| 23 | 28 |
| 24 $master = new DOMDocument(); | 29 $master = new DOMDocument(); |
| 25 $master->load("master.xml"); | 30 $master->load("master.xml"); |
| 26 | 31 |
| 27 $options = new Options($master); | 32 $options = new Options($master); |
