NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:andere-erweiterungen:sitemap-xml [2010/06/15 08:50] Knut Heermann (flip-flop) |
deutsch:andere-erweiterungen:sitemap-xml [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Sitemap-XML (Google) ====== | ====== Sitemap-XML (Google) ====== | ||
| - | ===== Multidomain sitemap.php ===== | ||
| - | Erweiterte Version mit festlegbarer Start-ID im Kategoriebaum abhängig vom aktiven Domainnamen. | + | ===== Kategorielink anstatt Artikellink ===== |
| - | <file> | + | Es werden anstatt der Artikellinks die Kategorielinks verwendet. Nur der Kategorielink mit dem aktuellsten Artikeldatum wird verwendet. |
| - | // Aktuelle Struktur ID -> wo soll es losgehen? | + | |
| - | $my_start_id = 22; //default wenn keine Domain angegeben | + | |
| - | // Alle Cat-IDs die permanent ausgeschlossen werden sollen z.B. '4,7,34,9' | + | Einstellung in "CUSTMOM VAR": [true|false] [Kategorie-Link | Artikel-link] |
| - | $_DISABLE_ID = '4,7,34,9'; // Test | + | |
| - | // Start-ID zu Domain zuordnen: Entkommentieren und eintragen | ||
| - | $_DOMAIN_ID = array( | ||
| - | // 'domain1.de' => array( 'ID' => 1 ), | ||
| - | // 'domain2.com' => array( 'ID' => 3 ), | ||
| - | // 'domain3.ch' => array( 'ID' => 11 ), | ||
| - | ); | + | **Update V1.1: 15.07.2010 KH** \\ |
| - | </file> | + | - Kleine Korrektur in Zeile 102, da bei "mod_rewrite = 0" die URL nicht eingefügt wurde. |
| - | + | <code php>$_link = PHPWCMS_URL.'index.php?'.($cat_link)?$_CAT['acat_alias']:setGetArticleAid( $data ); // +KH</code> | |
| - | + | getauscht nach | |
| - | <note tip>**Verfügbar für alle Personen die brauchbare Beiträge, Übersetzungen oder Videos in das wiki schreiben.** //(Alternativ kann auch gespendet werden).//</note> | + | <code php>$_link = PHPWCMS_URL.'index.php?'.(($cat_link)?$_CAT['acat_alias']:setGetArticleAid( $data )); // +KH</code> |
| \\ | \\ | ||
| - | ===== Kategorielink anstatt Artikellink ===== | ||
| - | |||
| - | Es werden anstatt der Artikellinks die Kategorielinks verwendet. Nur der Kategorielinks mit dem aktuellsten Artikeldatum wird verwendet. | ||
| - | |||
| - | Einstellung in "CUSTMOM VAR": [true|false] [Kategorie-Link | Artikel-link] | ||
| <code php|h sitemap.php |h> | <code php|h sitemap.php |h> | ||
| Line 60: | Line 46: | ||
| /* | /* | ||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ||
| - | +KH 15.06.2010 K.Heermann http://planmatrix.de | + | +KH 15.06.2010 K.Heermann http://planmatrix.de Update V1.1 15.07.2010 |
| Using Category links instead of Article Links | Using Category links instead of Article Links | ||
| Switch in CUSTMOM VAR [true|false] [Category-Link | Article-link] | Switch in CUSTMOM VAR [true|false] [Category-Link | Article-link] | ||
| Line 138: | Line 124: | ||
| if(empty($phpwcms['rewrite_url']) || empty($data['article_alias'])) { | if(empty($phpwcms['rewrite_url']) || empty($data['article_alias'])) { | ||
| // $_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data ); | // $_link = PHPWCMS_URL.'index.php?'.setGetArticleAid( $data ); | ||
| - | $_link = PHPWCMS_URL.'index.php?'.($cat_link)?$_CAT['acat_alias']:setGetArticleAid( $data ); // +KH | + | $_link = PHPWCMS_URL.'index.php?'.(($cat_link)?$_CAT['acat_alias']:setGetArticleAid( $data )); // +KH |
| } else { | } else { | ||
| // $_link = PHPWCMS_URL.rawurlencode($data['article_alias']).'.phtml'; | // $_link = PHPWCMS_URL.rawurlencode($data['article_alias']).'.phtml'; | ||
| Line 144: | Line 130: | ||
| } | } | ||
| echo ' <url>'.LF; | echo ' <url>'.LF; | ||
| - | echo ' <loc>'.$_link.'</loc>'.LF; | + | echo ' <loc>'.$_link.'</loc>'.LF; |
| echo ' <lastmod>'.$data["article_tstamp"].'</lastmod>'.LF; | echo ' <lastmod>'.$data["article_tstamp"].'</lastmod>'.LF; | ||
| echo ' </url>'.LF; | echo ' </url>'.LF; | ||
| Line 173: | Line 159: | ||
| } | } | ||
| echo ' <url>'.LF; | echo ' <url>'.LF; | ||
| - | echo ' <loc>'.$_link.'</loc>'.LF; | + | echo ' <loc>'.$_link.'</loc>'.LF; |
| echo ' <lastmod>'.$_lastmod.'</lastmod>'.LF; | echo ' <lastmod>'.$_lastmod.'</lastmod>'.LF; | ||
| echo ' </url>'.LF; | echo ' </url>'.LF; | ||
| Line 186: | Line 172: | ||
| // just return the main URL | // just return the main URL | ||
| echo ' <url>'.LF; | echo ' <url>'.LF; | ||
| - | echo ' <loc>'.PHPWCMS_URL.'</loc>'.LF; | + | echo ' <loc>'.PHPWCMS_URL.'</loc>'.LF; |
| echo ' <lastmod>'.date('Y-m-d').'</lastmod>'.LF; | echo ' <lastmod>'.date('Y-m-d').'</lastmod>'.LF; | ||
| echo ' </url>'.LF; | echo ' </url>'.LF; | ||
| Line 237: | Line 223: | ||
| // ---------------------------------------- | // ---------------------------------------- | ||
| </code> | </code> | ||
| + | |||
| + | \\ | ||
| + | |||
| + | ===== Multidomain sitemap.php ===== | ||
| + | |||
| + | Erweiterte Version mit festlegbarer Start-ID im Kategoriebaum abhängig vom aktiven Domainnamen. | ||
| + | |||
| + | <file> | ||
| + | // Aktuelle Struktur ID -> wo soll es losgehen? | ||
| + | $my_start_id = 22; //default wenn keine Domain angegeben | ||
| + | |||
| + | // Alle Cat-IDs die permanent ausgeschlossen werden sollen z.B. '4,7,34,9' | ||
| + | $_DISABLE_ID = '4,7,34,9'; // Test | ||
| + | |||
| + | // Start-ID zu Domain zuordnen: Entkommentieren und eintragen | ||
| + | $_DOMAIN_ID = array( | ||
| + | |||
| + | // 'domain1.de' => array( 'ID' => 1 ), | ||
| + | // 'domain2.com' => array( 'ID' => 3 ), | ||
| + | // 'domain3.ch' => array( 'ID' => 11 ), | ||
| + | |||
| + | ); | ||
| + | </file> | ||
| + | |||
| + | |||
| + | <note tip>**Verfügbar für alle Personen die brauchbare Beiträge, Übersetzungen oder Videos in das wiki schreiben.** //(Alternativ kann auch gespendet werden).//</note> | ||
| + | |||
| + | \\ | ||
| + | |||