Firefox PHP

Move thread to other forums

Posted by Tapolyai 
Move thread to other forums
August 06, 2002 03:33PM
I have started writing a short code that allows picking a thread and moving it to an other forum. At this time I am not worried about attachemenets.

Some questions regarding the DB structure.

<forum> has id, thread and parent fields, and <forum>_bodies only has id and thread.

I need to confirm my thinking:

When a message gets posted in a <forum>, the message record id gets copied into the thread and 0 to the parent field.

Follow messages within the same thread inherit the thread and of course the parent now points to the message id of which they are replying to. id is incremented.

The message body id is also auto incremented, and its supposed to match the <forum> id. //This is a problem but I will come back to it.//

The thread gets the id from the original <forum> message which was posted first.

Is that correct? If so, then the Phorum has to be "stopped" before a thread move, so as to not to mess with running postings...

What happens with the tables between header and body if it is out of sync? If one table gets locked by one thread, and the other by the other, or is the code make sure a thread must lock the header first before the body? why split the tiny header from the body (speed?)?

Thanks,
T.
Re: Move thread to other forums
August 29, 2002 10:25AM
Hello

I think it wouldn´t be a small script because i have this hack running.

To check out where i get it from just visit [www.6thfloor.de]

It works great and perfect.

Best regards,

André
Sorry, you do not have permission to post/reply in this forum.