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]
$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])."')");
I do have a small problem though. Whenever I move any posts, it makes the thread I moved the posts from a sticky thread. Does anyone have any ideas what might be happening?