Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues
Author Message
pdfx
Regular
Regular



Joined: Mar 13, 2008
Posts: 68

PostPosted: Mon Sep 08, 2008 2:03 am Reply with quote

Hello all

Has anyone used a lightbox within a Module? If so, to what success have you had?

I want to have a few buttons that when clicked a new window within nuke opens and shows the info. One is a graphic, one is a url and one is a video.

I have found various lightboxes, just tried a couple and cant get them to work.

P
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Mon Sep 08, 2008 3:07 am Reply with quote

I used moodalbox a while ago on my site to open up news item when the 'read more' link was clicked.
You just need to make sure that you call the js files in header.php (or after the header include for the module index file. Most of the modal type boxes also require the content to be placed in CSS tag for them to work correctly.
 
View user's profile Send private message Send e-mail
pdfx







PostPosted: Mon Sep 08, 2008 10:48 am Reply with quote

ok guardian,

Thanks for the response.

I have added the call js files already, the second point you added about the css tag i was unsure of?

I basically have a module that calls a html page into an iframe. (I have resons for this) In this html page I want to add some graphic buttons that call larger graphics, external html, thats why i chose lightbox, i can get graphics to work fine sing this method, but the original lightbox script only handles images. I have tried various other lightboxes and cannot get tthem to work.

P
 
Guardian2003







PostPosted: Mon Sep 08, 2008 1:25 pm Reply with quote

If you are trying to get the lightbox or something similar to work from inside the iframe, I don't think that is going to work because the JS needs to be in the <HEAD> element and the iframe won't have one. You might have to re-think your approach of using the iframe but I'll try and do some digging to see what I can find.
 
pdfx







PostPosted: Mon Sep 08, 2008 10:51 pm Reply with quote

ok, i knew what I wrote might be confusing.

The iframe calls my own html page that has all the correct coding added for the lightbox. The original Lightbox which only handles images works fine in this set up.
But i wanted to have the lightbox handle html content which the original lightbox does not, thus why i tried other variation lightboxes that handle html and forms within them, they dont work.

P
 
Guardian2003







PostPosted: Tue Sep 09, 2008 2:32 am Reply with quote

I don't think you can use lightbox with html content as the trigger is on an image tag. If I remember correctly it's the REL attribute so you would do something like
Code:


< img src ="something.gif"" rel="lightbox" ....

You cannot use the rel attribute with text so you would need to use something else.

You really need to be using one of the AJAX frameworks like jQuery or moodal.
Have a look at this Wink [ Only registered users can see links on this board! Get registered or login! ]
I know they use the word 'lightbox' in their description but they use it in the context of "lightbox type effect".
 
pdfx







PostPosted: Thu Sep 11, 2008 5:09 am Reply with quote

thanks mate,
That looks like what I am looking for will look into it more

P
 
Guardian2003







PostPosted: Thu Sep 11, 2008 7:30 am Reply with quote

No problem.
I have actually used [ Only registered users can see links on this board! Get registered or login! ] on one of my sites for popping up the news items from the readmore link but it should also work with external content as well.
 
testy1
Involved
Involved



Joined: Apr 06, 2008
Posts: 484

PostPosted: Fri Sep 12, 2008 2:18 am Reply with quote

I previously had one using mootools which worked exceptionaly well.

you will also need the following

slimbox javascript here [ Only registered users can see links on this board! Get registered or login! ]
mootools framework here [ Only registered users can see links on this board! Get registered or login! ]

upload these files to the structure shown below.....

Open: includes/javascript.php

Add:

Code:


    echo '<script type="text/javascript" src="includes/moo/mootools-1.2.js"></script>';
    echo '<script type="text/javascript" src="includes/moo/slimbox.js"></script>';
   echo '<link rel="stylesheet" href="includes/moo/slimbox.css" type="text/css" media="screen" />';


and here is an e.g. for the block for testing.

Code:


$content = '<div align="center"><h4>Click The Image Below</h4><a href="images/test.jpg" rel="lightbox" title="My Slimbox"><img src="images/test.jpg" width="180" height="180" border="0" alt="Slimbox" /></a></div>';
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Sat Sep 13, 2008 4:56 am Reply with quote

As we are moving to jquery in RN 2.3, I'd have to plug that JS library / framework. There are quite a few lightbox plugins for jquery listed on the plugin site, and probably many more that aren't listed there.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
testy1







PostPosted: Sat Sep 13, 2008 5:47 am Reply with quote

the 2 jquery ones i tried are a little slower and not quite as smooth but agreed, thats why i dont use it anymore, but im still going through the jquery ones as well, thats one thing with jquery there are a lot more plugins for it
 
kguske







PostPosted: Sat Sep 13, 2008 6:52 am Reply with quote

That's a good problem to have - too many to choose from. Much better than not enough (or some missing). I'd have to see a comparison, but it seems strange that one method would be significantly slower than another. Then again, I haven't played with it much.
 
testy1







PostPosted: Sat Sep 13, 2008 6:20 pm Reply with quote

yes as far as problems go it not bad at all lol
 
kguske







PostPosted: Sun Sep 14, 2008 8:12 pm Reply with quote

I wanted to use a lightbox to display video on one of the commercial sites I support, and found a nice tool. But, it's creative commons license and doesn't use jQuery. I used the Ozh Lightbox Clones matrix to find 2 that have a less restrictive license and use jQuery. Performance and visual appearance are fine on both.

Note that you can filter by library and features...

Also, note that this cool matrix uses jQuery (why am I not surprised?).
 
kguske







PostPosted: Sun Sep 14, 2008 8:19 pm Reply with quote

Oops. The original one I found **does** work with jQuery (and, to be fair, it has versions to work with other libraries, too). But I still like the license flexibility offered by the other choices (again, the benefits of having many options to choose from!).
 
testy1







PostPosted: Sun Sep 14, 2008 9:22 pm Reply with quote

It is a bit off topic, but ive never looked into creative commons, if its a simple answer, why is it restrictive or do you have a link for an explanation
 
kguske







PostPosted: Sun Sep 14, 2008 9:31 pm Reply with quote

Haven't really looked into creative commons, but in this case, the author claimed it required a paid license for use on a commercial site. I usually look for licenses that don't require payment, and not because I don't contribute.
 
testy1







PostPosted: Sun Sep 14, 2008 10:35 pm Reply with quote

Just checking it out, there is all types of licenses....stay away I think, I shall keep reading Sad
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues

View next topic
View previous topic
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©