1. Wayne Webb
  2. Commercial Templates
  3. Wednesday, 29 February 2012
  4.  Subscribe via email
I discovered this some time ago and wanted to share it with fellow newbies.

Often we want to have a thumbnail image, even if it is several hundred pixels in width and heighth, that when clicked displays a larger image as an overlay to the page. It can be done.

There are a multitude of such plugins / applets out there that will accomplish this. Myself, I use the one that can be located over at RocketTheme.Com, RokBox. It is free, it works, and better yet, installs seemlessly into your Joomla51 template install. I've used it for Neptune and for Draco with stellar results.

Here is the coding:
<p style="text-align:center;"><a href="/url to large image" title=Some text" rel="rokbox[1024 771](demo)"><img src="/url to small image" border="0" alt="Some text" title="Some text" width="width of small image" height="height of small image" /></a></p>

And here is how it works. The first "href" statement is the url to the large version of the image [color=#ff0044]IF[/color] it is different than the base thumbnail image. The "src" is the url on your server's structure to the image that will be the thumbnail image. They can be the same image URL. You can pass along the width and heighth of the thumbnail using the "width" and "height" statements near the end of the code. The "rel="rokbox[1024 771]" statement tell the plugin how large to make the javascript popup window. Make sure you set the dimension, "height" and "width" large enough to accomodate your image, allowing for a suitable border around your image.

It is also recommended that somewhere within the code, using the "alt" and "title" phrases, that you indicate to your users that they can click on the thumbnail image to view a larger version. Something like: A picture of me [Click for a larger image].
Accepted Answer Pending Moderation
0
Votes
Undo
And again thank you... another excellent post and it works perfectly.
  1. more than a month ago
  2. Commercial Templates
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok