Page 1 of 1
SEF suggestion
Posted: 12 Dec 2008, 11:50
by zorzini
Hi Jan,
I need a little help:
yesterday I created a new image gallery with phoca gallery in a joomla 15 website with all the SEO options ON in Joomla control panel.
Also it seems all works correctly...the only problem is that if I create one category the alias field will remain empty and the links used e.g in an article does not working correctly...
This is not a big problem (I will write the category aliases by hand) but if you have one solution this will be very appreciated.
Thanks for your help.
Eddi
Re: SEF suggestion
Posted: 12 Dec 2008, 20:29
by Jan
Yes, I will change it in new version, so alias should be added autmatically
Jan
Re: SEF suggestion
Posted: 12 Dec 2008, 22:34
by zorzini
Thanks a lot for your answer...
Re: SEF suggestion
Posted: 16 Dec 2008, 18:38
by Jan
ok
Re: SEF suggestion
Posted: 26 Apr 2009, 13:37
by Brujo
Hello, i already installed the 2.2.3 Version of Gallery but my aliases are still empty or only one character in like -
as i wrote in the documentation the alias should be automatically created, but not at my side, i cant also not overwrite or add byself, it juts drops back...
can you give me an hint?
Re: SEF suggestion
Posted: 28 Apr 2009, 18:37
by Jan
Hi, I have tested it on my all test sites, and everythink works OK, maybe there are some problems with iconv, try to change the following function in:
administrator\components\com_phocagallery\helpers\phocagallery.php
line 1152
FROM:
Code: Select all
function getAliasName($name) {
if (function_exists('iconv')) {
$name = preg_replace('~[^\\pL0-9_.]+~u', '-', $name);
$name = trim($name, "-");
$name = iconv("utf-8", "us-ascii//TRANSLIT", $name);
$name = strtolower($name);
$name = preg_replace('~[^-a-z0-9_.]+~', '', $name);
} else {
$name = JFilterOutput::stringURLSafe($name);
if(trim(str_replace('-','',$name)) == '') {
$datenow =& JFactory::getDate();
$name = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
}
}
return $name;
}
TO
Code: Select all
function getAliasName($name) {
$name = JFilterOutput::stringURLSafe($name);
if(trim(str_replace('-','',$name)) == '') {
$datenow =& JFactory::getDate();
$name = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
}
return $name;
}
Jan
Re: SEF suggestion
Posted: 29 Apr 2009, 07:49
by Brujo
thanks Jan, this works perfect for me now.
I did some tests it seems it was this line:
Code: Select all
$name = preg_replace('~[^\\pL0-9_.]+~u', '-', $name);
thanks Brujo