tmapm
07-23-2003, 12:07 PM
First of all I run boards at version 2.3.0. I have [AddOn] Useful Additions For Quickreply (and normal reply page) -- https://vborg.vbsupport.ru/showthread.php?s=&threadid=47918 installed. My problem is when the double posting is prevented via the Doublepost Guard -- http://www.vbulletin.org/hacks/index.php?action=showhack&threadid=40145 and merges the posts, it doesn't allow for the additions (except sticky) included in the Useful Additions For Quickreply to update. I was wondering if someone could take a look at the Useful Addition for Quickreply hack and help me out by adding some queries in the Double Posting Hack to update the quickreply options. I've looked through the files and I haven't been able to figure it out. Any help is appreciated.
The stop double post code:
if ($attachmentid and !$foruminfo[moderateattach]) {
$DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'");
$lastpost = array();
} else {
$lastpost = $DB_site->query_first("SELECT postid, userid, dateline, pagetext, title FROM post WHERE threadid='$threadid' ORDER BY postid DESC LIMIT 1");
}
if($lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible')");
} else {
$editedbysql="";
if ($showeditedby and $lastpost['dateline'] < (time() - ($noeditedbytime * 60))) {
$editedbysql = ",edituserid='$bbuserinfo[userid]',editdate='" . time() . "'";
}
unindexpost($lastpost['postid'], $lastpost['title'], $lastpost['pagetext']);
$DB_site->query("UPDATE post SET dateline='" . time() . "'" . $editedbysql . ",pagetext='" . addslashes($lastpost[pagetext] . "\n\n" . $message) . "' WHERE postid=" . $lastpost['postid']);
indexpost($lastpost['postid'], 0);
$DB_site->query("UPDATE thread SET lastpost='" . time() . "' WHERE threadid='$threadid'");
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;
}
The stop double post code:
if ($attachmentid and !$foruminfo[moderateattach]) {
$DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'");
$lastpost = array();
} else {
$lastpost = $DB_site->query_first("SELECT postid, userid, dateline, pagetext, title FROM post WHERE threadid='$threadid' ORDER BY postid DESC LIMIT 1");
}
if($lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) {
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconi d','$visible')");
} else {
$editedbysql="";
if ($showeditedby and $lastpost['dateline'] < (time() - ($noeditedbytime * 60))) {
$editedbysql = ",edituserid='$bbuserinfo[userid]',editdate='" . time() . "'";
}
unindexpost($lastpost['postid'], $lastpost['title'], $lastpost['pagetext']);
$DB_site->query("UPDATE post SET dateline='" . time() . "'" . $editedbysql . ",pagetext='" . addslashes($lastpost[pagetext] . "\n\n" . $message) . "' WHERE postid=" . $lastpost['postid']);
indexpost($lastpost['postid'], 0);
$DB_site->query("UPDATE thread SET lastpost='" . time() . "' WHERE threadid='$threadid'");
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;
}