Support for SermonSpeaker 4.x is canceled as it is for Joomla 2.5. I will gladly assist you with minor issues but I will not fix any bugs anymore in this releases.
The fix is to upgrade to SermonSpeaker 5.x and Joomla 3.x, which is better anyway.

Keywords/description SEO

More
10 Apr 2012 17:00 - 10 Apr 2012 17:02 #1750 by Thomas Hunziker
If "podcasts" is the active menu item and "informational-podcast" is a sermon, then yes. The "sermon" is the view it will load.

If you look at the file

components/com_sermonspeaker/router.php

you will see two functions: SermonspeakerBuildRoute and SermonspeakerParseRoute.
If you want to change the URL you would have to first change the name of the view around line 8 where it says
Code:
if (isset($query['view'])){ $segments[] = $query['view']; $view = $query['view']; unset($query['view']);
The interesting part is the
Code:
$segments[] = $query['view'];
$segments is the array which will be returned and used to build the URL. If you now extend this single line a bit to something like:
Code:
if ($query['view'] == 'sermon'){ $segments[] = 'information'; } else { $segments[] = $query['view']; }
it would give you an URL with 'information' instead of 'sermon' for a sermon detailpage. All other views would still use the name of the view.
Now we have to tell Joomla what to do if the URL has 'information' in it, so let's modify the SermonspeakerParseRoute function. Here the $segments array is given and we return $vars. The view parameter will be the first segment, since we built it first in the previous function, so we look at $segments[0]. If you look at line #60 you see this code:
Code:
switch ($segments[0]){ case 'series': $vars['view'] = 'series'; break; ... ... case 'sermon': $vars['view'] = 'sermon'; $id = explode(':', $segments[1]); $vars['id'] = (int)$id[0]; break;
You see each view is listed here and threated as needed. The interesting part is on line #81 where the 'sermon' case is. Now you could just change the 'sermon' to 'information' and it would work. However extern links (like google) would break this way. So we just add the 'information' to the 'sermon' case like this:
Code:
case 'sermon': case 'information':
This should work.

Keep in mind that after an SermonSpeaker update, you would have to make this changes again.
Last edit: 10 Apr 2012 17:02 by Thomas Hunziker.

Please Log in or Create an account to join the conversation.

More
13 Apr 2012 13:56 #1773 by caeos
Replied by caeos on topic Re: Keywords/description SEO
thanks for that, i will experiment after plenty of coffee and backups.

Please Log in or Create an account to join the conversation.

More
17 Apr 2012 00:33 #1795 by caeos
Replied by caeos on topic Re: Keywords/description SEO
can i clarify its not

if (isset($query == 'sermon'){
$segments[] = 'information';
} else {
$segments[] = $query;
}

Please Log in or Create an account to join the conversation.

More
17 Apr 2012 08:00 #1798 by Thomas Hunziker
Why would you check with isset if the whole statement is inside an if clause which already checks if these arraykey is set? :)
All we want to do is check if the view is the "sermon" view and threat accordingly.

Please Log in or Create an account to join the conversation.

More
17 Apr 2012 14:15 #1803 by caeos
Replied by caeos on topic Re: Keywords/description SEO
thanks, then i failed ( tried both methods)

Please Log in or Create an account to join the conversation.

More
17 Apr 2012 15:37 #1806 by Thomas Hunziker
hmm, can you send me your router.php to bakual@bakual.ch? Then I can have a look why it doesn't work.

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds
Powered by Kunena Forum