Lightbox Content PopUp

Discuss the development and implementation of Joomla! 1.0.x templates here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
perspective
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 154
Joined: Thu Oct 04, 2007 7:45 pm

Lightbox Content PopUp

Post by perspective » Thu Feb 19, 2009 5:03 pm

(Yes, I did search this)

I have yet to see a way where you can write content on joomla, and then have your menu item link to it creating a popup lightbox.

Has anyone done this?

For Example if I create a form, and I want it just to be in a lightbox pop-up, I don't want it to show all of the site as in a iframe with the design. I just want to show what is in the;

Code: Select all

<?php mosMainBody(); ?>
Any hints or clues?

perspective
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 154
Joined: Thu Oct 04, 2007 7:45 pm

Re: Lightbox Content PopUp

Post by perspective » Mon Feb 23, 2009 5:33 pm

So, out of so many joomla installs. No one has done this? =O

User avatar
corrado444
Joomla! Guru
Joomla! Guru
Posts: 860
Joined: Thu Jul 06, 2006 8:30 am
Location: Sacramento
Contact:

Re: Lightbox Content PopUp

Post by corrado444 » Thu Jun 11, 2009 3:58 am

Actually, I did it cheating. Basicallly I created a menu, extracted the HTML, placed it in a HTML module and then added the jcepopu class to the <a> tag.
Works fine but of course it's not dynamic.

