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ı.