Welcome, Guest. Please Login or Register.
May 05, 2025, 02:37:18 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  SPLIT threads mod « previous next »
Pages: 1 2 3 [4] 5 Reply Ignore Print
Author Topic: SPLIT threads mod  (Read 1633 times)
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:SPLIT threads mod
« Reply #45 on: July 12, 2002, 02:52:04 PM »
Reply with quote

Make it for 1.4 or both :P

Quoteand earn a whole lot of heartfelt thanks in the process
Who cares about the thanks, I am in it for the money. ;)
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Radio
Noobie
*
Posts: 31


I'm a llama!

Re:SPLIT threads mod
« Reply #46 on: July 12, 2002, 08:58:07 PM »
Reply with quote

Quote from: Chris Russell on July 12, 2002, 01:33:40 PMI also agree. Just a simple "split" button, which breaks the thread off at that point and creates a new one. I really don't care much about merging at this point; I really haven't come across a situation where I've wished for a merge function. I *do* encounter a lot of situations where a split function would be very useful.

What exactly would need to be done? Here's how I see it:

First, there's the code for the button itself, which shouldn't be too hard. Then, there's the code for the actual split. Forget about fancy features for now. If you just enter a new title for the topic, the code could create a new thread, then change the thread ID for the posts that are at and below the split button. It seems to me (and I could very well be wrong here) that each post already has a unique number associated with it, which would eliminate the need for a renumbering process. Fill in the blanks for the thread's properties, and you're done.

If I knew a thing about php and mysql, I'd make an attempt at it myself. However, I don't, so I won't. It just seems to me that a really experienced person could hammer out a very simple version of this much-desired mod very quickly (and earn a whole lot of heartfelt thanks in the process).

When I was talking about renumbering, I didn't mean the unique ID used by MySQL. I referring to the a number that defines their order in a way that's independant of the timestamp. Although it may be that the forum view simply grabs the first post result from a thread and uses it's subject, in which case you would be right and no renumbering would be needed at all.
Logged
Chris Russell
Noobie
*
Posts: 9


ICQ - 6334746oldmanjamal@hotmail.com WWW
Re:SPLIT threads mod
« Reply #47 on: July 13, 2002, 12:27:00 PM »
Reply with quote

QuoteWell, I am not a "mod writer" but will make an attempt at writing this mod.

Woo hoo!  ;D

1.4 would be awesome; that's what I'm using. Whatever works best for you.
Logged
Chris Russell
Noobie
*
Posts: 9


ICQ - 6334746oldmanjamal@hotmail.com WWW
Re:SPLIT threads mod
« Reply #48 on: July 13, 2002, 12:48:14 PM »
Reply with quote

Quote from: Rail on July 12, 2002, 08:58:07 PMWhen I was talking about renumbering, I didn't mean the unique ID used by MySQL. I referring to the a number that defines their order in a way that's independant of the timestamp. Although it may be that the forum view simply grabs the first post result from a thread and uses it's subject, in which case you would be right and no renumbering would be needed at all.

