Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

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]
Save and upload.

Open template threads_splitthread and find:

Code:
$postbits
Right BEFORE it add:

Code:
<tr>
	<td bgcolor="{ secondaltcolor }"><normalfont><b>OR Merge Posts into Thread:</b></normalfont></td>
	<td bgcolor="{ secondaltcolor }"><normalfont><input type="text" class="bginput" name="movetothread" size="55"></normalfont></td>
</tr>
(remove the space after and before [high]{ }[/high] in the above code)
That's it

Cheers,

Bira



<< edit: you don't have to put spaces in between the {replacementvars} if you have checked 'disable smilies in this post >>

<< edit 2: ok apparently i lied...chen did you remove that here? >>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-27-2002, 10:04 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see two of these in 2.2.5... Which do I change?


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])."')");
Reply With Quote
  #23  
Old 05-04-2002, 07:50 PM
venomx's Avatar
venomx venomx is offline
 
Join Date: Apr 2002
Location: Pennsylvania USA
Posts: 441
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm Why when I move a post to a new thread it makes it the top post in the thread?
Reply With Quote
  #24  
Old 05-15-2002, 02:27 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can an option be added to copy a post to a new thread, instead of move it?
Reply With Quote
  #25  
Old 08-03-2002, 10:17 PM
MarkyBuzz's Avatar
MarkyBuzz MarkyBuzz is offline
 
Join Date: Apr 2002
Location: Manchester UK
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Bira,

Works like a charm, and although its yummy too, I`ll stick to Shish Kebabs

WELL DONE!
Reply With Quote
  #26  
Old 02-25-2003, 01:51 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could this hack be ported to vb230, where the two rows are innested into an if-clause ?
Thanks, Bira.
Reply With Quote
  #27  
Old 04-04-2003, 11:26 AM
opsman opsman is offline
 
Join Date: Oct 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi this hack is just what I need but am running 29 so dont have the lines of code to change

any chance of updating
Reply With Quote
  #28  
Old 05-06-2003, 06:04 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm running it on 2.2.9 and it works great here.

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?
Reply With Quote
  #29  
Old 07-06-2003, 05:44 PM
crackers8199 crackers8199 is offline
 
Join Date: Jun 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two questions...

1) Does this work on 2.3.0?

2) Is there a way to create a new thread for the posts you want to move using this hack, or do you need to do that manually?
Reply With Quote
  #30  
Old 11-21-2003, 10:59 PM
VAN's Avatar
VAN VAN is offline
 
Join Date: Oct 2001
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone got this to work on 2.3.3?

Mine is creating a new thread instead of placing the selected post(s) in the specified thread.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04412 seconds
  • Memory Usage 2,297KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete