witam mam pewien probelm nie moge znalesc jednej linijki w index.php z instrukcji tego moda przejrzalem caly plik i nie ma takiej ani podobnej =|
mam zrobic cos takiego i nie ma nigdzie tej linijki =/
Kod:
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
#
#-----[ AFTE, ADD ]------------------------------------------
#
// added for site History mod
$current_time=time();
$minutes = date('is', $current_time);
$hour_now = $current_time - (60*($minutes[0].$minutes[1])) - ($minutes[2].$minutes[3]);
// change the number late in the next line, to what ever time zone your forum is located, this need to be hard coded
// in the release of this mod, the number is 1
$dato=create_date('H', $current_time,1);
$timetoday = $hour_now - (3600*$dato);
$sql = 'SELECT COUNT(DISTINCT session_ip) as guests_today FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399);
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't retrieve guest user today data", "", __LINE__, __FILE__, $sql);
}
$guest_count = $db->sql_fetchrow ($result);
$sql = 'SELECT user_allow_viewonline, COUNT(*) as count FROM ' . USERS_TABLE . ' WHERE user_id!="'.ANONYMOUS.'" AND user_session_time >= '.$timetoday.' AND user_session_time< '.($timetoday+86399).' GROUP BY user_allow_viewonline';
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't retrieve user today data", "", __LINE__, __FILE__, $sql);
}
while ($reg_count = $db->sql_fetchrow ($result))
{
if ($reg_count['user_allow_viewonline'])
{
$logged_visible_today=$reg_count['count'];
}
else
{
$logged_hidden_today=$reg_count['count'];
}
}
$db->sql_freeresult($result);
$sql='UPDATE '.SITE_HISTORY_TABLE.' SET reg="'.$logged_visible_today.'", hidden="'.$logged_hidden_today.'", guests=
"'.$guest_count['guests_today'].'" WHERE date='.$hour_now;
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{
$sql = 'INSERT IGNORE INTO '.SITE_HISTORY_TABLE.' (date, reg, hidden, guests)
VALUES ('.$hour_now.', "'.$logged_visible_today.'", "'.$logged_hidden_today.'", "'.$guest_count['guests_today'].'")';
if ( !($db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Error create new site_hitory ', '', __LINE__, __FILE__, $sql);
}
}
if (isset($result))
{
$db->sql_freeresult($result);
}
Wgram forum, zainstaluje modyfikacje, przetłumacze mody na język polski etc.
http://vw-polo-forum.pl