For 1.4.0 Beta 3 users, please update this.
There are minor bugs but annoying in grid system.
For samples, you can see
http://arslantic.co.id/evo/
UPDATES
bug fix on the config’s default value overwritten:
index.php, line
60:
<?php highlighting
//if ($valconf[$dk]=='') {
if ( !isset($valconf[$dk]) && $dk!='captcha') {
please debug the index.php line 49 (of E2G 1.4.0 beta 4) like this:
<?php // highlighting
if (file_exists( E2G_MODULE_PATH . 'config.easy2gallery.php' )) {
require E2G_MODULE_PATH . 'config.easy2gallery.php';
foreach ($e2g as $ck => $cv) {
$keyconf[$ck] = $ck;
$valconf[$ck] = $cv;
}
}
// the default config will replace blank value of config's.
if (file_exists( E2G_MODULE_PATH . 'default.config.easy2gallery.php' )) {
require E2G_MODULE_PATH . 'default.config.easy2gallery.php';
foreach ($def_e2g as $dk => $dv) {
if ($valconf[$dk]=='') {
$e2g[$dk] = $dv;
}
}
$def_e2g = array();
unset($def_e2g);
}
to be:
<?php // highlighting
// CONFIGURATIONS
if (!file_exists(E2G_MODULE_PATH . 'config.easy2gallery.php')) {
// if config file has not been created, yet, this will create one
$createconfig = fopen(E2G_MODULE_PATH . 'config.easy2gallery.php', 'w+');
} else {
require_once E2G_MODULE_PATH . 'config.easy2gallery.php';
foreach ($e2g as $ck => $cv) {
$confkey[$ck] = $ck;
$confval[$ck] = $cv;
}
}
// the default config will replace any blank value of config's.
if (file_exists( E2G_MODULE_PATH . 'default.config.easy2gallery.php' )) {
require_once E2G_MODULE_PATH . 'default.config.easy2gallery.php';
// if config file is missing, this will create one
if (isset($createconfig)) {
$c = "<?php\r\n\$e2g = array (\r\n";
foreach($def_e2g as $dk => $dv) {
$c .= " '$dk' => ".(is_numeric($dv)?$dv:"'".addslashes($dv)."'").",\r\n";
}
$c .= ");\r\n?>";
fwrite($createconfig, $c);
fclose($createconfig);
unset($createconfig);
}
foreach ($def_e2g as $dk => $dv) {
if ( !isset($confkey[$dk]) && $dk!='captcha') {
$e2g[$dk] = $dv;
}
}
$def_e2g = array();
unset($def_e2g);
}
Open
config.libs.easy2gallery.php
At the top part, change this
<?php //highlighting
//$gid = (!empty($_GET['gid']) && is_numeric($_GET['gid'])) ? (int) $_GET['gid'] : ( !empty($gid) ? $gid : 1 );
$gid = $this->cl_cfg['gid'];
//$show_group = isset($show_group) ? $show_group : 'Gallery'.$gid;
$show_group = $this->cl_cfg['show_group'];
e2g.snippet.class.php, line
69
<?php // highlighting
//$cat_name_len = $this->cl_cfg['cat_name_len'];
$mbstring = $this->cl_cfg[['mbstring'];
$title_len = $this->cl_cfg['cat_name_len'];
change in e2g.module.class.php at line around 449 from:
<?php
foreach($_POST as $k => $v) {
$c .= "'$k' => ".(is_numeric($v)?$v:"'$v'").",\r\n";
}
to be
<?php
foreach($_POST as $k => $v) {
$c .= "'$k' => ".(is_numeric($v)?$v:"'".addslashes($v)."'").",\r\n";
}
show.easy2gallery.php
<?php // highligthing
ob_start();
header('Last-Modified: '.date('r'));
header('Accept-Ranges: bytes');
// header('Content-Length: '.$filesize2sent);
header('Content-type: image/jpeg');
header('Content-Disposition: inline; filename="'.$filename2send.'"');
imagejpeg($im);
header('Content-Length: ' . ob_get_length()); // try this
ob_end_flush();
imagedestroy($im);
} else {
header('Content-type: image/jpeg');
header('Location: '.$fp);
//readfile ('../../../'.$e2g['dir'].$path.$row['id'].$ext);
exit();
}