miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Take editing date into sorting attention

 
Author George
Partaker
#1 | Posted: 14 Mar 2006 08:21 
Is there any way to change the date of <b>Latest Reply</b> when <i>editing</i> an entry, thereby putting it on the top?

Author Team
8-)
#2 | Posted: 14 Mar 2006 11:34 
Messages are sorted (put on top) in descending order by their increment ID, not date. So, even if the date would be updated within editing, it doesn't affect order. There is a way, but a lot of modifications required: creating index for date field in database (and slowing down the database), rewriting all order procedures, update when editing a message etc.

Author Ivan
Advanced Member
#3 | Posted: 14 Mar 2006 12:38 
In addition, there's no sense in that. If so, when one changes even a letter in his message, it will stand at first place again. Five letter corrections - five times :))) And all that - without any connection with the conversation :)))

For example there is some topic. And you reply: Ye , I agre !!

[some post]

You again: Yes, I agre !!

[some post]

You again: Yes, I agree!!

[some post]

You again: Yes, I agree!!! (this time with three exclamations)

:)))

Author Anonymous
Guest
#4 | Posted: 2 May 2006 21:40 
Hi, I am using a miniBB installation for a dev board, and we had that desire to see edited post taken into account when sorting the topic list by Latest Replies.

I don't know about slowing down the database (as there is an index on topic_last_post_time already), and I admit we have a particular setup: a few members only discussing development issues (limiting the kind of things Ivan is referring to ;)), but on the code modifications side, that's very easy!!

I'll give the mods I've done below (based on miniBB 2.0 RC6b), if that can help someone else:

in bb_func_editmsg.php, line 74

-- REPLACE --------

if ($fif!=0) $errorMSG.=$l_topicTextUpdated."<br />";

-- BY ---------------

if ($fif!=0) {
$errorMSG.=$l_topicTextUpdated."<br />";
$topic_last_post_id=$post;
$topic_last_post_time='now()';
updateArray(array('topic_last_post_id','topic_last_post_time'),$Tt,'to pic_id',$topic);
}


in bb_func_ldisc.php, line 21

-- REPLACE --------

if ($user_sort==1) $orderBy='topic_id DESC'; else $orderBy='topic_last_post_id DESC';

-- BY ---------------

if ($user_sort==1) $orderBy='topic_id DESC'; else $orderBy='topic_last_post_time DESC';


Thanks for the work you're doing on miniBB!!

Author Team
8-)
#5 | Posted: 3 May 2006 08:23 
Yes, this code should work. Thank you.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Take editing date into sorting attention
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