Hi!
Working on my new site and ofcourse using Phoca Gallery again.
I have created a menu link to the gallery and it looks like this (ignore 109.73.233.142/~madonna8/, it is in development):
109.73.233.142/~madonna8/?Itemid=205
I want the link to be this >>>
109.73.233.142/~madonna8/madonna/foto-album
I have enabled SEF URLS in Joomla... but Phoca Gallery makes "strange/ugly", like this for a category:
109.73.233.142/~madonna8/component/phocagallery/category/1-madonnaned
This one needs to be: 109.73.233.142/~madonna8/madonna/foto-album/madonnaned
How do I make this so the Phoca Gallery have SEF urls?!
"Ugly" url, SEF is enabled...
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: "Ugly" url, SEF is enabled...
Hi, which Phoca Gallery version you are running? Are you using the standard SEF? Phoca Gallery does not create menu links nor SEF links, their are created by Joomla! JRoute method. Mostly, such link which is wrong for you is displayed, when the menu link somehow does not work 
See:
https://www.phoca.cz/joomla3demo/category/6-cities
Phoca Gallery gets standard SEF links by Joomla!
See:
https://www.phoca.cz/joomla3demo/category/6-cities
Phoca Gallery gets standard SEF links by Joomla!
If you find Phoca extensions useful, please support the project
-
gjhvs
- Phoca Member

- Posts: 11
- Joined: 28 Apr 2013, 13:56
Re: "Ugly" url, SEF is enabled...
Hi Jan,
Thanks for your answer.
I deleted the component completely, installed again and made a new menu item.
Now it is working, see here 109.73.233.142/~madonna8/madonna/foto-album
One question: if you hit FILMS on this page the link made is this: 109.73.233.142/~madonna8/madonna/foto-album/category/5-films
I would like the word 'category' gone so the URL is 109.73.233.142/~madonna8/madonna/foto-album/5-films
Is that possible?
Thanks for your answer.
I deleted the component completely, installed again and made a new menu item.
Now it is working, see here 109.73.233.142/~madonna8/madonna/foto-album
One question: if you hit FILMS on this page the link made is this: 109.73.233.142/~madonna8/madonna/foto-album/category/5-films
I would like the word 'category' gone so the URL is 109.73.233.142/~madonna8/madonna/foto-album/5-films
Is that possible?
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: "Ugly" url, SEF is enabled...
If you find Phoca extensions useful, please support the project
-
filipetorres
- Phoca Member

- Posts: 15
- Joined: 06 Mar 2013, 06:38
Re: "Ugly" url, SEF is enabled...
Hi Jan,
I'm using an old Joomla 1.5.26 website with Phoca Gallery 2.8.1 and I have the same problem: remove word 'category' from URL.
The website shows this URL: http://www.dbchampions.com.br/fotos/category/48-2014 and I need to change to: http://www.dbchampions.com.br/fotos/48-2014
I try to follow the third tip (3. Changing word "category" to other word in URL (SEF link) of Phoca Gallery (or other Phoca extension)) from tutorial mentioned by you in https://www.phoca.cz/documents/2-phoca-g ... t/511-tips, but with no success.
I changed two methods of the components/com_phocagallery/router.php file:
method PhocaGalleryBuildRoute from:
Code: Select all
if (!empty($segments)) {
foreach ($segments as $k => $v) {
if ($v == 'category') {
$segments[$k] = 'Kategorie';
}
}
}
Code: Select all
if (!empty($segments)) {
foreach ($segments as $k => $v) {
if ($v == 'category') {
$segments[$k] = '';
}
}
}
Code: Select all
case 'category' :Code: Select all
case '' :It seems that this tip works only to change the word 'category', but not to remove it.
How to remove word 'category' from URL?
Thanks in advance.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: "Ugly" url, SEF is enabled...
Hi, there needs to be some word, it cannot be empty as the SEF needs to discover which ID is used (if id of category or if id of image) So every view manage it other way - if you get ID in categories view, it is an ID of category, if you get ID in category view, it is an ID of image and to make it working you need to have some string to detect in which view we are now.
http://www.dbchampions.com.br/fotos/48-2014
the "fotos" is an alias, but SEF system cannot now, if this alias is an alias of category or or image
Jan
http://www.dbchampions.com.br/fotos/48-2014
the "fotos" is an alias, but SEF system cannot now, if this alias is an alias of category or or image
Jan
If you find Phoca extensions useful, please support the project