News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Karma'da kalan süreyi gösterme..

Started by Hoochie Coochie Man, October 29, 2007, 05:53:36 PM

Previous topic - Next topic

Hoochie Coochie Man

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 yapımıdır..
Orjinal Konu
İnadına SMF 1.1.X



Advertisement: