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.

XMAP plugin has wrong data

More
29 Apr 2014 16:04 #4557 by Thomas Hunziker
They are there, but further down from the other sermons link.

But I think I got the problem now. The plugin doesn't look for the category id at all and shows all sermons for the other link, but it should only show sermons for a specific category there.

Looking at the xmap plugin for com_content, this may become rather tricky to do. Especially if one wants to show sermons from subcategories as well.

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

More
29 Apr 2014 16:21 #4558 by Wijnand
Replied by Wijnand on topic XMAP plugin has wrong data
Well.. if you can show me where I could change this for categories (i don't have subcategories).. that would help me a lot ;-)...

I am a webprogrammer (PHP as mainlanguage), but I am not very good in Joomla ;-).

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

More
29 Apr 2014 17:17 #4559 by Thomas Hunziker
I think the solution is somewhere here: github.com/Bakual/SermonSpeaker/blob/mas...rmonspeaker.php#L140
It sets the model states which are then used during the getItems method. Setting the "category.id" there should filter the list properly. The filter is applied in the model here: github.com/Bakual/SermonSpeaker/blob/mas...els/sermons.php#L122

The category id should be available in the menu item ($parent I think).

I have to try it first, but from looking at the code it should work.
If you figure it out before me, let me know (or do a PR *g*)
The following user(s) said Thank You: Wijnand

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

More
30 Apr 2014 09:15 #4562 by Wijnand
Replied by Wijnand on topic XMAP plugin has wrong data
Yes, I figured it out because of your help.

In getSermonsTree (plugins/xmap/com_sermonspeaker.php) after $model->setState('list.direction', 'ASC'); I put this line of code:

if ($view == 'speaker') {
$model->setState('category.id',$parent->params->data->catid);
}

And in libraries/joomla/registry/registry.php I changed data from protected to public.

That solved the problem. Thanks ;-).

I have another problem.. but now with canonical URL.

The URL: www.preekindex.nl/preken/sermon/736-gees...p-deel-1-jim-cymbala has as canonical url: www.preekindex.nl/preken/sermon/736 (so without the title in the last part. Is there a way to change that? I would love to have the same URL there.

Hope you can help ;-)...

Thanks for now, you helped me a lot!

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

More
30 Apr 2014 09:29 #4563 by Thomas Hunziker
You should not change the libraries B)

Try with
Code:
$parent->params->get('catid')
instead.

As for the canonical URLs, they are generated by the core SEF plugin based on the current URL. I'm not sure how exactly it's done.

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

More
30 Apr 2014 20:58 #4564 by Thomas Hunziker
I had a look for the canonical stuff. I think something changed in Joomla recently related to the routers which caused that issue.

I've made some changes to the component router which will now look up the alias if not present.
I think it should also work for SermonSpeaker 4.x but I'm not sure. You can try it :)

Extract and place the attached file to /components/com_sermonspeaker/router.php, replacing the present file. Make a backup first of course.

File Attachment:

File Name: router_2014-04-30.zip
File Size:1 KB
Attachments:

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

Time to create page: 0.190 seconds
Powered by Kunena Forum