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
  #2  
Old 12-30-2001, 04:42 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This won't work for me, it just splits the thread. What am I meant to put in the move to box? The thread number or subject title?
Reply With Quote
  #3  
Old 12-30-2001, 05:03 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tim I take it you never merged threads?

This works exactly the same: enter the URL of the destination thread
Reply With Quote
  #4  
Old 12-31-2001, 09:06 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I should tell you your hack works perfectly then! Thanks.
Reply With Quote
  #5  
Old 01-02-2002, 05:17 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-02-2002, 10:53 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

JJR http://vbulletin.com/forum/showthrea...threadid=36258
Reply With Quote
  #7  
Old 01-02-2002, 02:18 PM
Dalius Dalius is offline
 
Join Date: Oct 2001
Location: Canada!
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't we just use Move Thread?
Reply With Quote
  #8  
Old 01-02-2002, 04:04 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 01-10-2002, 07:59 AM
Steve_S's Avatar
Steve_S Steve_S is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yummy bira


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.

Brilliant!
Reply With Quote
  #10  
Old 01-10-2002, 08:47 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

definitely yummy bira!

installed and working
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 11:56 AM.


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.04531 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
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
  • (4)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