Elxis CMS Forum

Extensions => Components => Topic started by: Gashnark on February 25, 2010, 04:18:13

Title: IOS Sitemap mod
Post 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]
Title: Re: IOS Sitemap mod
Post by: datahell on February 25, 2010, 19:47:52
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.
Title: Re: IOS Sitemap mod
Post by: Gashnark on February 26, 2010, 07:40:34
Hello again!
I´m still having the same problem.

My new code:
Code: [Select]
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('/(&amp;)/', '&', $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
Title: Re: IOS Sitemap mod
Post by: Andre on January 27, 2011, 16:40:52
Hello,
I have the same error, How can you solve this problem.
Please help me !!

André
Title: Re: IOS Sitemap mod
Post by: datahell on January 27, 2011, 19:16:20
Have you enabled SEO PRO?
Title: Re: IOS Sitemap mod
Post by: Andre on January 28, 2011, 11:39:31
SEo pro it's htacess and in the elxis configuration I choose him.
The url rewriting works well.I think seo pro is enable
Title: Re: IOS Sitemap mod
Post by: webgift on January 28, 2011, 14:00:15
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.
Title: Re: IOS Sitemap mod
Post by: Andre on January 28, 2011, 14:45:37
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
Title: Re: IOS Sitemap mod
Post by: webgift on January 28, 2011, 16:34:53
Can you please give us a link to test that.
I think that SEO Pro doesn't work.
Title: Re: IOS Sitemap mod
Post by: Andre on January 28, 2011, 17:29:24
Can you pass my url in private message ?
I can't post this on the forum.
Title: Re: IOS Sitemap mod
Post by: webgift on January 28, 2011, 17:30:16
Yes, send me a PM.
Title: Re: IOS Sitemap mod
Post by: Andre on January 31, 2011, 18:36:05
UP

The SEO pro is well install. How Can I Change the name google.xml to sitemap.xml

Thanks !!!
Title: Re: IOS Sitemap mod
Post by: CREATIVE Options on January 31, 2011, 19:03:32
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.
Title: Re: IOS Sitemap mod
Post by: Andre on February 01, 2011, 10:37:50
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.
Title: Re: IOS Sitemap mod
Post by: apkoutsou on February 01, 2011, 11:01:13
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
Title: Re: IOS Sitemap mod
Post by: CREATIVE Options on February 01, 2011, 11:14:07
Also you can submit the sitemap via the Google Webmaster tools and you will be sure that is index.
Title: Re: IOS Sitemap mod
Post by: datahell on February 01, 2011, 14:46:09
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.
Title: Re: IOS Sitemap mod
Post by: Andre on February 01, 2011, 17:01:16
My boss wants changing the name lol. I don't have the choice ...
Title: Re: IOS Sitemap mod
Post by: datahell on February 01, 2011, 18:52:19
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