Aby data była wyświetlana po polsku należy:

otwórz admin/adminfunctions.php
poszukaj
echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.com\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("Y")." <a href=\"http://www.mybboard.com\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";
zamień na
echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.com\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("%Y")." <a href=\"http://www.mybboard.com\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n"; // KK: (polish_time.mod) my_date("Y") -> my_date("%Y")
poszukaj
$this_year = my_date("Y");
zmień na
//    $this_year = my_date("Y");
$this_year = my_date("%Y");    // KK: (polish_time.mod)
poszukaj
$theme['css'] = "/**\n * CSS for theme \"{$theme['name']}\" (tid {$theme['tid']})\n * Cached:".my_date("r")."\n *\n * DO NOT EDIT THIS FILE\n *\n */\n\n".$theme['css'];
zmień na
// $theme['css'] = "/**\n * CSS for theme \"{$theme['name']}\" (tid {$theme['tid']})\n * Cached:".my_date("r")."\n *\n * DO NOT EDIT THIS FILE\n *\n */\n\n".$theme['css'];
$theme['css'] = "/**\n * CSS for theme \"{$theme['name']}\" (tid {$theme['tid']})\n * Cached:".date("r")."\n *\n * DO NOT EDIT THIS FILE\n *\n */\n\n".$theme['css']; // KK: (polish_time.mod) - strftime("%a, %d %b %Y %T %Z") to nie to samo
zapisz i zamknij

otwórz admin/users.php
poszukaj
$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($user['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($user['timezone'] * 3600));
zmień na
// KK: polish_time.mod
// $memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($user['timezone'] * 3600));
// $memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($user['timezone'] * 3600));
$memlocaldate = gmstrftime($mybb->settings['dateformat'], time() + ($user[timezone] * 3600));
$memlocaltime = gmstrftime($mybb->settings['timeformat'], time() + ($user[timezone] * 3600));
poszukaj
$membday = gmdate($bdayformat, $membday);
zamień na
// $membday = gmdate($bdayformat, $membday);   // KK polish_time.mod
$membday = gmstrftime($bdayformat, $membday);
poszukaj
$membday = gmdate("F j", $membday);
zamień na
// $membday = gmdate("F j", $membday);    // KK polish_time.mod
$membday = gmstrftime("%e %B", $membday);
zapisz i zamkij

otwórz archive/global.php
poszukaj
require_once dirname(dirname(__FILE__))."/inc/init.php";
dodaj pod
setlocale(LC_TIME, "pl_PL.UTF-8") ;        // KK polish_time.mod
zapisz i zamknij

otwórz global.php
poszukaj
require_once dirname(__FILE__)."/inc/init.php";
dodaj pod
setlocale(LC_TIME, "pl_PL.UTF-8") ;        // KK polish_time.mod
poszukaj
$lang->welcome_current_time = sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
zmień na
//$lang->welcome_current_time = sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
+$lang->welcome_current_time = sprintf($lang->welcome_current_time, $timenow.', '.$datenow); //KK: polish_time.mod
poszukaj
$copy_year = my_date("Y", time());
zamień na
//$copy_year = my_date("Y", time());  // KK: polish_time.mod
+$copy_year = my_date("%Y", time());
zapisz i zamknij

otwórz calendar.php
poszukaj
if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5)
zamień na
// if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5)  // KK: polish_time.mod
if($mybb->input['year'] && $mybb->input['year'] <= my_date("%Y")+5)
poszukaj
$year = my_date("Y");
zmień na
// $year = my_date("Y");  // KK: polish_time.mod
$year = my_date("%Y");
poszukaj
$month = my_date("n");
zamień na
// $month = my_date("n");  // KK: polish_time.mod
$month = my_date("%m");
poszukaj
$days = my_date("t", $time);
zamień na
// $days = my_date("t", $time);  // KK: polish_time.mod
$days = date("t", $time);  // strftime() nie ma takiej opcji
poszukaj
$day = my_date("j");
zamień na
// $day = my_date("j");  // KK: polish_time.mod
$day = my_date("%e");
poszukaj
if($day == 1 && $month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
zamień na
// if($day == 1 && $month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)  // KK: polish_time.mod
if($day == 1 && $month == 3 && date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)    // strftime() nie ma "L" (leap year)
poszukaj
for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
zamień na
// for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)  // KK: polish_time.mod
for($i = my_date("%Y"); $i < (my_date("%Y") + 5); $i++)
poszukaj
$time = mktime(0, 0, 0, $month, 1, $year);
zamień na
// $time = mktime(0, 0, 0, $month, 1, $year); // KK: polish_time.bug - Using mktime() produces bad day in some timezones
$time = gmmktime(0, 0, 0, $month, 1, $year);
poszukaj
if($month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
zamień na
// if($month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1) // KK: polish_time.mod
if($month == 3 && date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
poszukaj
if((my_date("d") == $i) && (my_date("n") == $month) && (my_date("Y") == $year))
zamień na
// if((my_date("d") == $i) && (my_date("n") == $month) && (my_date("Y") == $year))  // KK: polish_time.mod
if((my_date("%e") == $i) && (my_date("%m") == $month) && (my_date("%Y") == $year))
poszukaj
for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
zamień na
// for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)    // KK: polish_time.mod
for($i = my_date("%Y"); $i < (my_date("%Y") + 5); $i++)
zapisz i zamknij

otwórz inc/class_session.php
poszukaj
$mybb->settings['dateformat'] = "m-d-Y";
zamień na
// $mybb->settings['dateformat'] = "m-d-Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m-%e-%Y";
poszukaj
$mybb->settings['dateformat'] = "m-d-y";
zamień na
// $mybb->settings['dateformat'] = "m-d-y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m-%e-%y";
poszukaj
$mybb->settings['dateformat'] = "m.d.Y";
zamień na
// $mybb->settings['dateformat'] = "m.d.Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m.%e.%Y";
poszukaj
$mybb->settings['dateformat'] = "m.d.y";
zamień na
// $mybb->settings['dateformat'] = "m.d.y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m.%e.%y";
poszukaj
$mybb->settings['dateformat'] = "d-m-Y";
zamień na
// $mybb->settings['dateformat'] = "d-m-Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e-%m-%Y";
poszukaj
$mybb->settings['dateformat'] = "d-m-y";
zamień na
// $mybb->settings['dateformat'] = "d-m-y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e-%m-%y";
poszukaj
$mybb->settings['dateformat'] = "d.m.Y";
zamień na
// $mybb->settings['dateformat'] = "d.m.Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e.%m.%Y";
poszukaj
$mybb->settings['dateformat'] = "d.m.y";
zamień na
// $mybb->settings['dateformat'] = "d.m.y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e.%m.%y";
poszukaj
$mybb->settings['dateformat'] = "F jS, Y";
zamień na
// $mybb->settings['dateformat'] = "F jS, Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%B %e, %Y";
poszukaj
$mybb->settings['dateformat'] = "l, F jS, Y";
zamień na
// $mybb->settings['dateformat'] = "l, F jS, Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%A, %B %e, %Y";
poszukaj
$mybb->settings['dateformat'] = "jS F Y";
zamień na
// $mybb->settings['dateformat'] = "jS F Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e %B %Y";
poszukaj
$mybb->settings['dateformat'] = "l, jS F Y";
zamień na
// $mybb->settings['dateformat'] = "l, jS F Y";  // KK: polish_time.mod
$mybb->settings['dateformat'] = "%A, %e %B %Y";
poszuakj
$mybb->settings['timeformat'] = "h:i a";
zamień na
// $mybb->settings['timeformat'] = "h:i a";  // KK: polish_time.mod
$mybb->settings['timeformat'] = "%I:%M %p";
poszukaj
$mybb->settings['timeformat'] = "h:i A";
zamień na
// $mybb->settings['timeformat'] = "h:i A";  // KK: polish_time.mod
$mybb->settings['timeformat'] = "%I:%M %P";
poszukaj
$mybb->settings['timeformat'] = "H:i";
zamień na
// $mybb->settings['timeformat'] = "H:i";  // KK: polish_time.mod
$mybb->settings['timeformat'] = "%H:%M";
zapisz i zakmnij

otwórz inc/functions.php
poszukaj
$date = gmdate($format, $stamp + ($offset * 3600));
zamień na
// $date = gmdate($format, $stamp + ($offset * 3600));
// KK: (polish_time.mod)
$calculated_stamp = $stamp + ($offset * 3600) ; // KK
if (strstr($format, '%I:%M'))
{
    $new_format = str_replace('%I:%M %p', gmdate('h:i a', $calculated_stamp), $format) ;
    $new_format = str_replace('%I:%M %P', gmdate('h:i A', $calculated_stamp), $new_format) ;
}
else
{
    $new_format = $format ;
}
$date = gmstrftime($new_format, $calculated_stamp);
// KK^
poszukaj
$stamp = time();
$todaysdate = gmdate($format, $stamp + ($offset * 3600));
$yesterdaysdate = gmdate($format, ($stamp - 86400) + ($offset * 3600));
zamień na
// KK: (polish_time.mod) - dla optymalizacji
// $stamp = time();
// $todaysdate = gmdate($format, $stamp + ($offset * 3600));
// $yesterdaysdate = gmdate($format, ($stamp - 86400) + ($offset * 3600));
$stamp = time() + ($offset * 3600);
$todaysdate = gmdate($format, $stamp);
$yesterdaysdate = gmdate($format, $stamp - 86400);
poszukaj
$format = str_replace("Y", $year, $format);
$format = str_replace("y", my_substr($year, -2), $format);
zamień na
// KK: polish_time.mod
// $format = str_replace("Y", $year, $format);
// $format = str_replace("y", my_substr($year, -2), $format);
$format = str_replace("%Y", $year, $format);
$format = str_replace("%y", substr($year, -2), $format);
poszukaj
$find = array('m', 'd', 'y', 'Y', 'j', 'S', 'F', 'l');
zamień na
// $find = array('m', 'd', 'y', 'Y', 'j', 'S', 'F', 'l');    // KK: polish_time.mod
$find = array('%m', '%d', '%y', '%Y', '%e', '', '%B', '%A'); // 'S' - removed... strftime does not have it
zapisz i zamknij

otwórz index.php
poszukaj
$bdaydate = my_date("j-n", $bdaytime, '', 0);
$year = my_date("Y", $bdaytime, '', 0);
zamień na
// $bdaydate = my_date("j-n", $bdaytime, '', 0);  // KK: polish_time.mod
// $year = my_date("Y", $bdaytime, '', 0);
$bdaydate = my_date("%e-%m", $bdaytime, '', 0);
$year = my_date("%Y", $bdaytime, '', 0);
zapisz i zakmnij

otwórz member.php
poszukaj
$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));
zamień na
// KK: polish_time.mod
// $memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
// $memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));
$memlocaldate = gmstrftime($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
$memlocaltime = gmstrftime($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));
poszukaj
$membday = date($bdayformat, $membday);
zamień na
// $membday = date($bdayformat, $membday);  // KK: polish_time.mod
$membday = strftime($bdayformat, $membday);
poszukaj
$membday = date("F j", $membday);
zamień na
// $membday = date("F j", $membday);  // KK: polish_time.mod
$membday = strftime("%e %B", $membday);
zapisz i zakmnij

otwórz moderation.php
poszukaj
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
zamień na
// $modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);  // KK: polish_time.mod
$modaction['dateline'] = my_date("%d %b %G, %H:%M", $modaction['dateline']);

Autorem tego moda jest Krzysztof Kozłowski źródło na stronie.

W panelu admina w ustawieniach daty "Date and Time Formats" dajemy kolejno:
%e.%m.%G
%H:%M
%E %B %G
ps
nie jestem pewien co do "%G" jak sprawdzę to napisze, bo nie pamiętam :)