Previous Thread
Next Thread
Print Thread
Rate Thread
Finished-[6.5-6.5.1] Merge Threads 2.1 #275995
07/04/2004 12:03 AM
07/04/2004 12:03 AM
Joined: Nov 2001
Posts: 11,330
Charlotte, NC
JoshPet Offline OP
I type Like navaho
JoshPet  Offline OP
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
Mod Name / Version: Merge Threads 2.1

Description: This allows you to attach an existing thread to another thread. Simply merge it to thread # xxxx.


Working Under: UBB.Threads 6.5 - 6.5.1

Mod Status: Beta

Any pre-requisites: 6.5

Author(s): JoshPet

Date: 07/03/04

Credits: www.joshuapettit.com

Files Altered: showflat.php, showthreaded.php, manageoptions.php

New Files: domergethread.php, mergethread.php

Database Altered: no

Info/Instructions: Version 1.0
Version 2.0 updates instructions for 6.5 and added a confirmation of the subject of the thread you are merging in to.

View the thread you want to move, from the thread options at the bottom select "Merge Threads" and on the next screen enter the thread number (or a post in the thread) that you want to move the existing thread To.
This is controlled by the "move threads" moderator permission, so if mods are allowed to move they will be allowed to merge.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.

Attached Files
Last edited by JoshPet; 03/01/2005 9:24 PM.
Sponsored Links
Re: Beta-[6.5] Merge Threads 2.0 [Re: Daine] #275996
07/19/2004 1:16 PM
07/19/2004 1:16 PM
Joined: Oct 1999
Posts: 468
M
Maze Offline
Enthusiast
Maze  Offline
Enthusiast
M

Joined: Oct 1999
Posts: 468
Danke!

Re: Beta-[6.5] Merge Threads 2.1 [Re: Daine] #275997
07/24/2004 5:04 PM
07/24/2004 5:04 PM
Joined: Nov 2001
Posts: 11,330
Charlotte, NC
JoshPet Offline OP
I type Like navaho
JoshPet  Offline OP
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
Updated to 2.1. Minor typo in instructions which caused a parse error in showthreaded.php.

Re: Beta-[6.5] Merge Threads 2.1 [Re: Daine] #275998
10/14/2004 3:35 AM
10/14/2004 3:35 AM
Joined: Jul 2001
Posts: 1,232
California
isaac Online happy
coffee and code
isaac  Online Happy
coffee and code

Joined: Jul 2001
Posts: 1,232
California
I like this modification a lot - it works perfectly for what I need it for - excellent work again JP!!!!

While installing, i noticed that in domergethread.php, there are two unnecessary ";" at the end of SQL queries...

Code
<br />// Get the board name and main numberof the old thread<br />	$query = "<br />		SELECT B_Board,B_Main<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Number = '$number';<br />	";	<br />   $sth = $dbh -&gt; do_query($query);<br />   list ($oldboard,$oldmain) = $dbh -&gt; fetch_array($sth);<br /><br />// How many posts are we moving<br />	$query = "<br />		SELECT COUNT(*)<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Main = '$number'<br />	";<br />   $sth = $dbh -&gt; do_query($query);<br />   list ($oldcount) = $dbh -&gt; fetch_array($sth);<br /><br />// Get the start time of the old thread<br />	$query = "<br />		SELECT B_Posted<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Number = $oldmain<br />	";<br />   $sth = $dbh -&gt; do_query($query);<br />   list ($oldtime) = $dbh -&gt; fetch_array($sth);<br />	<br />	<br />// Get the board keyword and main number of the new thread<br />	$query = "<br />		SELECT B_Board,B_Main<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Number = '$newnumber_q';<br />	";	<br />



Should be...

