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

Avoiding "Bump" replies

Author astass
Registered
#1 | Posted: 21 Feb 2010 08:33 | Edited by: astass 
I have a suggestion. I think this module would be useful on the forums where a lot of visitors. Let's call this "Module-adhesive tape". Details: A visitor wrote 2 posts in a row. "Module-adhesive tape" adds a second message in the previous post user. The forum will be fewer posts per user, which are consecutive.
I have seen such a module as an addition in one forum, it is very easy to use.
For example:
Since the posts are placed before gluing module ...

And here is the result of the module.

.........
The administrator must choose in the admin panel of this option. For example for one of the forums. Or for example in the topic to add the administrator to choose this option. (There are some topics where the module is not needed)

Author Paul
Lead Developer
#2 | Posted: 20 Apr 2010 07:58 
I've had a time today and tried to figure this thing out.

Well, despite it looks simple, it relays on many difficulties, which are specially related to miniBB add-ons like Premoderation or File Attachments. If you have these add-ons installed, it's impossible to use this extension. I hope, you understand, why.

The user may create a thread where many files or images will be attached with minimum comments. With your idea, all these messages should be concatenated into one. Unreal, and not corresponding with File Upload options.

Also, if you have Premoderation queue, such messages won't appear in the queue. For making them appearing, I shall reprogram the Premoderation add-on. Unreal, for such usefulness and rare "feature".

May be there are also some things related, which I didn't check. The only thing I know so far - the add-on looks like very destructing regarding the architecture of miniBB messages and topics structure. That's why there is no official release or something like that.

Here's the code you may put in bb_plugins.php. Depending on the $putUpdateOnTop option, if it's FALSE, the code will check for the last message the user has been posted in the certain topic. If there's still his own message, instead of posting a thread operation, the script will call edit message operation. Then the older message's text will be concatenated with the new one. If the option is TRUE, the script will just delete the older message, concatenating its text with the newer one. It could work only that way, because Recent Topics or Topics Listings display latest messages on top basing on their IDs. In the case of editing the message, nor post ID or post date are updated.

It also works only for registered users.

/* Adhesive Message */
if($action=='pthread' and $user_id>0){

$putUpdateOnTop=TRUE; //TRUE will delete the older message and replace it with the new message, that way keeping the new message on top of Recent Topics and Topics Listings. FALSE will just update the older message, adding the newest message below of it.

if($row=db_simpleSelect(0, $Tp, 'poster_id, post_text, post_id', 'topic_id', '=', $topic, 'post_id DESC', 1)){

if($row[0]==$user_id) {

require_once($pathToFiles.'bb_func_txt.php');

if(!$putUpdateOnTop){
$_POST['post']=$row[2];
$_POST['anchor']=$row[2];
$_POST['postText']=deCodeBB($row[1])."\r\n\r\n".$_POST['postText'];
$action='editmsg2';
}
else{
$_POST['postText']=deCodeBB($row[1])."\r\n\r\n".$_POST['postText'];
db_delete($Tp, 'post_id', '=', $row[2]);
}

}

}

}
/* --Adhesive Message */

Under index.php, if you have $putUpdateOnTop=FALSE, there also should be the following core change applied:

elseif($action=='editmsg2') {require_once($pathToFiles.'bb_func_txt.php');$step=1;require($pathToFiles.'bb_func_editmsg.php');}

i.e. "require" should be changed to "require_once".

For one of my customers, I also have developed the "restriction" add-on, which displays a warning message, if some user would try to post a new message next to his older message.

There is also a way to hide a posting form unless the last message belongs to the currently logged member, so he's not able to add a new message, only to edit the older one. It's another code.

In other words, what is created in other forums software, doesn't mean it's the proper and good solution. I have no recommendations to use the same thing in miniBB.

Author Paul
Lead Developer
#3 | Posted: 20 Apr 2010 08:07 
Well, I already mentioned that this solution is imperfect, because it doesn't cover many other extensions. One dangerous thing I could mention, is that: in miniBB as you know, there is a post text limitation. Let's say it could be 10 Kb of text. Having this solution installed, it is possible, that few messages will be concatenated and become much larger than 10 Kb in result.

Author astass
Registered
#4 | Posted: 20 Apr 2010 08:11 
Paul:
Well, I already mentioned that this solution is imperfect, because it doesn't cover many other extensions. One dangerous thing I could mention, is that: in miniBB as you know, there is a post text limitation. Let's say it could be 10 Kb of text. Having this solution installed, it is possible, that few messages will be concatenated and become much larger than 10 Kb in result.

This happens very rarely but surely noticed! So to make this module very easy not to turn out. Very sorry. This is certainly a convenient option for the forum. At least 5 people with whom I corresponded, praised a similar module on other platforms.

Author astass
Registered
#5 | Posted: 20 Apr 2010 08:13 
In some forum I've met such an algorithm. In the admin panel there is a manual option to combine such messages. Only the admin can do it manually. Maybe such implementation will not tear down the architecture?

Author Paul
Lead Developer
#6 | Posted: 20 Apr 2010 08:16 | Edited by: Paul 
Honestly saying, I don't see much sense in it. It's not the admin's job to concatenate messages without visible purpose. Too much hassle.

And - it doesn't depend on who or which way concatenates the messages. It will break the architecture any way, so a lot of additional actions may be required - like recalculating the amount of topics, the date of the last message in topics table, what about file attachments? what about featured options?

Not for me, sorry. I won't think on it anymore.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Avoiding "Bump" replies Top

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

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


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