Version: 1.00, by Xenon
Developer Last Online: Oct 2023
Version: 2.2.x
Rating:
Released: 06-21-2002
Last Update: Never
Installs: 92
No support by the author.
This is why i really want a Mini-Hack section here, please Chen
What this hack does:
When a User posts to a thread where he already has the lastpost, no new post will be added. The lastpost of him will be edited and the new text is put after his first message.
This would not be done, if he has an attachment in his new post or the old post is older than 1 hour (you can change this timespan yourself )
Known bugs: None
Hope someone can use it, i do
Believe this hack includes just 1!! codehack.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Thank you very much, sir. That works great! Now (this is the last thing, I swear. ), Is there a way to have the date and time of the first post stay the same so we know when the post started and have the date and time of each additional post in the DOUBLE POSTING Feature right after the subject title? That way we know when the first message was (by the original date and time staying in tact) and the new date and time for each addition after the subject line.
*ggg* in my first version of the hack the time stayed the same after posting, its just altered tu bump a thread.
if you want to stay the time just remove this part:
PHP Code:
dateline='".time()."',
from this line:
PHP Code:
$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n".$message)."' WHERE postid=".$lastpost[postid]);
and then: yes you can add the time after the subject, but you have a small problem: the timeoffset can't be variable anymore in this timestamp
just add something like that:
PHP Code:
[disable]$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color][/b] - ".$title." posted at:".vbdate($dateformat,time())."\n\n".$message)."' WHERE postid=".$lastpost[postid]);[/disable]
I see what you mean about the time no longer working right when I add it to the middle of that line. I went back to the time changing in the main post and left it with just the title added. It doesn't do me any good if I can't pull the time out for each addition. Thanks, anyway, for trying. And thanks for putting up with all of my wacky ideas. You have a great hack here! Keep up the fantastic work!
I made the following changes so that if the post is the same as the one that they just got through posting within the past hour then nothing new gets added to the thread or the post.
PHP Code:
$lastpost = $DB_site->query_first("SELECT * FROM post WHERE threadid = '$threadid' ORDER BY postid DESC");
if($lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach]) || $lastpost[pagetext]!='".addslashes($message)."') {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
} else {
if ($visible) {
One little issue... can you modify it so that it adds on a new post if that would make it go over the characters per post limit, instead of just editing the old one?