Code
<br />// Get the board name and main numberof the old thread<br />	$query = "<br />		SELECT B_Board,B_Main<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Number = '$number'<br />	";	<br />   $sth = $dbh -&gt; do_query($query);<br />   list ($oldboard,$oldmain) = $dbh -&gt; fetch_array($sth);<br /><br />// How many posts are we moving<br />	$query = "<br />		SELECT COUNT(*)<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Main = '$number'<br />	";<br />   $sth = $dbh -&gt; do_query($query);<br />   list ($oldcount) = $dbh -&gt; fetch_array($sth);<br /><br />// Get the start time of the old thread<br />	$query = "<br />		SELECT B_Posted<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Number = $oldmain<br />	";<br />   $sth = $dbh -&gt; do_query($query);<br />   list ($oldtime) = $dbh -&gt; fetch_array($sth);<br />	<br />	<br />// Get the board keyword and main number of the new thread<br />	$query = "<br />		SELECT B_Board,B_Main<br />		FROM {$config['tbprefix']}Posts<br />		WHERE B_Number = '$newnumber_q'<br />	";	<br />


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.6.x Progress Reports
Re: Beta-[6.5] Merge Threads 2.1 [Re: VickiSmith] #275999
10/14/2004 11:43 PM
10/14/2004 11:43 PM
Joined: Nov 2001
Posts: 11,330
Charlotte, NC
JoshPet Offline OP
I type Like navaho
JoshPet  Offline OP
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
thx!

Sponsored Links
Re: Beta-[6.5] Merge Threads 2.1 [Re: Daine] #276000
12/20/2004 9:35 PM
12/20/2004 9:35 PM
Joined: Mar 2000
Posts: 227
Alton, MO, USA
C
Chevy454 Offline
Member
Chevy454  Offline
Member
C

Joined: Mar 2000
Posts: 227
Alton, MO, USA
So, anyone else installed this...how is it working?

Re: Beta-[6.5] Merge Threads 2.1 [Re: CPBpnM] #276001
12/21/2004 1:07 AM
12/21/2004 1:07 AM
Joined: Nov 2001
Posts: 11,330
Charlotte, NC
JoshPet Offline OP
I type Like navaho
JoshPet  Offline OP
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
Yeah, this is working fine. Used on a bunch of sites. Installed for you.

Re: Beta-[6.5] Merge Threads 2.1 [Re: Daine] #276002
12/21/2004 5:58 PM
12/21/2004 5:58 PM
Joined: Mar 2000
Posts: 227
Alton, MO, USA
C
Chevy454 Offline
Member
Chevy454  Offline
Member
C

Joined: Mar 2000
Posts: 227
Alton, MO, USA
Many thanks!

Re: Beta-[6.5] Merge Threads 2.1 [Re: CPBpnM] #276003
01/05/2005 5:58 AM
01/05/2005 5:58 AM
Joined: Jan 2005
Posts: 1
N
nimh Offline
Lurker
nimh  Offline
Lurker
N

Joined: Jan 2005
Posts: 1
when merged the 2 threads still remain??

Re: Beta-[6.5] Merge Threads 2.1 [Re: maxxx] #276004
01/05/2005 9:49 PM
01/05/2005 9:49 PM
Joined: Nov 2001
Posts: 11,330
Charlotte, NC
JoshPet Offline OP
I type Like navaho
JoshPet  Offline OP
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
No merging them makes 2 threads into 1.

Sponsored Links
Re: Beta-[6.5] Merge Threads 2.1 [Re: Daine] #276005
03/01/2005 9:24 PM
03/01/2005 9:24 PM
Joined: Nov 2001
Posts: 11,330
Charlotte, NC
JoshPet Offline OP
I type Like navaho
JoshPet  Offline OP
I type Like navaho

Joined: Nov 2001
Posts: 11,330
Charlotte, NC
INstructions work in 6.5.1.


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,947
Joined: January 2000
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,470
Posts293,533
Members13,801
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,947
Greg Hard 5,533
Top Posters(30 Days)
isaac 10
Zarzal 3
Today's Statistics
Currently Online 893
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 23
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.0
(Release build 20190122.dev)
PHP: 5.4.45 Page Time: 0.039s Queries: 16 (0.011s) Memory: 3.2509 MB (Peak: 3.4458 MB) Data Comp: Zlib Server Time: 2019-01-24 01:05:56 UTC