It is currently Fri Sep 05, 2008 4:25 pm
Moderator: General Support Moderators

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.
<rel="lightbox"><a rel="lightbox" href=''></a>
AMCAD wrote:
Hey wildorchid,
I went to the actual Lightbox2 site (http://www.huddletogether.com/projects/lightbox2/) and got the code from there. I downloaded the files and followed everything step-by-step. Put the links to the different JavaScript files directly into your index.php (i put them at the end of the Head section).
This will enable all pictures to be viewed in lightbox as long as you link the thumbnail to a larger picture and putin your tag. So like
- Code: Select all
<rel="lightbox">
- Code: Select all
<a rel="lightbox" href=''></a>
Good luck!


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.
<script type="text/javascript" src="media/system/js/modal.js"></script>link rel="stylesheet" href="media/system/css/modal.css" type="text/css" /><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><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><a rel="{handler: 'iframe', size: {x: 800, y: 600}}" href="http://www.domain.com/page.html" class="modal">Testlink</a>
wildorchid wrote: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: Select all
<script type="text/javascript" src="media/system/js/modal.js"></script>
- Code: Select all
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: Select all
<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: Select all
<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: Select all
<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

<script type="text/javascript" src="media/system/js/mootools.js"></script>
<script type="text/javascript" src="media/system/js/modal.js"></script>
<link rel="stylesheet" href="media/system/css/modal.css" type="text/css" />
<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>
<a rel="SqueezeBox" href="yourimagefolder/yourimage.jpg" title="Your Image Title" class="modal"><img src="yourimagefolder/yourthumbimage.jpg" alt="Imagename" title="Your Image Title" </a>
<a rel="{handler: 'iframe', size: {x: 800, y: 600}}" href="http://www.domain.com/page.html" class="modal">Testlink</a>

wildorchid wrote:
Can you post a link to your site so I can see how this works? I tried it (not for the frontpage, however) and can't get it to work.
Thanks. Good job on getting it to work.
<script type="text/javascript" src="media/system/js/mootools.js"></script>
<script type="text/javascript" src="media/system/js/modal.js"></script>
<link rel="stylesheet" href="media/system/css/modal.css" type="text/css" />
<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>
<a rel="SqueezeBox" href="yourimagefolder/yourimage.jpg" title="Your Image Title" class="modal"><img src="yourimagefolder/yourthumbimage.jpg" alt="Imagename" title="Your Image Title" </a>
<a rel="{handler: 'iframe', size: {x: 800, y: 600}}" href="http://www.domain.com/page.html" class="modal">Testlink</a>


AMCAD wrote:Now it's telling me "Squeezebox not defined in mootools.js on line 76"
What the heck? I did exactly as you told me. I must be missing something...
Help? :-\


<script type="text/javascript" src="../includes/js/joomla.javascript.js"></script>
<script type="text/javascript" src="/media/system/js/mootools.js"></script>
<script type="text/javascript" src="/media/system/js/modal.js"></script>
<script type="text/javascript">
// <!--
window.addEvent('domready', function(){ var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: 'false'}); });
// -->
</script>
<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>
<link rel="stylesheet" href="/media/system/css/modal.css" type="text/css" />



55thinking wrote:I had it working with the initial code of wildorchid.
Now i have a question: how to group several images as in slimbox. I can't see how to do that with SqueezeBox/Modal
Thanks for your help




Users browsing this forum: akari, anissajid, cbridges, jaimwa, lesmentheurs, michaelocity, ooffick, zaxx and 43 guests