| Author |
Message |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Tue Apr 14, 2009 7:58 pm |
|
Can't vouch for that validation link, but when I log into Google I see that my sitemap is showing as valid...
That isn't my Google site map link. Mine is:
http://montegoscripts.com/modules.php?name=Sitemap&op=Google
That one is showing as valid in Google. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Testy1
Newbie


Joined: Jan 06, 2009
Posts: 17
|
Posted:
Mon Apr 20, 2009 10:58 pm |
|
I had let this go for a while but got an idea this morning.Any thoughts on this approach........
Original Code:
| Code: |
if ( $xml ) {
//XML-Output
@f write( $var, " <url><loc>$nukeurl/modules.php?name=Content&pa=list_pages_categories&cid=$cid20</loc><changefreq>daily</changefreq></url>\n" );
}
|
Replacement Code:
| Code: |
if ( $xml ) {
global $tnsl_bUseShortLinks, $tnsl_bAutoTapBlocks, $tnsl_bAutoTapLinks, $tnsl_bDebugShortLinks, $tnsl_sGTFilePath;
if ( defined('TNSL_USE_SHORTLINKS') ) {
$string = 'modules.php?name=Content&pa=list_pages_categories&cid=';
$patterns[0] = '/modules.php\?name=Content&pa=list_pages_categories&cid=/';
$replacements[0] = 'content-cat-';
$writeto = preg_replace( $patterns, $replacements, $string );
@f write( $var, " <url><loc>$nukeurl/$writeto$cid20.html</loc><changefreq>daily</changefreq></url>\n" );
} else {
@f write( $var, " <url><loc>$nukeurl/modules.php?name=Content&pa=list_pages_categories&cid=$cid20</loc><changefreq>daily</changefreq></url>\n" );
}
}
|
|
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Tue Apr 21, 2009 8:52 am |
|
I don't see how this really helps you to be quite honest. You might as well do the if (defined()) and then just hard code the links. Its pretty much what you are doing anyways with that code, but why add more processing time to do the preg_replace? |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Testy1
Newbie


Joined: Jan 06, 2009
Posts: 17
|
Posted:
Tue Apr 21, 2009 6:06 pm |
|
do you mean hard code as in.....
| Code: |
@f write( $var, " <url><loc>$nukeurl/content-cat-$cid20.html</loc>
|
mmmm makes more sense, Ill try that.But I sill cant make up my mind which sitemap to use lol, do you have and code for that  |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Tue Apr 21, 2009 8:02 pm |
|
Yes, I believe nukeSEO already is ShortLinks enabled. I have all of the nukeSEO core modules taps done. If you create additional content classes to add to the sitemap, you'll have plenty of samples to work from to also "tap" them. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
|
|