Jquery/Lightbox

Permalink
Sorry to ask this,I have just spent hours pouring over the forums,I would really like to use C5,But I cant see a cut and dry way to install lightbox I havent seen anyone agree on how to do this,Is it so simple i missed it,I have tried things in the header,html code block,nothing works, Is there a step by step?

Thanks

red
View Replies:
Mnkras replied on at Permalink Reply
Mnkras
Tony made a really nice addon called popup that does exactly that its in the marketplace
alemao replied on at Permalink Reply
alemao
hi, i dont use lightbox but i use superbox on my site and it was easy to integrate:
As concrete already works with jquery you dont have to call jquery in the header.
Just put the following links into your 'elements/header.php'

<link rel="stylesheet" href="<?=$this->getThemePath()?>/jquery.superbox.css" type="text/css" title="main" media="screen">

<script type="text/javascript" src="<?=$this->getThemePath()?>/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="<?=$this->getThemePath()?>/js/jquery.superbox-min.js"></script>
<script type="text/javascript" src="<?=$this->getThemePath()?>/js/jquery.superbox.js"></script>
<script type="text/javascript">
$(function(){
$.superbox.settings = {
closeTxt: "close",
loadTxt: "Loading...",
nextTxt: "next",
prevTxt: "previous"
};
$.superbox();
});
</script>

upload all neccessary files and put them in the correct folder!

The links within your website should look like this:

<a rel="superbox[gallery][my_gallery]" href="images/sey1298.jpg"><img src="images/sey1298.jpg" alt="" width="108" height="82" /></a>

depends on what you want to call. I suggest that you read the superbox instructions because you can call whatever you want like, flv. swf. forms, pics, external pages via iframe and so on.

Good luck!
red replied on at Permalink Reply
red
Thanks Guys


I will look at these

One more thing,

Are put these files right into your theme folder outside of concrete or the css and js folders outside of the concrete

Do you or can you put the code for the images in the block HTML or CONTENT or do you have to put it on the php page.

Code example( <a href="images/isnap-black.jpg" rel="lightbox[web]" title="ISNAP-Mockup for Picture Printing Website"><img src="thumbnails/isnap-black.jpg" width="100" height="71" alt="" class="thumb"/></a>

I can get lightbox to work on a normal website(no-cms)

I'll try these out and get back to you all

Again thanks
red replied on at Permalink Reply
red
kinda got it to work,but had to do this

<script type="text/javascript" src="/themes/Richardv2/js/jquery.superbox-min.js"></script>
<script type="text/javascript" src="/themes/Richardv2/js/jquery.superbox.js"></script>


when i use get theme paht it shows up like this

<script type="text/javascript" src="<?=$this->getThemePath()?>/js/jquery.superbox-min.js"></script>
<script type="text/javascript" src="<?=$this->getThemePath()?>/js/jquery.superbox.js"></script>


in the source code i mean
cannonf700 replied on at Permalink Reply
cannonf700
red,
Thanks for posting your solutions. Also found this thread which might answer future questions or anyone else who stumbles upon these issues:
http://www.concrete5.org/community/forums/chat/jquery-lightbox2/#24...
red replied on at Permalink Reply
red
ok...got it to work.

to start i keep my theme in the theme folder out side the concrete folder,you know where all those empty folders are,

Anyway I did it like this:

<style type="text/css">@import "<?php echo $this->getStyleSheet('reset.css')?>";</style>
<style type="text/css">@import "<?php echo $this->getStyleSheet('main.css')?>";</style>
<style type="text/css">@import "<?php echo $this->getStyleSheet('superbox.css')?>";</style>
<?php 
    Loader::element('header_required'); 
 ?>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery.superbox-min.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery.superbox.js"></script>

and it seems to work fine.only thin with superbox is I cant get the title tag to work,
ecoit replied on at Permalink Reply
hi

i just got lightbox going, for me the answer was to make sure the
jquery.lightbox-0.5.min.js file was included AFTER
Loader::element('header_required');


i did this in the themes/mytheme/elements/header.php file ..

makes sense, seeing as 'header_required' will include jquery itself, and we need to include the lightbox.js file AFTER jquery ..

hope this helps someone..
zoinks replied on at Permalink Reply
You guys who are using Lightbox with C5 are just hardcoding in the stuff you want to pop up, right?

I like Tony's Popup because it is user-friendly (client can add it themselves without having to do any coding.)