• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

SlimBox (aka. LightBox)

Danny.Domb

👽 Chevereto Freak
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:

xa2qf.png



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

open INDEX.PHP

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

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

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

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


find:
Code:
    <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
Code:
    <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>
 
--- 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)

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

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

to...

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


done 🙂


*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.
 
Back
Top