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.
How about adding an Edit Reason, too (Like Firefly's Edit Reason hack)? That way we will know that they added to the message instead of just editing it.
Quote:
Originally posted by Xenon Velocd: i have updated the installation file, now it should add an edited by message
Ya can there be somewhere where it would say DOUBLE POSTING FEATURE and then under that it would show the message instead of just having a Break in the post and then the new edited message.
Can you show the update. Maybe it has somehting to do with the cache. This is all i see
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])) {
$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 {
$DB_site->query("UPDATE post SET pagetext='".addslashes($lastpost[pagetext]."\n\n".$message)."' WHERE postid=".$lastpost[postid]);
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=".$lastpost[postid]."#post".$lastpost[postid];
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
eval("standardredirect("".gettemplate("redirect_postthanks")."","$goto");");
exit;
}
@Big: hmm, must have something to do with the cache thats what i have in the attachment:
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])) {
$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 {
$editedbysql="";
if ($showeditedby and $lastpost[dateline]<(time()-($noeditedbytime*60))) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
$DB_site->query("UPDATE post SET pagetext='".addslashes($lastpost[pagetext]."\n\n".$message)."'".$editedbysql." WHERE postid=".$lastpost[postid]);
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=".$lastpost[postid]."#post".$lastpost[postid];
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
eval("standardredirect("".gettemplate("redirect_postthanks")."","$goto");");
exit;
}
Quote:
Ya can there be somewhere where it would say DOUBLE POSTING FEATURE and then under that it would show the message instead of just having a Break in the post and then the new edited message.
UPDATE post SET pagetext='".addslashes($lastpost[pagetext]."\n\n".$message)