You're welcome PogenWurst
Do not apologize for being late, moderating a forum is such a big piece of work I couldn't blame you !
1 2006-01-23 09:09
Re: How can I do these things on my forums? (15 replies, posted in PunBB 1.2 discussion)
2 2006-01-09 09:36
Re: How can I do these things on my forums? (15 replies, posted in PunBB 1.2 discussion)
Thanks for your support Smartys, glad you appreciated my fix before crying at me, very positive attitude
I thought this mod would be welcomed better, but, anyway, I won't discuss more on that and here is the fix for the fix (fixing, coding, same thing isn't it? )
6 ) After modifications around line 126 (step 2) add:
$errormessagestring='Post id='.$id.', Last poster='.$cur_post['poster'].' Forum id='.$fid;
$db->query('UPDATE '.$db->prefix.'forums SET last_post='.time().', last_post_id='.$id.', last_poster=\''.$cur_post['poster'].'\' WHERE id='.$cur_post['fid']) or error('Unable to update forums. '.$errormessagestring, __FILE__, __LINE__, $db->error());
The edited message now appears in the main page of the forum as new. Happy foruming!
3 2006-01-06 16:05
Re: How can I do these things on my forums? (15 replies, posted in PunBB 1.2 discussion)
Hello,
I might have a quickfix for question #1:
1) open 'edit.php' in the root directory:
2) find around line 126:
// Update the post
$db->query('UPDATE '.$db->prefix.'posts SET message=\''.$db->escape($message).'\', hide_smilies=\''.$hide_smilies.'\''.$edited_sql.' WHERE id='.$id) or error('Unable to update post', __FILE__, __LINE__, $db->error());
3) Add below:
//----------------- Mark edited message as new--------------
$errormessagestring='Post id='.$id.', Last poster='.$cur_post['poster'].' Topic id='.$cur_post['tid'];
$db->query('UPDATE '.$db->prefix.'topics SET last_post='.time().', last_post_id='.$id.', last_poster=\''.$cur_post['poster'].'\' WHERE id='.$cur_post['tid'].' OR moved_to='.$cur_post['tid']) or error('Unable to update topic. '.$errormessagestring, __FILE__, __LINE__, $db->error());
4) open 'view_forum.php' (again in the root directory)
5) find around line 166:
if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
5) replace by:
if (!$pun_user['is_guest'] && (($cur_topic['last_post'] > $pun_user['last_visit']) OR ($cur_topic['edited'] > $pun_user['last_visit'])) && $cur_topic['moved_to'] == null)
This should do the trick with no excessive costs