I'd think that going to the Joomla core wouldn't be hard to add a bit of code to lightbox it (there, it's a verb now)
Watch the 10 Minute Joomla! Tips Video Podcast
Itunes: [url]itpc://10minutejoomlatips.blip.tv/rss/itunes[/url]
Feedburner http://feeds.feedburner.com/10MinutesJoomlaTips

perspective
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 154
Joined: Thu Oct 04, 2007 7:45 pm

Re: Lightbox Content PopUp

Post by perspective » Thu Jun 11, 2009 1:07 pm

very nice, thank you!

User avatar
lightinthedark
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Tue Sep 19, 2006 9:12 am
Location: Hampshire, UK

Re: Lightbox Content PopUp

Post by lightinthedark » Tue Sep 08, 2009 12:17 pm

Perhaps using "&tmpl=component" on the end of your url might help? This seems to strip off the site template and design etc and just give you the stylesheets and component content. Hope you find what you're looking for.
Hello
:-Lightinthedark

User avatar
andpatton
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri May 29, 2009 3:50 pm
Contact:

Re: Lightbox Content PopUp

Post by andpatton » Thu Sep 24, 2009 9:43 pm

I was looking for something similar and decided to try a silly workaround on a whim (I was sure it wouldn't work), and lo and behold! It works! So it is with pleasure that I present a super-simple, hack-free solution for creating menu items that open content in a lightbox and are still part of normal, dynamic joomla menus.

First, like corrado444, I use JCE Utilities for all my lightbox needs (highly recommended). So, I simply tried creating a Menu Item of type "external link", and then put in the path to the image I wanted to open in a lightbox in the 'Link' field (images/stories/your-image.jpg). I then put in the closing quote mark after the path, added a space, and then added class="jcebox (without the closing quote). Joomla then grabs that text and sticks it here: href="[link text goes here]".

So, put very simply, use this syntax for the Link field in your menu item:

Code: Select all

images/stories/your-image.jpg" class="jcebox
and Joomla will generate this html code for your link:

Code: Select all

<a href="images/stories/your-image.jpg" class="jcebox">
I still can't believe it works.

Devxstation
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Tue Apr 07, 2009 2:02 pm

Re: Lightbox Content PopUp

Post by Devxstation » Tue Dec 08, 2009 4:48 pm

wow - nice tip!

User avatar
evolve247
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Sep 15, 2009 11:49 pm
Location: Portland, OR
Contact:

Re: Lightbox Content PopUp

Post by evolve247 » Tue Dec 29, 2009 6:55 pm

lightinthedark wrote:Perhaps using "&tmpl=component" on the end of your url might help? This seems to strip off the site template and design etc and just give you the stylesheets and component content. Hope you find what you're looking for.
Thanks for this! It solved My issue!

daajestaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Jan 13, 2009 1:47 am

Re: Lightbox Content PopUp

Post by daajestaa » Thu Mar 25, 2010 6:16 am

andpatton wrote: So, put very simply, use this syntax for the Link field in your menu item:

Code: Select all

images/stories/your-image.jpg" class="jcebox
and Joomla will generate this html code for your link:

Code: Select all

<a href="images/stories/your-image.jpg" class="jcebox">
This is brilliant! I've been looking for a way to achieve this on a site for days now. I've tried all sorts of hacks and work-arounds but none worked. I can't believe how simple this solution is.

Awesome... thanks andpatton!!

jlvida
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sun May 23, 2010 1:47 am

Re: Lightbox Content PopUp

Post by jlvida » Fri Jun 04, 2010 2:37 pm

Hello All,
I am not a joomla or code guru, but have decent knowledge. I am attempting to make an article open in a lightbox .....when I "click" a checkbox within my shopping cart.

I have tried the "&tmpl=component" code within the "checkout.html.php" file, but I am not certain how to make all this work. I copied the article url in the same line, before the code but nothing happens.

Any ideas would be great. Thanks.

jl

User avatar
andpatton
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri May 29, 2009 3:50 pm
Contact:

Re: Lightbox Content PopUp

Post by andpatton » Fri Jun 04, 2010 8:46 pm

First of all, just so you know, this should probably be a new thread.

But anywho, if you want to attach that to an event like clicking on a checkbox in a shopping cart page (what component are you using, Virtuemart?), you'll need to use some JS. If you find the checkbox in the file you're looking at (if you are using VM, do you mean checkout.index.php?), a simple possibility would be to try something like:

Code: Select all

<input type="radio" onclick="jcepopup.open('http://www.yoursite.com/index.php?com=com_content&id=1&tmpl=component', 'Article title', 
'external_links', 'iframe', {width:800,height:600})"
That should work if you have JCE Mediabox (AKA JCE Utilities) installed on your site. I hope that works, and if you give more details, I could probably help you better.

Good luck

tekknokrat
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Sun Nov 23, 2008 8:28 pm

Re: Lightbox Content PopUp

Post by tekknokrat » Tue Jul 20, 2010 9:56 am

I see this threads solution is to add &tmpl=component in URL but I suspect this will work in Joomla 1.0.x . Any hint on get a similar result in Joomla 1.0.x?

Tatsu
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Feb 09, 2010 4:37 am

Re: Lightbox Content PopUp

Post by Tatsu » Wed Sep 08, 2010 6:32 pm

andpatton wrote:
So, put very simply, use this syntax for the Link field in your menu item:
Code:
images/stories/your-image.jpg" class="jcebox

and Joomla will generate this html code for your link:
Code:
<a href="images/stories/your-image.jpg" class="jcebox">
Amazing solution! its so easy!

I used the same class method to get a text link from a custom module to create a pop up of an article. Is there anyway to adjust the pop up size?

User avatar
andpatton
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri May 29, 2009 3:50 pm
Contact:

Re: Lightbox Content PopUp

Post by andpatton » Wed Sep 08, 2010 7:00 pm

Is there anyway to adjust the pop up size?
Yup; taking the original example, just add rel="width[700];height[525];" after the path, where you replace 700 and 525 with the width and height (in pixels) you want. So in my example, it would look like this:

Code: Select all

images/stories/your-image.jpg" rel="width[700];height[525];" class="jcebox
Hope that's what you're looking for

Tatsu
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Feb 09, 2010 4:37 am

Re: Lightbox Content PopUp

Post by Tatsu » Thu Sep 09, 2010 3:37 am

Thank you so much, does exactly as you said.

tomgartin
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Sep 13, 2010 5:51 pm

Re: Lightbox Content PopUp

Post by tomgartin » Thu Oct 07, 2010 6:11 pm

I'm running multiple sites on 1.5.20 and I've tried using Modalizer as well as JCE MediaBox, but neither has worked. I've input the given syntax in an External Link menu item such that it reads

Code: Select all

index.php?option=com_content&view=article&id=4&tmpl=component" class="modal
or

Code: Select all

index.php?option=com_content&view=article&id=4&tmpl=component" class="jcebox
but it's just not working.
Is there something I need to do in the template code to unlock this functionality?

Thanks

User avatar
andpatton
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Fri May 29, 2009 3:50 pm
Contact:

Re: Lightbox Content PopUp

Post by andpatton » Thu Oct 07, 2010 8:20 pm

tomgartin wrote:but it's just not working.
Is there something I need to do in the template code to unlock this functionality?
No, there's nothing you need to do in the template. What does happen when you use the method? Could you either link to an example or just copy the source code it creates (just of that menu item) and paste it here on the forum?

tomgartin
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Sep 13, 2010 5:51 pm

Re: Lightbox Content PopUp

Post by tomgartin » Thu Oct 07, 2010 9:00 pm

[/quote]No, there's nothing you need to do in the template. What does happen when you use the method? Could you either link to an example or just copy the source code it creates (just of that menu item) and paste it here on the forum?[/quote]

It goes to the page normally as if I hadn't added the extra code.

The website is http://www.mancaveonline.com
Go to "Video and Podcasts" on the menu bar and click on "Audio Library" (that's the only menu item I've put the modal code on so far)
If you click the blue button that says "Audio Library" you'll see that the

Code: Select all

<A HREF="website" CLASS="modal">
does work when it's in an article or module, just not as a menu item.

tomgartin
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Sep 13, 2010 5:51 pm

Re: Lightbox Content PopUp

Post by tomgartin » Thu Oct 07, 2010 10:20 pm

I must apologize, I had to take the code out of the menu item on the site I provided above. It was turning every link below it into a modal link to the audio library, effectively overriding the links to forms and blogs. Anyone else have that issue?

Strite
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 26, 2010 2:50 pm

Re: Lightbox Content PopUp

Post by Strite » Tue Oct 26, 2010 3:03 pm

andpatton wrote:I was looking for something similar and decided to try a silly workaround on a whim (I was sure it wouldn't work), and lo and behold! It works! So it is with pleasure that I present a super-simple, hack-free solution for creating menu items that open content in a lightbox and are still part of normal, dynamic joomla menus.

First, like corrado444, I use JCE Utilities for all my lightbox needs (highly recommended). So, I simply tried creating a Menu Item of type "external link", and then put in the path to the image I wanted to open in a lightbox in the 'Link' field (images/stories/your-image.jpg). I then put in the closing quote mark after the path, added a space, and then added class="jcebox (without the closing quote). Joomla then grabs that text and sticks it here: href="[link text goes here]".

So, put very simply, use this syntax for the Link field in your menu item:

Code: Select all

images/stories/your-image.jpg" class="jcebox
and Joomla will generate this html code for your link:

Code: Select all

<a href="images/stories/your-image.jpg" class="jcebox">
I still can't believe it works.
You're a genius. I've been banging my head against a brick wall trying to do this for the past 2 days, i've had a major headache for 48 hours over this and you fixed my issue with a simple line of code! Haha. Originally I was trying to use the Rokbox and Roknavmenu plug-in from Rockettheme, which is supposed to do this out of the box. You've just saved me several more days of headaches with this solution :D

ryanb
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jun 17, 2010 9:11 pm

Re: Lightbox Content PopUp

Post by ryanb » Tue May 17, 2011 6:05 am

I'm having the same issue - can't get an Article to load as a popup.

Any solutions?

J! 1.5.22
Superfish menu

User avatar
infyways
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Sat Aug 27, 2011 9:30 pm
Location: India
Contact:

Re: Lightbox Content PopUp

Post by infyways » Fri Sep 09, 2011 10:26 pm

Lightbox Content Popup is now available on Joomla Extensions Directory. The articles can now be popped up in lightbox.

Check this : http://extensions.joomla.org/extensions ... ames/17938


myjoomlauser
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Aug 30, 2012 11:09 pm

Re: Lightbox Content PopUp

Post by myjoomlauser » Tue Nov 20, 2012 6:48 pm

Hello all,

I'm having some issues to implement these solutions for a pop-up window in Joomla 2.5.
It seems that AndPatton's solution works great however I'm wondering if you can help me since I want to achieve something a little different.

I'd like that the pop-up window would open as soon as somebody would click on a menu item from the main nav, overlapping the rest of the content shown on that menu page by default.

Would anybody know how to do this, opening the pop-up linked with the menu item immediately after page loads??? Any advice would be greatly appreciated it.

Thanksss...

User avatar
Z3RatuL
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Sun Nov 13, 2005 2:23 pm

Re: Lightbox Content PopUp

Post by Z3RatuL » Mon Feb 04, 2013 11:47 am

Well this doesn't seem to work for me in Joomla 2.5.8. I have sef urls on and if I put this code

Code: Select all

/en/availability/?tmpl=component" class="modal
inside the link field at the external field type then the link displayed at the brower is:

/en/availability/?tmpl=component" class="modal and does nothing... Any other workaround?

azam100
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed May 06, 2015 6:30 pm

Re: Lightbox Content PopUp

Post by azam100 » Fri Jun 05, 2015 2:48 pm

lightinthedark wrote:Perhaps using "&tmpl=component" on the end of your url might help? This seems to strip off the site template and design etc and just give you the stylesheets and component content. Hope you find what you're looking for.

Thanks for this. :)

Hemali_123
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jun 18, 2015 11:34 am

Re: Lightbox Content PopUp

Post by Hemali_123 » Mon Jul 13, 2015 12:13 pm

In my website

1. I just simply want image popup on page load

2. Clicking on that image popup jump on other page.

I have already installed plg_jcemediabox_1122_joomla25 & com_jce_252 .
I can’t understand how to use both of these to get desired result.


Locked

Return to “Templates & CSS - 1.0.x”