• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

WORKING Lightbox style gallery

imgshared

Chevereto Noob
Hey guys Im new here, and ive figured out my way around chevereto pretty fast, I was trying to figure out how to implement my own gallery for the longest time but i was never able to figure out how to get one working and also keep my template on the page.

so I took the Index.php for chevereto, and I cleared out anything that wasn't the template, and just left a div in the middle for inserting PHP scripts I downloaded from the web. so without any further ado heres a demo

http://imgshared.com/gallery.php

and the download link

http://www.multiupload.com/2OYVE94CMO

IMPORTANT

Here are the instructions.

First your going to download and extract the files with winrar, or 7zip, or whatever you choose.

you are left with a gallery.php file and a phpgallery folder, all you have to do is upload both files to the root of your image host.
then edit gallery.php and find this line:

GalleryFolder="images"

change images to wherever your images are saved.

next open your index.php file, and add to the very bottom a link to your gallery.

for example put this in the footer:

<a href="gallery.php">Gallery</a>

and thats all guys! I hope you enjoy this, the script is NOT coded by me, have a look at the licence in the phpgallery folder for more information.

you can contact me for support at

AIM: topmassprod

MSN: topmass@live.com

and if anyone wants the "Blank" template only PHP file with a div for putting your own scripts, let me know and Ill post that here aswell.
 
Okay here you go

Code:
<?


require('engine.php');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo LANG;?>" lang="<?php echo LANG;?>">
<head>

<meta name="generator" content="Chevereto <?php echo SC_VERSION;?>" /><!-- LET IT BIT! -->

<title><? echo $titulo.' '.APP_NAME;?> - <?php echo TAG_LINE;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="<?php echo LANG;?>" />
<link href="<?php echo URL_SCRIPT;?>estilo.css" rel="stylesheet" type="text/css" />

<meta name="description" content="<?php echo DESCRIPTION;?>"/>
<meta name="keywords" content="<?php echo KEYWORDS; ?>"/>
<meta name="robots" content="index,follow"/>

<link rel="shortcut icon" href="<?php echo PATH_SCRIPT;?>favicon.ico" type="image/x-icon" />

<!--[if lt IE 7.]>
<script defer type="text/javascript" src="<?php echo PATH_SCRIPT;?>js/pngfix.js"></script>
<![endif]-->

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">google.load("jquery", "1");</script>
<script type="text/javascript" src="<?php echo PATH_SCRIPT;?>js/jquery.scrollTo-min.js"></script>
<script type="text/javascript" src="<?php echo PATH_SCRIPT;?>js/jquery_support.js"></script>

<script type="text/javascript">
// <![CDATA[
$(document).ready(function(){
<? if ($spit==true) { ?>error();<? } ?>
<? if ($modo==1 || $modo=='rr') { ?>upload();<? } ?>
<? if ($modo==3) { ?>process();<? } ?>
<? if ($modo==2) { ?>viewer();<? } ?>
<? if ($modo==2 || $modo==3) { ?>social();<? } ?>
<? if ($cut_url==true && $cut_url_user==true && $modo==1) { ?>pref();<? } ?>
});
// ]]>
</script>

</head>

<body>

<div id="top">
    <div id="logo">
      <a href="<?php echo URL_SCRIPT;?>"><img src="<?php echo PATH_SCRIPT;?>site-img/logo.png" alt="<?php echo APP_NAME;?>" /></a>
    </div>
    <div id="tagline"><?php echo TAG_LINE;?></div><div id="limite">JPG PNG BMP GIF <span>Max.<?php echo $max_mb;?>Mb</span></div>
</div>

<? if ($spit==true) { ?>
<h1 id="error"><span><?php echo $errormsg?></span></h1>
<? } ?>

