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
  #12  
Old 01-16-2002, 02:23 PM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent, bira. Thank you!
Reply With Quote
  #13  
Old 02-24-2002, 04:57 PM
Figment Figment is offline
 
Join Date: Nov 2001
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, works a treat
Reply With Quote
  #14  
Old 02-25-2002, 05:01 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, thanks bira!!!
Reply With Quote
  #15  
Old 02-25-2002, 09:29 AM
over over is offline
 
Join Date: Nov 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent hack idea, some peeps in my forum keep on posting a new thread instead of a reply by accident gonna install it cheers.
Reply With Quote
  #16  
Old 03-02-2002, 07:51 PM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good idea and good hack!
Thanks!
Reply With Quote
  #17  
Old 03-03-2002, 01:27 AM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great!!!

Thank you.
Reply With Quote
  #18  
Old 03-18-2002, 06:17 PM
LaNder LaNder is offline
 
Join Date: Nov 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

has anybody tested, if it works with 2.2.4?

i tried it and lost the moved threads - new threadid was set to 0.

had to restore it manually with phpmyadmin.

LaNder
Reply With Quote
  #19  
Old 03-19-2002, 01:21 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by LaNder
has anybody tested, if it works with 2.2.4?

i tried it and lost the moved threads - new threadid was set to 0.

had to restore it manually with phpmyadmin.


LaNder
I'm using it on 2.2.4 with no problem.
Reply With Quote
  #20  
Old 03-22-2002, 06:21 PM
LaNder LaNder is offline
 
Join Date: Nov 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i checked everything, but i get the same error again und again:

"No thread specified. If you followed a valid link, please notify the webmaster"

http://...../showthread.php?s=&threadid=0

the moved threads a stored in the db with threadid=0

Help needed...
Reply With Quote
  #21  
Old 04-07-2002, 08:30 AM
LaNder LaNder is offline
 
Join Date: Nov 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tested it with an unhacked v.2.2.5 bad got the same error
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 05:12 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.06509 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
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)bbcode_quote
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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