miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Take editing date into sorting attention

Author George
Registered
#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 Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB