Aby data była wyświetlana po polsku należy:
otwórz admin/adminfunctions.php
poszukajzamień naposzukajzmień naposzukajzmień nazapisz i zamknij
otwórz admin/users.php
poszukajzmień naposzukajzamień naposzukajzamień nazapisz i zamkij
otwórz archive/global.php
poszukajdodaj podzapisz i zamknij
otwórz global.php
poszukajdodaj podposzukajzmień naposzukajzamień nazapisz i zamknij
otwórz calendar.php
poszukajzamień naposzukajzmień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień nazapisz i zamknij
otwórz inc/class_session.php
poszukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzukajzamień naposzuakjzamień naposzukajzamień naposzukajzamień nazapisz i zakmnij
otwórz inc/functions.php
poszukajzamień naposzukajzamień naposzukajzamień naposzukajzamień nazapisz i zamknij
otwórz index.php
poszukajzamień nazapisz i zakmnij
otwórz member.php
poszukajzamień naposzukajzamień naposzukajzamień nazapisz i zakmnij
otwórz moderation.php
poszukajzamień na
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
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." © 2002-".my_date("Y")." <a href=\"http://www.mybboard.com\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";
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." © 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")
$this_year = my_date("Y");
// $this_year = my_date("Y");
$this_year = my_date("%Y"); // KK: (polish_time.mod)
$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:".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
otwórz admin/users.php
poszukaj
$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($user['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($user['timezone'] * 3600));
// 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));
$membday = gmdate($bdayformat, $membday);
// $membday = gmdate($bdayformat, $membday); // KK polish_time.mod
$membday = gmstrftime($bdayformat, $membday);
$membday = gmdate("F j", $membday);
// $membday = gmdate("F j", $membday); // KK polish_time.mod
$membday = gmstrftime("%e %B", $membday);
otwórz archive/global.php
poszukaj
require_once dirname(dirname(__FILE__))."/inc/init.php";
setlocale(LC_TIME, "pl_PL.UTF-8") ; // KK polish_time.mod
otwórz global.php
poszukaj
require_once dirname(__FILE__)."/inc/init.php";
setlocale(LC_TIME, "pl_PL.UTF-8") ; // KK polish_time.mod
$lang->welcome_current_time = sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
//$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
$copy_year = my_date("Y", time());
//$copy_year = my_date("Y", time()); // KK: polish_time.mod
+$copy_year = my_date("%Y", time());
otwórz calendar.php
poszukaj
if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5)
// 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)
$year = my_date("Y");
// $year = my_date("Y"); // KK: polish_time.mod
$year = my_date("%Y");
$month = my_date("n");
// $month = my_date("n"); // KK: polish_time.mod
$month = my_date("%m");
$days = my_date("t", $time);
// $days = my_date("t", $time); // KK: polish_time.mod
$days = date("t", $time); // strftime() nie ma takiej opcji
$day = my_date("j");
// $day = my_date("j"); // KK: polish_time.mod
$day = my_date("%e");
if($day == 1 && $month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
// 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)
for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
// 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++)
$time = mktime(0, 0, 0, $month, 1, $year);
// $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);
if($month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
// 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)
if((my_date("d") == $i) && (my_date("n") == $month) && (my_date("Y") == $year))
// 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))
for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
// 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++)
otwórz inc/class_session.php
poszukaj
$mybb->settings['dateformat'] = "m-d-Y";
// $mybb->settings['dateformat'] = "m-d-Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m-%e-%Y";
$mybb->settings['dateformat'] = "m-d-y";
// $mybb->settings['dateformat'] = "m-d-y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m-%e-%y";
$mybb->settings['dateformat'] = "m.d.Y";
// $mybb->settings['dateformat'] = "m.d.Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m.%e.%Y";
$mybb->settings['dateformat'] = "m.d.y";
// $mybb->settings['dateformat'] = "m.d.y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%m.%e.%y";
$mybb->settings['dateformat'] = "d-m-Y";
// $mybb->settings['dateformat'] = "d-m-Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e-%m-%Y";
$mybb->settings['dateformat'] = "d-m-y";
// $mybb->settings['dateformat'] = "d-m-y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e-%m-%y";
$mybb->settings['dateformat'] = "d.m.Y";
// $mybb->settings['dateformat'] = "d.m.Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e.%m.%Y";
$mybb->settings['dateformat'] = "d.m.y";
// $mybb->settings['dateformat'] = "d.m.y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e.%m.%y";
$mybb->settings['dateformat'] = "F jS, Y";
// $mybb->settings['dateformat'] = "F jS, Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%B %e, %Y";
$mybb->settings['dateformat'] = "l, F jS, Y";
// $mybb->settings['dateformat'] = "l, F jS, Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%A, %B %e, %Y";
$mybb->settings['dateformat'] = "jS F Y";
// $mybb->settings['dateformat'] = "jS F Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%e %B %Y";
$mybb->settings['dateformat'] = "l, jS F Y";
// $mybb->settings['dateformat'] = "l, jS F Y"; // KK: polish_time.mod
$mybb->settings['dateformat'] = "%A, %e %B %Y";
$mybb->settings['timeformat'] = "h:i a";
// $mybb->settings['timeformat'] = "h:i a"; // KK: polish_time.mod
$mybb->settings['timeformat'] = "%I:%M %p";
$mybb->settings['timeformat'] = "h:i A";
// $mybb->settings['timeformat'] = "h:i A"; // KK: polish_time.mod
$mybb->settings['timeformat'] = "%I:%M %P";
$mybb->settings['timeformat'] = "H:i";
// $mybb->settings['timeformat'] = "H:i"; // KK: polish_time.mod
$mybb->settings['timeformat'] = "%H:%M";
otwórz inc/functions.php
poszukaj
$date = gmdate($format, $stamp + ($offset * 3600));
// $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^
$stamp = time();
$todaysdate = gmdate($format, $stamp + ($offset * 3600));
$yesterdaysdate = gmdate($format, ($stamp - 86400) + ($offset * 3600));
// 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);
$format = str_replace("Y", $year, $format);
$format = str_replace("y", my_substr($year, -2), $format);
// 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);
$find = array('m', 'd', 'y', 'Y', 'j', 'S', 'F', 'l');
// $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
otwórz index.php
poszukaj
$bdaydate = my_date("j-n", $bdaytime, '', 0);
$year = my_date("Y", $bdaytime, '', 0);
// $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);
otwórz member.php
poszukaj
$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));
// 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));
$membday = date($bdayformat, $membday);
// $membday = date($bdayformat, $membday); // KK: polish_time.mod
$membday = strftime($bdayformat, $membday);
$membday = date("F j", $membday);
// $membday = date("F j", $membday); // KK: polish_time.mod
$membday = strftime("%e %B", $membday);
otwórz moderation.php
poszukaj
$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
// $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