- Posts: 7
- Thank you received: 0
Speaker/Series Module Images
12 Sep 2012 16:27 #2517
by Owen
Speaker/Series Module Images was created 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
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.
- Thomas Hunziker
- Offline
- Administrator
12 Sep 2012 18:02 - 12 Sep 2012 18:11 #2518
by Thomas Hunziker
Replied by Thomas Hunziker on topic Speaker/Series Module Images
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:
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:
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
between line #22 and #31.
Code:
<img src="<?php echo $item->pic; ?>">
Code:
<?php if (strpos($item->pic, 'http://') !== 0):
$item->pic = JURI::root().trim($item->pic, ' /');
endif; ?>
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
Code:
$options['text']
Last edit: 12 Sep 2012 18:11 by Thomas Hunziker.
The following user(s) said Thank You: Owen
Please Log in or Create an account to join the conversation.
14 Sep 2012 11:59 #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
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.092 seconds