saat yerine ne kadar zaman geçmiş

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ÅŸtir
Kod: [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.php
bul
Kod: [Seç]
, $txt['yesterday_today']sonrasına ekle
Kod: [Seç]
, $txt['relative_today']/default/languages/index.turkish.phpbul
Kod: [Seç]
?>üstüne ekle
Kod: [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:

Yorum yapma kapalı.