Elxis CMS Forum
Extensions => Components => Topic started by: Gashnark on February 25, 2010, 04:18:13
-
Hi there.
I've questions about the "IOS Sitemap" module.
I need to know how to change the google.xml name to something like sitemap.xml (I think it's more Search Engine Friendly).
I've tried to do it by changing the values named as google.xml andd google*.xml on the SEO Pro File of the sitemap, but when I do that everything becomes broken (If I type sitemap.xml wich is the new SEO name that I've assigned to the xml sitemap the system shows the 404 page of elxis, and if i type google.xml the system shows the /sitemap/ <--- page)
I know how to set the original config, but I need to know how to change the SEO name.
Also I'm attaching a translation to Spanish.
[attachment deleted by admin]
-
Spanish language added on IOS Sitemap v2.2.
The package was updated in EDC (http://www.elxis-downloads.com/com_downloads/site-maps/187.html).
To change the SEO title you have to:
- rename and modify the SEO PRO extension (includes/seopro/com_sitemap.php).
- Edit the component and change SEO PRO name from google(-lang).xml to sitemap(-lang).xml wherever you find it.
-
Hello again!
I´m still having the same problem.
My new code:
if (!isset($vars['task'])) { $vars['task'] = 'sitemap'; }
switch ($vars['task']) {
case 'google': //normally never used;
return $mosConfig_live_site.'/sitemap.xml';
break;
case 'sitemap':
default:
return $mosConfig_live_site.'/sitemap/';
break;
}
}
/********************/
/* RESTORE SEO LINK */
/********************/
function seores_com_sitemap($seolink='', $register_globals=0) {
global $database, $lang;
$seolink = urldecode($seolink);
$seolink = trim(preg_replace('/(&)/', '&', $seolink));
$link = preg_split('/[\?]/', $seolink);
$itemsyn = intval(mosGetParam( $_SESSION, 'itemsyn', 0 ));
$QUERY_STRING = array();
$_GET['option'] = 'com_sitemap';
$_REQUEST['option'] = 'com_sitemap';
$QUERY_STRING[] = 'option=com_sitemap';
$parts = preg_split('/[\/]/', $link[0]);
preg_match('/sitemap\-(.*?)\.xml/', $parts[0], $gmatches);
if ($parts[0] == 'sitemap.xml') {
$_task = 'google';
} else if ($gmatches && isset($gmatches[1]) && ($gmatches[1] != '')) {
$m = htmlspecialchars($gmatches[1]);
$_GET['maplang'] = $m;
$_REQUEST['maplang'] = $m;
$QUERY_STRING[] = 'maplang='.$m;
$_task = 'google';
} else {
$_task = 'sitemap';
}
$_GET['task'] = $_task;
$_REQUEST['task'] = $_task;
$QUERY_STRING[] = 'task='.$_task;
if (!$itemsyn) {
$query = "SELECT id FROM #__menu WHERE link='index.php?option=com_sitemap' AND published='1'"
."\n AND ((language IS NULL) OR (language LIKE '%".$lang."%'))";
$database->setQuery($query, '#__', 1, 0);
$_Itemid = intval($database->loadResult());
} else {
$_Itemid = $itemsyn;
}
$_GET['Itemid'] = $_Itemid;
$_REQUEST['Itemid'] = $_Itemid;
$QUERY_STRING[] = 'Itemid='.$_Itemid;
$qs = '';
if (count($QUERY_STRING) > 0) { $qs = implode('&',$QUERY_STRING); }
if (trim($link[1]) != '') { $qs .= ($qs == '') ? $link[1] : '&'.$link[1]; }
$_SERVER['QUERY_STRING'] = $qs;
$_SERVER['REQUEST_URI'] = ($qs != '') ? '/index.php?'.$qs : '/index.php';
}
If I type in browser sitemap.xml I get an 404 error, If I type in browser google.xml (with this code active) I get the html "Sitemap".
You said I have to rename the SEO PRO extension, did you mean changing com_sitemap.php to something else? or just the content?
Did you also mean that I've to search in every php file of the Sitemap's component for the "google*.xml"?
I cant solve this =S
-
Hello,
I have the same error, How can you solve this problem.
Please help me !!
André
-
Have you enabled SEO PRO?
-
SEo pro it's htacess and in the elxis configuration I choose him.
The url rewriting works well.I think seo pro is enable
-
Testing if you have enabled SEO PRO just click on a linkable title or menu item of your site.
If the url is different with : http:\\www.yourdomain.com\index.php?option=com_frontpage ... then SEO Pro extension works correctly.
-
Ye i have different url :
www.mysite.com/toto-titi
and
www.mysite.com/index.php?option=com_content&task=view&id=29&Itemid=80.
So the url seo pro was properly installed
-
Can you please give us a link to test that.
I think that SEO Pro doesn't work.
-
Can you pass my url in private message ?
I can't post this on the forum.
-
Yes, send me a PM.
-
UP
The SEO pro is well install. How Can I Change the name google.xml to sitemap.xml
Thanks !!!
-
UP
The SEO pro is well install. How Can I Change the name google.xml to sitemap.xml
Thanks !!!
And why to do something like that ?
It is just a name of a file.
-
Because, it's better to make sitemap.xml for google.
It's an old client his first sitempa was indexed withe sitemap.xml, and my boss want to change the name.
-
It doesn't matter for Google. If you change the .xml file name you should declare it to robots.txt also. The default setting for a typical Elxis installation is google.xml
-
Also you can submit the sitemap via the Google Webmaster tools and you will be sure that is index.
-
This is a virtual file (SEO PRO), it does not really exist. To change it you have to modify component sitemap, elxis sef and the sitemap's seo pro extension.
I suggest you to leave it as is.
-
My boss wants changing the name lol. I don't have the choice ...
-
OK then.
Check the following files, search for the string "google.xml" or "google-xxxxx.xml" and replace it with something else (not sitemap.xml as it is the sitemap's seo pro base name, pick something else, i.e., map.xml)
includes/sef.php
includes/seopro/com_sitemap.php