Differences

This shows you the differences between two versions of the page.

english:other-enhancements:sitemap-xml [2010/07/11 08:44]
Knut Heermann (flip-flop)
english:other-enhancements:sitemap-xml [2018/06/03 18:09] (current)
Line 11: Line 11:
Setting in "CUSTMOM VAR": [true|false] [Category-Link | Article-link] Setting in "CUSTMOM VAR": [true|false] [Category-Link | Article-link]
 +
 +
 +**Update V1.1: 15.07.2010 KH** \\
 +- Small correction in row 102, if "mod_rewrite = 0" the URL was lost in the output.
 +<code php>$_link = PHPWCMS_URL.'index.php?'.($cat_link)?$_CAT['acat_alias']:setGetArticleAid( $data );  // +KH</code>
 +replaced by
 +<code php>$_link = PHPWCMS_URL.'index.php?'.(($cat_link)?$_CAT['acat_alias']:setGetArticleAid( $data ));  // +KH</code>
 +
 +\\
<code php|h sitemap.php |h> <code php|h sitemap.php |h>
Line 36: Line 45:
/* /*
-------------------------------------------------------------------------- --------------------------------------------------------------------------
-+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 114: Line 123:
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 120: Line 129:
} }
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 149: Line 158:
} }
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 162: Line 171:
// 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 183: Line 192:
Forum: [[http://forum.phpwcms.org/viewtopic.php?p=112317#p112317]] Forum: [[http://forum.phpwcms.org/viewtopic.php?p=112317#p112317]]
-Rewriting sitemap output with ##/sitemap.php## for sitemap.xml file. (index.php?alias -> /alias.phtml)+Rewriting sitemap output of ##/sitemap.php## for sitemap.xml file. (index.php?alias -> /alias.phtml)
-Normaly the rewrite to alias.phtml is a htaccess funktion via apache.+Normally the rewriting to alias.phtml is an htaccess funktion via apache.
Patch for sitemap.php: (But only if you are using a standard .htaccess and rewrite to alias.phtml) Patch for sitemap.php: (But only if you are using a standard .htaccess and rewrite to alias.phtml)
english/other-enhancements/sitemap-xml.1278830652.txt.gz · Last modified: 2018/06/03 18:08 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0