4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: omidkorat on April 07, 2008, 05:36:03 PM
-
This mode is useful for Iranian users.
Sample: http://gallery.dementor.ir/
1- First download "jalali.php" from below and copy it to "includes" folder on 4images root.
2- Backup "includes/functions.php" and then open it.
3-
Find this: (Line 705)
function format_date($format, $timestamp) {
global $user_info;
$timezone_offset = (defined("TIME_OFFSET")) ? TIME_OFFSET : 0;
return date($format, $timestamp + (3600 * $timezone_offset));
}
Replace with:
function format_date($format, $timestamp) {
global $user_info;
$timezone_offset = (defined("TIME_OFFSET")) ? TIME_OFFSET : 0;
$myformat = array('Y m d', ', G:H', 'D');
$firststep = date($myformat[0], $timestamp + (3600 * $timezone_offset));
$secstep = explode(" ", $firststep);
require_once 'jalali.php';
list( $jy, $jm, $jd ) = gregorian_to_jalali($secstep[0], $secstep[1], $secstep[2]);
$myday = date($myformat[2], $timestamp + (3600 * $timezone_offset));
return giveday($myday) . ' ' . $jd . ' ' . givemonth($jm) . ' ' . $jy.date($myformat[1], $timestamp + (3600 * $timezone_offset));
}
-
hi omidkorat,
moved to (Releases & Support)
thank you for sharing this mod!