$post_time_sql = ($mode == 'editpost' && $post_data['last_post']) ? ', post_time = ' . $current_time : '';
Ik ging er van uit dat $current_time zou worden vervangen door de tijd maar de interpreter ziet dat in dit geval niet.
Hehe, heb hem zelf nu ook maar even getest, werkt prima bij mij.
Samengevat:
Code: Selecteer alles
### Open functions_post.php en zoek:
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length, $post_moderated)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
### Hierna invoegen als het er nog niet staat
$current_time = time();
### Zoek
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}
### Voeg daarna in
// Edit the last post in a thread? Then update the time too, to keep the thread active
$post_time_sql = ($mode == 'editpost' && $post_data['last_post']) ? ', post_time = ' . $current_time : '';
### Dit stond er al daarna
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
### Verander vervolgens deze hele regel
$sql = ($mode != "editpost") ? "INSERT INTO " ....
### In deze:
$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_moderated) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig, $post_moderated)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig " . $post_time_sql . $edited_sql . " WHERE post_id = $post_id";
### EOM