I'm very surprised nobody haven't observed that after send edited post, column of "forum last post" doesn't update.
I write this fix and I please author of mod to prepare an update to 1.0.2. ;]
- Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
$sql = 'SELECT f.*, t.*
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
WHERE t.topic_id = $topic_id
#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = 'SELECT f.*, t.*, u.user_colour
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f, " . USERS_TABLE . " u
WHERE t.topic_id = $topic_id
AND u.user_id = topic_last_poster_id
#
#-----[ FIND ]------------------------------------------
#
$sql = 'SELECT f.*, t.*, p.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$sql = 'SELECT f.*, t.*, p.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
, u.user_colour
#
#-----[ FIND ]------------------------------------------
#
$post_data['icon_id'] = (!isset($post_data['icon_id']) || in_array($mode, array('quote', 'reply'))) ? 0 : (int) $post_data['icon_id'];
#
#-----[ BEFORE ADD ]------------------------------------------
#
$post_data['user_colour'] = (isset($post_data['user_colour'])) ? (string) $post_data['user_colour'] : '';
#
#-----[ FIND ]------------------------------------------
#
'poster_id' => (int) $post_data['poster_id'],
#
#-----[ AFTER ADD ]------------------------------------------
#
'poster_colour' => (string) $post_data['user_colour'],
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_posting.php
#
#-----[ FIND ]------------------------------------------
#
update_post_information('forum', $data['forum_id']);
markread('post', $data['forum_id'], $data['topic_id'], $data['post_time']);
#
#-----[ AFTER ADD ]------------------------------------------
#
$sql_update_forums = 'UPDATE ' . FORUMS_TABLE . '
SET forum_last_post_time = ' . $current_time . ',
forum_last_post_id = ' . $data['post_id'] . ',
forum_last_post_subject = "' . $subject . '",
forum_last_poster_id = ' . $data['poster_id'] . ',
forum_last_poster_name = "' . $username . '",
forum_last_poster_colour = "' . $data['poster_colour'] . '"
WHERE forum_id = ' . $data['forum_id'];
$db->sql_query($sql_update_forums);
#
#-----[ EOM ]------------------------------------------
#
Best regards,
pawelooss
