Pagina 1 di 1

Problema modifica post

Inviato: 14/05/2011, 16:39
da theco
Ciao a tutti.
Ho un problema: quando modifico un post, non esce la scritta "modificato da picopallino il giorno tal dei tali". Tale avviso compare solo se inserisco qualcosa nel campo "motivo della modifica". Ho provato a controllare nel database ed effettivamente sembra che il campo post_edit_time non viene cambiato se non inserisco qualcosa nella motivazione.
Come posso sistemare?

Re: Problema modifica post

Inviato: 14/05/2011, 18:20
da Carlo
Non è un problema, è normale.

Puoi risolvere al massimo con una MOD.

Re: Problema modifica post

Inviato: 14/05/2011, 22:41
da frankie_ita77
root/includes/functions_posting.php

Trova:

Codice: Seleziona tutto

                case 'edit_topic':

                 // If edit reason is given always display edit info

                 // If editing last post then display no edit info
                 // If m_edit permission then display no edit info
                 // If normal edit display edit info

                 // Display edit info if edit reason given or user is editing his post, which is not the last within the topic.
                 if ($data['post_edit_reason'] || (!$auth->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post')))
                 {
                    $sql_data[POSTS_TABLE]['sql'] = array(
                       'post_edit_time'   => $current_time,
                       'post_edit_reason'   => $data['post_edit_reason'],
                       'post_edit_user'   => (int) $data['post_edit_user'],
                    );

                    $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';
                 }
                 else if (!$data['post_edit_reason'] && $mode == 'edit' && $auth->acl_get('m_edit', $data['forum_id']))
                 {
                    $sql_data[POSTS_TABLE]['sql'] = array(
                       'post_edit_reason'   => '',
                    );
                 }

                 // If the person editing this post is different to the one having posted then we will add a log entry stating the edit
                 // Could be simplified by only adding to the log if the edit is not tracked - but this may confuse admins/mods
                 if ($user->data['user_id'] != $poster_id)
                 {
                    $log_subject = ($subject) ? $subject : $data['topic_title'];
                    add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST']);
                 }

                 if (!isset($sql_data[POSTS_TABLE]['sql']))    
Sostituisci con:

Codice: Seleziona tutto

                case 'edit_topic':

                 // If edit reason is given always display edit info

                 // If editing last post then display no edit info
                 // If m_edit permission then display no edit info
                 // If normal edit display edit info

                 // Display edit info if edit reason given or user is editing his post, which is not the last within the topic.
                    $sql_data[POSTS_TABLE]['sql'] = array(
                       'post_edit_time'   => $current_time,
                       'post_edit_reason'   => $data['post_edit_reason'],
                       'post_edit_user'   => (int) $data['post_edit_user'],
                    );

                    $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';

                 // If the person editing this post is different to the one having posted then we will add a log entry stating the edit
                 // Could be simplified by only adding to the log if the edit is not tracked - but this may confuse admins/mods
                       $log_subject = ($subject) ? $subject : $data['topic_title'];
                    add_log('mod', $data['forum_id'], $data['topic_id'], 'LOG_POST_EDITED', $log_subject, (!empty($username)) ? $username : $user->lang['GUEST']);
                 
                 if (!isset($sql_data[POSTS_TABLE]['sql']))    

Re: Problema modifica post

Inviato: 15/05/2011, 11:13
da theco
Ho inserito la mod ed ora si comporta come volevo io!
Grazie mille a entrambi.

Come mai questa funzione non è attivata nella versione di base?

Re: Problema modifica post

Inviato: 15/05/2011, 14:54
da Angolo
Mi sembra evidente... se fosse attivo, si vedrebbero sempre i messaggi modificati.
Io posso volerli modificare, e non fare vedere immediatamente, se e quando sono stati modificati.

Se lo si vuole far sapere, si inserisce la motivazione.

Semmai, si può considerare un problema, la mancata informazione nel log... lì l'informazione dovrebbe essere sempre presente... e non lo è...