<? if ($modo==1) { ?>
<div>
lorem ipsum
</div>
        
        <div id="enviando" style="display: none;"><span id="momentito"><?php echo TXT_UPLOADING;?></span></div>
    </div>
    
    </form>

<? } ?>
<? if ($modo=='rr') { ?>
<!-- SUBIR -->

    <div id="imagenfull"><img src="<?php echo $urlrez?>" alt="<?php echo $urlrez?>" /></div>
    
    <form enctype="multipart/form-data" action="<?php echo PATH_SCRIPT;?>" method="post">
    
    <? if ($cut_url==true && $cut_url_user==true) { ?>
    <div id="pref-panel" style="display: none;"><div id="cajon-pref"><p id="prefurl"><input name="" type="checkbox" id="cortarurl" value="" <? if(isset($_COOKIE['prefurl'])) { ?>checked="checked"<? } ?> /><label for="cortarurl"> <?php echo TXT_TINYURL;?></label></p><div id="save"><a id="savepref" /><?php echo TXT_CLOSE_PREF;?></a></div></div></div>  
    <? } ?>
    
    <div id="contenedorupload">
        <div id="subir_remota">
            <h2 id="chooseremota"><?php echo TXT_REMOTE_RR;?></h2>
            <div class="inputs"><input value="<?php echo $urlrez?>" name="remota" size="60" id="remotaUP" onclick="javascript:document.getElementById('localUP').value = '';"/></div>
        </div>
    </div>
    
    <div id="redimensionar">
        <div id="redimensionar_cajatitulo">
            <div id="redimensionar_titulo">
                <div id="boton_redimensionar"<? if (isset($lang)) { echo ' class="'.$lang.'"'; } ?>><span><a id="rclosed"></a><a id="ropen" style="display: none;"></a></span></div>
                <div id="red_mensaje"><span id="red1"><?php echo RESIZE_DSC;?></span><span id="red2" style="display: none;"></span></div>
            </div>
        </div>        
        <div id="redimensionar-borde" style="display: none;">
            <div id="cajonred">
                <div id="ancho_deseado"><?php echo RESIZE_WIDTH;?> <span><?php echo RESIZE_PIXELS;?></span></div>
                <input name="resize" id="resize"/>
                <div id="kepp"><?php echo RESIZE_KEEP;?></div>
            </div>
        </div>
    </div>
    
    <div id="boton_subir">
        <input type="image" src="/site-img/btn_subir<? if (isset($lang)) { echo '_'.$lang; } ?>.gif" id="subir"/>
        <div id="enviando" style="display: none;"><span id="momentito"><?php echo TXT_UPLOADING;?></span></div>
    </div>
     
    </form>
<!-- contenido --><? } // MODO RR ?>
<? if ($modo==4) { ?>
<div id="subiste-viendo"><h1><?php echo TXT_TEMP_SAVE;?></h1></div>

    <form enctype="multipart/form-data" action="<?php echo PATH_SCRIPT;?>" method="post">
    <input name="remota" type="hidden" value="<?php echo $URLrdn?>" />
    <div id="redimensionar_cajatitulo" class="denuevo">
        <div id="redimensionar_titulo"><div id="boton_redimensionar"<? if (isset($lang)) { echo ' class="'.$lang.'"'; } ?>><span><a id="ropen"></a></span></div>
        <div id="red_mensaje"><span id="red1"><?php echo RESIZE_DSC;?></span><span id="red2" style="display: none;"></span></div>
        </div>
    </div>
    <div id="redimensionar">
        <div id="redimensionar-borde">
            <div id="cajonred">
                <div id="ancho_deseado"><?php echo RESIZE_WIDTH;?> <span><?php echo RESIZE_PIXELS;?></span></div>
                <input name="resize" id="resize"/>
                <div id="kepp"><?php echo RESIZE_KEEP;?></div>
            </div> 
            <div id="boton_redo">
                <input type="image" src="site-img/btn_reintentar<? if (isset($lang)) { echo '_'.$lang; } ?>.gif" id="redo" />
                <div id="enviando" style="display: none;"><span id="momentito"><?php echo TXT_REZ_AGAIN;?></span></div>
            </div>
        </div>
    </div>
    </form>
    
    <div id="share">   
         <h2><?php echo TXT_TEMP_PLACE;?></h2>
        <div class="ctninput"><div class="codex">URL:</div><div class="inputshare"><input id="CTEMP" value="<?php echo $URLrdn;?>" /></div></div>
    </div>
<? } // IF 4 ?>
<? if ($modo==5) { ?>
<div id="contenido-statico">
<h1 id="titular"><?php echo $h1?></h1>
<? if ($page=='400' || $page=='401' || $page=='403' || $page=='404' || $page=='500' || $page=='up' || $page=='up/temp' || $page=='up/working' || $page=='images'|| $page=='generico') { ?>
    <p align="center">
    <?php echo $explained?>
    </p>
<? } 
} ?>

