Acest snippet opreste autorul subiectului de la a-si face singur vizualizari la propriul subiect.
Autor: Martin
Deschide viewtopic.php
Cauta :
Code:
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
WHERE topic_id = $topic_id";
$db->sql_query($sql);
Inlocuieste cu :
Code:
if ($user->data['user_id'] != $topic_data['topic_poster'] && !$user->data['is_bot'])
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
WHERE topic_id = $topic_id";
$db->sql_query($sql);
}
Sursa : phpbbCodes.ro