Version: , by bira
Developer Last Online: Jun 2013
Version: 2.2.x
Rating:
Released: 12-29-2001
Last Update: Never
Installs: 34
No support by the author.
This was requested on vbulletin.com and it's a very simple hack,
which essentially combines the split and the merge admin options
Open postings.php and find (Around lines 756-757):
Code:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,views,iconid,notes,visible) VALUES (NULL,'".addslashes($title)."','".addslashes($threadinfo[lastpost])."','".addslashes($threadinfo[forumid])."','".addslashes($threadinfo[open])."','".addslashes($threadinfo[replycount])."','".addslashes($threadinfo[postusername])."','".addslashes($threadinfo[postuserid])."','".addslashes($threadinfo[lastposter])."','".addslashes($threadinfo[dateline])."','".addslashes($threadinfo[views])."','".addslashes($threadinfo[iconid])."','Thread split from threadid $threadid by ".addslashes($bbuserinfo['username'])." on ".vbdate($dateformat." ".$timeformat,time()).". ".addslashes($threadinfo[notes])."','".addslashes($threadinfo[visible])."')");
$newthreadid=$DB_site->insert_id();
Replace it with:
Code:
[high] // move posts from one thread to another
if(trim($movetothread)=="") {[/high]
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,views,iconid,notes,visible) VALUES (NULL,'".addslashes($title)."','".addslashes($threadinfo[lastpost])."','".addslashes($threadinfo[forumid])."','".addslashes($threadinfo[open])."','".addslashes($threadinfo[replycount])."','".addslashes($threadinfo[postusername])."','".addslashes($threadinfo[postuserid])."','".addslashes($threadinfo[lastposter])."','".addslashes($threadinfo[dateline])."','".addslashes($threadinfo[views])."','".addslashes($threadinfo[iconid])."','Thread split from threadid $threadid by ".addslashes($bbuserinfo['username'])." on ".vbdate($dateformat." ".$timeformat,time()).". ".addslashes($threadinfo[notes])."','".addslashes($threadinfo[visible])."')");
$newthreadid=$DB_site->insert_id();
[high] } else {
// get other threadid
$getthreadid=intval(substr($movetothread,strpos($movetothread,"threadid=")+9));
if ($getthreadid==0) {
$getpostid=intval(substr($movetothread,strpos($movetothread,"postid=")+7));
if ($getpostid==0) {
// do invalid url
eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
exit;
}
$getpostid=verifyid("post",$getpostid,0);
if ($getpostid==0) {
// do invalid url
eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
exit;
}
$postinfo=getpostinfo($getpostid);
$newthreadid=$postinfo[threadid];
} else {
$getthreadid=verifyid("thread",$getthreadid,0);
if ($getthreadid==0) {
// do invalid url
eval("standarderror(\"".gettemplate("error_mergebadurl")."\");");
exit;
}
$newthreadid=$getthreadid;
}
}
// / move posts from one thread to another[/high]
Did I request this? Just wondering. I know I WANTED something like this, and MEANT to request it, I just forget if I actually did, and even if I did, maybe it wasn't mine that you saw...again, just out of curiosity.
Move Thread only moves the entire thread. This hack allows you to move an individual post from one thread to another. Previously, this was only possible if you split the thread in two, with one containing the bulk of the thread, the other containing the one post you wanted moved into another thread; then you had to merge that one-post thread into the thread where you wanted that one post.
Thank you so much. This puppy goes in tomorrow. It's a big time saver for those of us who need to save the original post for legal reasons which is a copy thread and then return to edit the originaal spam thread.
Your hack: You just pluck the sucker out and add it to your spam thread in your private forum.