Logo of SermonSpeaker Extension Claim

Login Form

Speaker/Series Module Images

More
6 years 3 months ago #2517 by Owen
Hi Thomas, Thank you for this brilliant package!

One thing I'm trying to work out is how to display the series images in the module instead of just the title. I know it show in the tooltip but it would be nice to show in the module itself without having to hover over.

I know it should be a fairly simple edit (as the function is already being called in the tooltip)

Let me know if you need more details.

Thanks.

Owen

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

More
6 years 3 months ago - 6 years 3 months ago #2518 by Thomas Hunziker
The picture is stored in the property "$item->pic". The path is stored relative to your Joomla root. That means it should work if you use this code:
<img src="<?php echo $item->pic; ?>">
To be safe on every server variation you can add the root to the path, making it an absolute URL. Since the picture could also be an extern file not on the same server, this needs a bit more logic. I'm usually testing the property if it starts with "http://" which would mean it's already an absolute URL:
<?php if (strpos($item->pic, 'http://') !== 0):
  $item->pic = JURI::root().trim($item->pic, ' /');
endif; ?>
Of course you need to do this before you use the property in the <img> tag :-)

Now if you don't want to use the tooltip, you add this code around line #34 where it's just basic HTML.
If you still want to use the tooltip, you need to edit the "$options" array. The 'text' is the stuff that gets displayed on the page itself. In the module it's just the series title ($item->title).
You can also set the value using
$options['text']
between line #22 and #31.

Feel free to rate SermonSpeaker on JED .
Useful documentation for beginners: First Steps & FAQ
How to say "Thank You!": Contribute or support using the Donate button at the bottom of each page.
Last edit: 6 years 3 months ago by Thomas Hunziker.
The following user(s) said Thank You: Owen

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

More
6 years 2 months ago #2523 by Owen
Replied by Owen on topic Speaker/Series Module Images
Absolutely brilliant!

Thanks for your help Thomas. Great package and amazing support.

All the best.

Owen

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

Time to create page: 0.118 seconds
Powered by Kunena Forum