<? if ($modo==2 || $modo==3) { // EL IF 2-3
    if (isset($v)) { 
        $quehace = TXT_SEEING;
    } else {
        if ($red==1) {
            $retxt = ' '.TXT_AND_RESIZE;
        }
        $quehace = TXT_DID.$retxt;
    }
    $mensaje = $quehace.' <a href="'.PATH_SCRIPT.DIR_IM.$folhost.$name.'">'.$name.'</a> ('.$tamano_kb.' KB - '.$ancho.'x'.$alto.'px)'.$colita;

?>
<div id="subiste-viendo"><h1><?php echo $mensaje?></h1></div>

<div id="contenido">
    <div id="tools"><div id="fullsize"<? if ($ancho<=900) { echo ' style="display: none; "'; }?>><a href="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>" title="<?php echo $ancho?>x<?php echo $alto?>"><?php echo FULL_SIZE;?></a></div><div id="sharethis"><a id="sharing"><?php echo SHARE;?></a><a id="sharing-close" style="display: none;"><?php echo SHARE;?></a></div></div>
    <div id="imagen"><a href="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>"><img src="<?php echo PATH_SCRIPT.DIR_IM.$folhost.$name?>" alt="" <? if ($ancho>=900) { echo 'width="900" '; } ?>/></a></div>
    
    <div id="share" <? if (isset($v) && $v!=='rec.php') { ?>style="display: none;"<? } ?>>
    
        <div id="mostrar_mas_enlaceview">
            <h2 id="mev"><?php echo SHARE_THUMB_VIEWER;?></h2>
            <div class="ctninput">
                <div class="codex">HTML:</div><div class="inputshare">
                <input tabindex="1" value="&lt;a href=&quot;<?php echo $URLvim?>&quot;&gt;&lt;img src=&quot;<?php echo $URLthm?>&quot; border=&quot;0&quot;&gt;&lt;/a&gt;" onclick="this.focus();this.select();" />
                </div>
            </div>
            <div class="ctninput">
                <div class="codex"><?php echo SHARE_FORUMS;?>:</div><div class="inputshare">
                <input tabindex="2" value="[url=<?php echo $URLvim?>][img]<?php echo $URLthm?>[/img][/url]" onclick="this.focus();this.select();" />
                </div>
            </div>
        </div>
        
        <div id="mostrar_directa">
            <h2 id="md"><?php echo SHARE_DIRECT;?></h2>
            <div class="ctninput">
                <div class="codex"><a href="<?php echo $URLvim?>" target="_blank"><?php echo SHARE_VIEWER;?>:</a></div>
                <div class="inputshare"><input tabindex="3" value="<?php echo $URLvim?>" onclick="this.focus();this.select();" /></div>
            </div>
            <div class="ctninput">
                <div class="codex"><?php echo SHARE_FORUMS;?>:</div>
                <div class="inputshare"><input tabindex="4" value="[img]<?php echo $URLimg?>[/img]" onclick="this.focus();this.select();" /></div>
            </div>
            <div class="ctninput">
                <div class="codex"><a href="<?php echo $URLimg?>" target="_blank">URL:</a></div>
                <div class="inputshare"><input tabindex="5"value="<?php echo $URLimg?>" onclick="this.focus();this.select();" /></div>
            </div>
            <? if (isset($ShortURL) && !empty($ShortURL)) { ?>
            <div class="ctninput">
                <div class="codex"><a href="<?php echo $ShortURL?>" target="_blank"><?php echo $tiny_service;?>:</a></div>
                <div class="inputshare"><input id="tinyurl" tabindex="6" value="<?php echo $ShortURL?>" onclick="this.focus();this.select();" /></div>
            </div>
            <? } ?>
        </div>
        
        <div id="mostrar_social">
        <h2 id="mes"><?php echo SHARE_SOCIAL;?></h2>
        <div class="ctninput-social">
            <div class="codex"><?php echo SHARE_NETWORKS;?>:</div>
            <a href="http://del.icio.us/post?url=<?php echo $URLshr?>" id="delicious" target="_blank"></a>
            <a href="http://www.facebook.com/share.php?u=<?php echo $URLshr?>" id="facebook" target="_blank"></a>
            <a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=<?php echo $URLshr?>" id="google" target="_blank"></a>
            <a href="http://www.tumblr.com/share?v=3&amp;u=<?php echo $eu_img?>" id="tumblr" target="_blank"></a>
            <a href="http://twitter.com/home?status=viendo%20<? echo cortar_url($URLshr); ?>" id="twitter" target="_blank"></a>
            <a href="http://vi.sualize.us/post/?popup=1&amp;address=<?php echo $eu_img?>&amp;referenceURL=<?php echo URL_SCRIPT;?>" id="visualizeus" target="_blank"></a>
            <div id="quecosa">
                <span id="d-delicious" style="display: none;">del.icio.us</span>
                <span id="d-facebook" style="display: none;">facebook</span>
                <span id="d-google" style="display: none;">Google Bookmarks</span>
                <span id="d-tumblr" style="display: none;">tumblr</span>
                <span id="d-twitter" style="display: none;"><?php echo SHARE_TWITTER;?></span>
                <span id="d-visualizeus" style="display: none;">vi.sualize.us</span>
            </div>
        </div>
        </div>
    </div>
<? } ?>

