The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 25 posts ] 
Author Message
 Post subject: Lightbox Content PopUp
PostPosted: Thu Feb 19, 2009 5:03 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Oct 04, 2007 7:45 pm
Posts: 153
(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:
<?php mosMainBody(); ?>


Any hints or clues?


Top
 Profile  
 
PostPosted: Mon Feb 23, 2009 5:33 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Oct 04, 2007 7:45 pm
Posts: 153
So, out of so many joomla installs. No one has done this? =O


Top
 Profile  
 
PostPosted: Thu Jun 11, 2009 3:58 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Jul 06, 2006 8:30 am
Posts: 833
Location: Sacramento
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: itpc://10minutejoomlatips.blip.tv/rss/itunes
Feedburner http://feeds.feedburner.com/10MinutesJoomlaTips


Top
 Profile  
 
PostPosted: Thu Jun 11, 2009 1:07 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Oct 04, 2007 7:45 pm
Posts: 153
very nice, thank you!


Top
 Profile  
 
PostPosted: Tue Sep 08, 2009 12:17 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 19, 2006 9:12 am
Posts: 91
Location: Hampshire, UK
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


Top
 Profile  
 
PostPosted: Thu Sep 24, 2009 9:43 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 29, 2009 3:50 pm
Posts: 23
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:
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">

I still can't believe it works.

_________________
http://www.acusti.ca


Top
 Profile  
 
PostPosted: Tue Dec 08, 2009 4:48 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Apr 07, 2009 2:02 pm
Posts: 33
wow - nice tip!


Top
 Profile  
 
PostPosted: Tue Dec 29, 2009 6:55 pm 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Sep 15, 2009 11:49 pm
Posts: 3
Location: Portland, OR
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!


Top
 Profile  
 
PostPosted: Thu Mar 25, 2010 6:16 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 13, 2009 1:47 am
Posts: 5
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">



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!!


Top
 Profile  
 
PostPosted: Fri Jun 04, 2010 2:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun May 23, 2010 1:47 am
Posts: 9
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


Top
 Profile  
 
PostPosted: Fri Jun 04, 2010 8:46 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 29, 2009 3:50 pm
Posts: 23
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:
<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

_________________
http://www.acusti.ca


Top
 Profile  
 
PostPosted: Tue Jul 20, 2010 9:56 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Nov 23, 2008 8:28 pm
Posts: 48
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?


Top
 Profile  
 
PostPosted: Wed Sep 08, 2010 6:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 09, 2010 4:37 am
Posts: 12
Quote:
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?


Top
 Profile  
 
PostPosted: Wed Sep 08, 2010 7:00 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 29, 2009 3:50 pm
Posts: 23
Quote:
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:
images/stories/your-image.jpg" rel="width[700];height[525];" class="jcebox

Hope that's what you're looking for

_________________
http://www.acusti.ca


Top
 Profile  
 
PostPosted: Thu Sep 09, 2010 3:37 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 09, 2010 4:37 am
Posts: 12
Thank you so much, does exactly as you said.


Top
 Profile  
 
PostPosted: Thu Oct 07, 2010 6:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Sep 13, 2010 5:51 pm
Posts: 7
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:
index.php?option=com_content&view=article&id=4&tmpl=component" class="modal

or
Code:
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


Top
 Profile  
 
PostPosted: Thu Oct 07, 2010 8:20 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 29, 2009 3:50 pm
Posts: 23
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?

_________________
http://www.acusti.ca


Top
 Profile  
 
PostPosted: Thu Oct 07, 2010 9:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Sep 13, 2010 5:51 pm
Posts: 7
[/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:
<A HREF="website" CLASS="modal">
does work when it's in an article or module, just not as a menu item.


Top
 Profile  
 
PostPosted: Thu Oct 07, 2010 10:20 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Sep 13, 2010 5:51 pm
Posts: 7
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?


Top
 Profile  
 
PostPosted: Tue Oct 26, 2010 3:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Oct 26, 2010 2:50 pm
Posts: 1
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:
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">

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


Top
 Profile  
 
PostPosted: Tue May 17, 2011 6:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jun 17, 2010 9:11 pm
Posts: 3
I'm having the same issue - can't get an Article to load as a popup.

Any solutions?

J! 1.5.22
Superfish menu


Top
 Profile  
 
PostPosted: Fri Sep 09, 2011 10:26 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Aug 27, 2011 9:30 pm
Posts: 21
Location: India
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

_________________
Joomla Development Services: http://www.infyways.com


Top
 Profile  
 
PostPosted: Mon Mar 12, 2012 3:09 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 21, 2012 2:52 pm
Posts: 16
visit link
http://extensions.joomla.org/extensions ... ames/17938
http://extensions.joomla.org/extensions ... -a-iframes
http://extensions.joomla.org/extensions ... ia-display

_________________
http://forum.joomla.org/memberlist.php?mode=viewprofile&u=644666


Top
 Profile  
 
PostPosted: Tue Nov 20, 2012 6:48 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Aug 30, 2012 11:09 pm
Posts: 10
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...


Top
 Profile  
 
PostPosted: Mon Feb 04, 2013 11:47 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Nov 13, 2005 2:23 pm
Posts: 18
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:
/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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ] 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group