http://custom.simplemachines.org/mods/index.php?mod=2432
facebooktaki gibi ne kadar zaman gecmisse o yazacak
1 dakika önce
1 saat önce gibisinden
Sources/Subs.phpbul
Kod: [Seç]
if ($then['yday'] == $now['yday'] && $then['year'] == $now['year'])
return $txt['today'] . timeformat($log_time, $today_fmt, $offset_type);DeÄŸiÅŸtirKod: [Seç]
// Same day of the year, same year.... Today!
if ($then['yday'] == $now['yday'] && $then['year'] == $now['year'])
{
// SMF has room for relative dates, no?
if ($modSettings['todayMod'] == 3)
{
// Deetermine the relative dates
$seconds = $nowtime - $time;
$minutes = floor($seconds / 60);
$hours = floor($minutes / 60);
// Numbers need language strings, too
if ($hours > 0 && $minutes > 59)
$retVal = $hours . ' ' . ($hours == 1 ? $txt['hour'] : $txt['hours'] . ' ' . $txt['ago']);
elseif ($minutes > 0 && $seconds < 59)
$retVal = $minutes . ' ' . ($minutes == 1 ? $txt['minute'] : $txt['minutes'] . ' ' . $txt['ago']);
else
$retVal = $seconds . ' ' . ($seconds == 1 ? $txt['second'] : $txt['seconds'] . ' ' . $txt['ago']);
}
// Defaults FTW!
else
$retVal = $txt['today'] . timeformat($log_time, $today_fmt, $offset_type);
return $retVal;
}Sources/ManageSettings.phpbul
Kod: [Seç]
, $txt['yesterday_today']sonrasına ekleKod: [Seç]
, $txt['relative_today']/default/languages/index.turkish.phpbulKod: [Seç]
?>üstüne ekleKod: [Seç]
$txt['hours'] = 'Saat';
$txt['minutes'] = 'Dakika';
$txt['seconds'] = 'Saniye';
$txt['hour'] = 'Saat';
$txt['minute'] = 'Dakika';
$txt['second'] = 'Saniye';
$txt['ago'] = 'önce';
$txt['relative_today'] = 'Today with relative times';
Etiketler: Saat yerine ne kadar zaman geçmiş