Simple Machines Community Forum

SMF Support => Türkçe Bölümü (Turkish) => Language Specific Support => İpuçları ve Hileler => Topic started by: Hoochie Coochie Man on October 29, 2007, 05:53:36 PM

Title: Karma'da kalan süreyi gösterme..
Post by: Hoochie Coochie Man on October 29, 2007, 05:53:36 PM
Sources'de Karma.php dosyasın da..
Bul:
// Find out if this user has done this recently...
$request = db_query("
SELECT action
FROM {$db_prefix}log_karma
WHERE ID_TARGET = $_REQUEST[uid]
AND ID_EXECUTOR = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
list ($action) = mysql_fetch_row($request);
mysql_free_result($request);


Değiştir:
// Find out if this user has done this recently...
$request = db_query("
SELECT action, logTime
FROM {$db_prefix}log_karma
WHERE ID_TARGET = $_REQUEST[uid]
AND ID_EXECUTOR = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
list ($action, $time) = mysql_fetch_row($request);
mysql_free_result($request);


Bul:
// If you are gonna try to repeat.... don't allow it.
if ($action == $dir)
fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . '.', false);


Değiştir:
// If you are gonna try to repeat.... don't allow it.
if ($action == $dir)
{
// How much longer do they have to wait (in minutes)? Round to the nearest integer...
$waittime = round($modSettings['karmaWaitTime'] * 60) - ((time() - $time) / 60));
fatal_error($txt['smf62'] . ' ' . $modSettings['karmaWaitTime'] . ' ' . $txt[578] . ' (' . $waittime . ' more ' . $txt['totaltimelogged4'] . ')', false);
}


Bir Oldiesmann (http://www.simplemachines.org/community/index.php?action=profile;u=150) yapımıdır..
Orjinal Konu (http://www.simplemachines.org/community/index.php?topic=52254.msg372636#msg372636)
Title: Re: Karma'da kalan süreyi gösterme.. (Tüyo)
Post by: Hakanchess on July 15, 2008, 08:09:17 AM
Teşekkürler...
Title: Re: Karma'da kalan süreyi gösterme..
Post by: sevdaligul on August 30, 2008, 08:17:18 AM
emegine saglık