Looking at Display.php (version 1.4.0):
   # For each post in this thread
   if ($modSettings['viewNewestFirst'] == '1'){
   $request = mysql_query("SELECT ID_MSG,subject,posterName,posterEmail,posterTime,ID_MEMBER,icon,posterIP,body,smiliesEnabled,
modifiedTime,modifiedName,attachmentFilename,attachmentSize FROM {$db_prefix}messages WHERE ID_TOPIC=$viewnum ORDER BY ID_MSG DESC LIMIT $start,$maxmessagedisplay");}
    else{
    $request = mysql_query("SELECT ID_MSG,subject,posterName,posterEmail,posterTime,ID_MEMBER,icon,posterIP,body,smiliesEnabled,
modifiedTime,modifiedName,attachmentFilename,attachmentSize FROM {$db_prefix}messages WHERE ID_TOPIC=$viewnum ORDER BY ID_MSG LIMIT $start,$maxmessagedisplay");}

Looks to me like the order is determined by the message ID alone. Nice and simple. :)
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:SPLIT threads mod
« Reply #49 on: July 13, 2002, 06:13:52 PM »
Reply with quote

So tell me if my basic thinking is correct for this.

They click the button which passes me the threadid and msgid.  Then
SELECT something FROM {$prefix}messages WHERE (threadid = '$threadid') AND (msgid >= '$msgid');
From there I would take the messages and create a new post basically using the code in Post.php.  Then the code used for reply.  One question, should the new topic be started by the moderator that split it or by the original post.  Also should the moderator be able to poat either at the end of the split thread or the begginnning of the new one?
Logged

Chris Russell
Noobie
*
Posts: 9


ICQ - 6334746oldmanjamal@hotmail.com WWW
Re:SPLIT threads mod
« Reply #50 on: July 13, 2002, 10:07:41 PM »
Reply with quote

That sounds correct to me.

It would probably make more sense if the new topic was started by the moderator that actually did the splitting.

An option to post at the beginning of the new thread or at the end of the old one would be nice, but not entirely necessary if it turns out to be a pain in the ass.  :)
Logged
owen100
Noobie
*
Posts: 39


I'm not an alcoholic - alcoholics go to meetings

owen100@hotmail.com WWW
Re:SPLIT threads mod
« Reply #51 on: July 14, 2002, 09:47:33 PM »
Reply with quote

Quote from: Joseph Fung on March 07, 2002, 02:49:42 AMHow would the meger work?
would it just order ALL the messages by date? Or would it have all the messages from topic A, then all the messages from topic B ??

I've been very tempted to switch boards because of the split/merge threads as I have links to threads all through my site so really don't want them going off topic. As with the moved topic link that's left behind, something similar for a merged thread with thread B coming after A with some kind of message informing of the merge.
Logged
Mach8
Sweetie
Beta Tester
YaBB God
*****
Posts: 1218


ICQ - 339855961
Re:SPLIT threads mod
« Reply #52 on: July 20, 2002, 11:12:04 PM »
Reply with quote

VERY GOOD NEWS!

I sat down today and messed around with some PHP and database work... basically I have produced a split/merge threads mod, it all works perfectly :D

I'm just sorting all the code out now, packaging the mod, deciding where to put the split link, etc. Give me a few hours and it'll be up for download in the Completed Mods board. I'm just as excited as all you are :D
Logged
Chris Russell
Noobie
*
Posts: 9


ICQ - 6334746oldmanjamal@hotmail.com WWW
Re:SPLIT threads mod
« Reply #53 on: July 20, 2002, 11:28:02 PM »
Reply with quote

That kicks ass beyond all belief. Where do I send the check?  ;D
Logged
Mach8
Sweetie
Beta Tester
YaBB God
*****
Posts: 1218


ICQ - 339855961
Re:SPLIT threads mod
« Reply #54 on: July 21, 2002, 12:09:18 AM »
Reply with quote

Cancer Research UK :)

Just sorting out some probs with retrieving SQL results, shouldn't be too long :)
Logged
Nossie
Full Member
***
Posts: 192


If it aint broke, you haven't played with it enuff

ICQ - 18967293IanHarvie@Hotmail.com WWW
Re:SPLIT threads mod
« Reply #55 on: July 21, 2002, 01:01:59 AM »
Reply with quote

well done m8...

<cant wait for a look>

hehe
Logged

Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:SPLIT threads mod
« Reply #56 on: July 21, 2002, 01:04:06 AM »
Reply with quote

Quote from: Mach8 on July 20, 2002, 11:12:04 PMVERY GOOD NEWS!

I sat down today and messed around with some PHP and database work... basically I have produced a split/merge threads mod, it all works perfectly :D
Cool ;) Is the person who splits the thread able to post a message at the start of the thread, or will this just split 'em? Still very cool ;)
Logged

PHPNews has been released!!! Download it now!!!
Mach8
Sweetie
Beta Tester
YaBB God
*****
Posts: 1218


ICQ - 339855961
Re:SPLIT threads mod
« Reply #57 on: July 21, 2002, 02:11:30 AM »
Reply with quote

Okay, here's how it works... it's 3am here in the UK and I NEED bed :P

So the mod will be uploaded tomorrow BST, about 12pm.

When merging, you go to a thread, click the Merge link at the bottom, and type in another thread's ID. The two threads will then merge together, ordered by their post date.

When splitting, there is a link next to the IP link on each post - you click this link, and it splits the thread into two topics - one with posts before the split post, and one with posts after and including the split post. The moderator of course would then reply saying that the thread had been split. I can do this automatically but on my forum I prefer full control, and I don't want to tie people in to having that.

Anyway, I'll stop blabbing on and get some sleep at last :)
Logged
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:SPLIT threads mod
« Reply #58 on: July 21, 2002, 03:30:58 AM »
Reply with quote

Sounds excellent!

I personally feel that the ability to merge threads is even more important than splitting threads...
Logged
Mach8
Sweetie
Beta Tester
YaBB God
*****
Posts: 1218


ICQ - 339855961
Re:SPLIT threads mod
« Reply #59 on: July 21, 2002, 01:56:24 PM »
Reply with quote

Beta 1.0 released...

I've just read a few posts in this thread and realised I left out the ability to set the thread subject for the new split thread. I'll put this in beta 2.0. God I'm tired, been up all night :o
Logged
Pages: 1 2 3 [4] 5 Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  SPLIT threads mod « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.128 seconds with 20 queries.