javascript popup images? are these possible?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
wilse
Forum Members
Forum Members
Posts: 15
Joined: Fri Dec 10, 2010 4:15 pm

javascript popup images? are these possible?

Post by wilse »

Hi folks


Sorry if this is in the wrong section, being a designer I'm quite a novice with coding.
I've had javascript popups [images] working in some Dreamweaver sites' but I'm unable to get the same functionality in CMSMS?

Can anyone please point/advise me if this is fairly easily achievable.


Basically I'd like a thumbnail image, when clicked can show a larger version of the same image.



Cheers

w
wilse
Forum Members
Forum Members
Posts: 15
Joined: Fri Dec 10, 2010 4:15 pm

Re: javascript popup images? are these possible?

Post by wilse »

OK...

Not being lazy think I've sorted it, BUT could someone knowledgeable tell me if this is the correct way to do the popup window?

I've added the following code into my 'template'

{literal}
<__script__ type="text/javascript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</__script>
{/literal}

Then I've used the following on the pages & images I need to enlarge.

<img onclick="MM_openBrWindow('uploads/images/Smallrough.jpg','popUp','')" src="uploads/images/Bigrough.jpg" alt="" width="98" height="136" />


Is this a good way or just stupid.


Cheers all
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: javascript popup images? are these possible?

Post by Wishbone »

I use 'fancybox' for this.

http://fancybox.net/
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

Re: javascript popup images? are these possible?

Post by janvl »

Hi

how should the popup image look like?
Do you have an example of a site where I can see what exacly it is that you want?

Regards,
Jan
wilse
Forum Members
Forum Members
Posts: 15
Joined: Fri Dec 10, 2010 4:15 pm

Re: javascript popup images? are these possible?

Post by wilse »

Thanks guys


I like the fancybox script being very new to CMSMS how easy is it to install this into my CMSMS site?


Jan
I haven't got anything specific, just wanted to have thumbnails that when clicked can open larger versions of the same image lets' say 600 x 600 px preferably in an auto sized window.

I'll investigate fancybox, but it looks a bit complex for me!


w
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

Re: javascript popup images? are these possible?

Post by janvl »

Hi,
have a look at:
http://www.drhoenig-radiologie.at/
you can click on the 4 images of his certificates.

This is done with a smarty-tag like
{Lytebox href='uploads/images/zert-1-voll.gif' title='Urkunde 1' text=' ' thumbsrc='uploads/images/zert-1-kl.gif' lang="de_DE" resizeSpeed="5"}

Lytebox makes this a little easier, just install the module and put your own data in the tag.

Regards,
Jan
wilse
Forum Members
Forum Members
Posts: 15
Joined: Fri Dec 10, 2010 4:15 pm

Re: javascript popup images? are these possible?

Post by wilse »

Thanks all, finally went with Jan's suggestion for Lytebox.

It got me thinking:
If I wanted to user of the website [my client] to be able to insert images himself using the WYSIWYG editior, is it possible somehow automatically add the lytebox functionality to any new images he uploads?

Currently I have to insert...
{Lytebox href='uploads/images/campsites/campmap-large.jpg' text='' thumbsrc='uploads/images/campsites/campsmall.jpg' alt='Image #1'}
Which is OK for me, but not for a client?

wilse
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

Re: javascript popup images? are these possible?

Post by janvl »

Hi,

I am afraid that what you ask, is not possible.
Write a simple instruction where the customer can give his images on the CMS
and use copy and paste.
That is the best advise I can give you, otherwise use the module "Gallery"

Kind regards,
Jan
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: javascript popup images? are these possible?

Post by Dr.CSS »

It is possible as most of these JS lightbox things only need something like rel='lightbox' in the link to make it happen and when adding image and link you can see in options or advanced tab a place to set this rel=...
Post Reply

Return to “CMSMS Core”