</div> <!-- contenido -->

<div id="foot"><p><center><font size="0.4" face="Verdana" color="#736F6E">Disclaimer: Imgshared.com is not responsible for any content uploaded by it's users, if however you belive an image should be reviewed, contact imgshared@gmail.com with the URL.
</center>
</font>
</p>

</body>
</html>
 
gamerlv said:
imgshared said:
Okay here you go

Code:
<entire index.php>
Hmmm, Not to be disturbing, but for what is this?
It doesn't look related to this thread.

ah I can understand your confusion, well you see basically what I posted is the index. BUT stripped down with no scripts or anything, so essentially what you get is a template, with a DIV block in the middle to paste any php scripts IE my gallery script, or a contact script or whatever tickles your chin.

I hope this clears up the confusion.
 
It doesn't work
i uploaded the phpgallery folder and the gallery.php
but when i open the page it says:

Fatal error: Uncaught exception 'ErrorException' with message 'imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file ' in /var/www/web98/html/fiveload/phpgallery/include_imaging_gd.php:17 Stack trace: #0 /var/www/web98/html/fiveload/phpgallery/include_imaging_gd.php(17): exception_error_handler('images/fondo2wn...') #1 /var/www/web98/html/fiveload/phpgallery/include_imaging_gd.php(23): PhpGallery_Impl_LoadImage() #2 /var/www/web98/html/fiveload/phpgallery/include_phpgallery.php(643): PhpGallery_GetPhotoDimensions('images/fondo2wn...') #3 /var/www/web98/html/fiveload/phpgallery/include_phpgallery.php(669): PhpGallery->Provider_UpdatePhoto('images/fondo2wn...') #4 /var/www/web98/html/fiveload/phpgallery/include_phpgallery.php(286): PhpGallery->Provider_GetPhotoInfo(NULL, 'fondo2wnw.jpg', 'fondo2wnw.jpg', '') #5 /var/www/web98/html/fiveload/phpgallery/include_phpgallery.php(269): PhpGallery->_GetCategoryDataImpl(NULL, ' in /var/www/web98/html/fiveload/phpgallery/include_imaging_gd.php on line 17
 
I had it working one time and then it stopped. Now I see this:

teh.png
 
I have this working just fine but would like to enlarge the thumbs a bit. I've been going through the code but I just don't see where to make the change. Has anyone changed this already and would you be willing to point me as to where to look to make this change? Thanks.
 
chrishicks said:
I have this working just fine but would like to enlarge the thumbs a bit. I've been going through the code but I just don't see where to make the change. Has anyone changed this already and would you be willing to point me as to where to look to make this change? Thanks.
for chev 1.9: config.php lines 37 - 39
Code:
// Thumbs
$mini_ancho = '150'; // Thumb width (pixels)
$mini_alto = '150'; // Thumb height (pixels)
 
Wow, a long thread going on, well, it will take alot of my time to read all the posts but I wish I have time to read them all. anyways it will be a great place to learn.
 
Few questions...

1. Does anyone know how to sort the images by most recently uploaded, instead of by name?

2. Is there a way to make my images span further across the page? Right now I'm only getting 8 across, and there is a ton of empty space on either side of the images.

3. I edited the popup to include the url of the image below the image name, but I would rather just have a button or link that copies the URL of the image to their clipboard. Is there a simple way of doing this?

Thanks!
 
i took a look at the code for the project, i cant really see any of the chevereto code in there, but they have definatly copied the look of the site and the same ideas. looks crap anyway. the coding is very premature, it is in no way as complex as rodolfo's work.
 
Bonkaz said:
i took a look at the code for the project, i cant really see any of the chevereto code in there

Yea, same here. I checked the code after I made that post. I'm a little confused though as to why the OP is here. His site is obviously from codefuture.
 
Back
Top