wildorchid wrote:
I love the way Joomla 1.5 displays the content preview in the lightbox.
My question is if I can use this function also on the frontpage instead of normal popup window for example to show a larger image when clicking on a thumbnail included in the page content.
I noticed that there are some extensions for Joomla 1.xx but if Joomla 1.5 has this possibility natively included maybe there is a way to make use of it on the frontpage too?
Anyone has accomplished this or knows where to look?
Thanks for your help.
I finally was able to use the Joomla 1.5 native Lightbox which is called the SueezeBox on the frontpage to display images and also external HTML in an iframe Lightbox.
You need to include media/js/modal.js and media/js/modal.css into the header tags in the index.php of your template.
Code:
<script type="text/javascript" src="media/system/js/modal.js"></script>
Code:
link rel="stylesheet" href="media/system/css/modal.css" type="text/css" />
Next you need to include the following little Javascript to initiate the SqueezeBox:
Code:
<script type="text/javascript">
// <!--
window.addEvent('domready', function() {
SqueezeBox.initialize({});
$$('a.modal').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
SqueezeBox.fromElement(el);
});
});
});
// -->
</script>
Finally to call this Squeezebox for an image use:
Code:
<a [color=red]rel="SqueezeBox"[/color] href="yourimagefolder/yourimage.jpg" title="Your Image Title" [color=red]class="modal"[/color]><img src="yourimagefolder/yourthumbimage.jpg" alt="Imagename" title="Your Image Title" </a>
To call an HTML page into an iframe use:
Code:
<a rel="{handler: 'iframe', size: {x: 800, y: 600}}" href="http://www.domain.com/page.html" class="modal">Testlink</a>
No guarantee that above is 100% correct but it works for me. However if only images need to be displayed in a Lightbox I prefer the script Slimbox from
http://www.digitalia.be. Both Modal and Slimbox seem to be Lightbox2 clones but Slimbox is a smaller and very fast loading Lightbox script that shows the caption of the image plus has additional functionality to display image groups with next-previous buttons. Both make use of the Mootools Framework.
Cheers