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.

Related Sermons slightly options

More
16 Jun 2012 01:52 #2084 by tobisagt
Thank you for your great support so far!

I have another question. I really want to use the "related sermons" module.
Is there any way to add some more details than just the date and title?
Tryed some codestuff with no effect.

I would like to show "hits" and "preacher".

Hits would be great in the other modules also, but its not necessary.

Thank YOu
Tobi

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

More
16 Jun 2012 08:16 #2085 by Thomas Hunziker
Modules are built quite simple. You could change that in your installation.
There are two files involved:
  • /modules/mod_related_sermons/helper.php which contains the database queries and some logic.
  • /modules/mod_related_sermons/tmpl/default.php which contains the (very simple) HTML layout.

To show the hits and speakers you would first need to add those to the SQL query in the helper file. The query for the sermons starts on line #216, the one for articles on line #108.
To get the hits you can just add this line to the sermons and article queries:
Code:
$query->select('a.hits');
To show the speaker you need an additional join like this:
Code:
$query->select('b.name'); $query->leftJoin('#__sermon_speakers AS b ON b.id = a.speaker_id');
For the articles you would probably have to load the author since they don't have a speaker.

The next step is to display the newly acquired infos in the layout. It is basically a HTML file with some PHP tags where dynamic data is displayed.
Code:
<?php echo $item->hits; ?> <?php echo $item->name; ?>
will display the hits and speakername respectively. Add this code where you want it to show :-)

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

More
16 Jun 2012 13:30 #2087 by tobisagt
That works for me! Thank you a lot for your help and your awesome work! :)

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

Time to create page: 0.136 seconds
Powered by Kunena Forum