Topic: SlimBox (aka. LightBox)

When you are on the viewer, when you click on the picture it loads it in a new page, instead, why not have a nice lightbox?

Demo:

http://chevereto.com/2.0/images/xa2qf.png


First download and extract to the root of your chevereto website:
http://www.mediafire.com/?8k88prq1uhzw756

open INDEX.PHP

find

<script type="text/javascript">google.load("jquery", "1");</script>

REPLACE WITH

<script type="text/javascript">google.load("jquery", "1.6.1");</script>

find

<script type="text/javascript" src="<?php echo PATH_SCRIPT;?>js/jquery_support.js"></script>

add AFTER

<script type="text/javascript" src="js/slimbox2.js"></script>
<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" />

find:

    <div id="imagen"><a href="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>"><img src="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>" alt="" <?php if ($ancho>=900) { echo 'width="900" '; } ?>/></a></div>

REPLACE WITH

    <div id="imagen"><a rel="lightbox" href="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>"><img src="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>" alt="" <?php if ($ancho>=900) { echo 'width="900" '; } ?>/></a></div>

Last edited by Danny.Domb (2011-05-25 15:32:51)

~ Sup?!

Thumbs up

Re: SlimBox (aka. LightBox)

thanks!

Thumbs up

Re: SlimBox (aka. LightBox)

this work great in 2.0 big_smile!

Thumbs up

Re: SlimBox (aka. LightBox)

--- Instructions for 2.0.8 ---

Still extract the contents to the root (public_html) of your website.


--- includes/template.functions.php

add the following code after line 395 (no need to call jquery as this versions already uses 1.6.1)

<script type="text/javascript" src="js/slimbox2.js"></script>
<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" />

--- content/themes/Peafowl/view.php
--- on line 4 (for top text link) and line 5 (click on image link) change...

<a href="<?php show_img_url(); ?>" target="_blank">

to...

<a rel="lightbox" href="<?php show_img_url(); ?>" target="_blank">

done  smile


*Note: Large images cause problems with functionality, they expand beyond the page and cannot be viewed or closed properly. Great for images smaller than standard screen resolution though.

Last edited by stokes84 (2011-08-07 05:54:40)

Thumbs up