non va ....ecco cosa dice il tutorial
Apri---posting.php---
cerca
switch ( $mode )
{
case 'editpost':
case 'newtopic':
case 'reply':
Aggiungi dopo
//
// BEGIN - Anti Double Post Mod
//
if ( $mode != 'newtopic' )
{
$edit_overtime = false;
if ( !$is_auth['auth_mod'] && $board_config['edit_time'] != 0 )
{
$current_time = time();
$difference_min = ($current_time - $post_info['post_time']) / 60;
$edit_overtime = $difference_min > $board_config['edit_time'];
}
$sql = "SELECT topic_last_post_id
FROM " . TOPICS_TABLE . "
WHERE topic_id = " . $topic_id;
if (!$topic_query = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, $lang['Query_topic']);
}
$topic = $db->sql_fetchrow($topic_query);
$last_post_id = $topic['topic_last_post_id'];
$sql = "SELECT poster_id
FROM " . POSTS_TABLE . "
WHERE post_id = " . $last_post_id;
if (!$post_query = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, $lang['Query_post']);
}
$post = $db->sql_fetchrow($post_query);
$last_user = $post['poster_id'];
if (($userdata['user_id'] == $last_user) && ($is_auth['auth_edit']) && (!$edit_overtime) && (!$is_auth['auth_mod']))
{
message_die(GENERAL_MESSAGE,$lang['No_doublepost']);
}
}
//
// END - Anti Double Posts Mod
//
ed ecco ----posting.php----modificato
switch ( $mode )
{
case 'editpost':
case 'newtopic':
case 'reply':
//
// BEGIN - Anti Double Post Mod
//
if ( $mode != 'newtopic' )
{
$edit_overtime = false;
if ( !$is_auth['auth_mod'] && $board_config['edit_time'] != 0 )
{
$current_time = time();
$difference_min = ($current_time - $post_info['post_time']) / 60;
$edit_overtime = $difference_min > $board_config['edit_time'];
}
$sql = "SELECT topic_last_post_id
FROM " . TOPICS_TABLE . "
WHERE topic_id = " . $topic_id;
if (!$topic_query = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, $lang['Query_topic']);
}
$topic = $db->sql_fetchrow($topic_query);
$last_post_id = $topic['topic_last_post_id'];
$sql = "SELECT poster_id
FROM " . POSTS_TABLE . "
WHERE post_id = " . $last_post_id;
if (!$post_query = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, $lang['Query_post']);
}
$post = $db->sql_fetchrow($post_query);
$last_user = $post['poster_id'];
if (($userdata['user_id'] == $last_user) && ($is_auth['auth_edit']) && (!$edit_overtime) && (!$is_auth['auth_mod']))
{
message_die(GENERAL_MESSAGE,$lang['No_doublepost']);
}
}
//
// END - Anti Double Posts Mod
//
apro----language/lang_italian/lang_main.php
cerco
e aggiungo dopo
$lang['No_doublepost'] = 'Sei stata l'ultima persona a scrivere in questo argomento: non puoi inviare nuovi messaggi ma poi usare tasto modifica per aggiungere ulteriori informazioni al tuo messaggio.';
$lang['Query_topic'] = 'Could not query topics table';
$lang['Query_post'] = 'Could not query posts table';
ed ecco il codice modificato
$lang['No_post_mode'] = 'Modo di risposta non specificato'; // If posting.php is called without a mode (newtopic/reply/delete/etc, shouldn't be shown normaly)
$lang['No_doublepost'] = 'Sei stata l'ultima persona a scrivere in questo argomento: non puoi inviare nuovi messaggi ma poi usare tasto modifica per aggiungere ulteriori informazioni al tuo messaggio.';
$lang['Query_topic'] = 'Could not query topics table';
$lang['Query_post'] = 'Could not query posts table';
dove ho sbagliatto?