![]() |
Fork Threads
Boring Preamble
Sometimes a thread gets really long or some posts generate interesting but off topic conversation. I wanted to test the new cool product manager system and thought of this very simple mod to add Fork Thread functionality to the end user. What it does Allows the end user to divert off-topic tangents into a new thread, while automatically quoting the original thread. Specs Plugin: Included Phrases added automatically: 2 fork_prefix and fork_this_post Templates added automatically: 1 newpost_fork Templates to edit: 1 postbit or postbit_legacy Images to upload: 1 (optional) fork.gif How to Install This is a full blown plugin. Follow the usual instructions for a plugin. Then you have to edit the postbit or postbit_legacy template. For the graphical version you have to insert these lines where you want the link to appear: PHP Code:
PHP Code:
Updated to version 1.0.1 on 08/18/2005 *Modified to use the phrase manager. *Fixed minor bug when "Automatically Quote Post / Thread Title" was set to "no". *Fixed minor bug where after processing the title I pointed to the wrong variable :) Preview and Live Demo Preview attached. Or you can Register and try to fork the posts in the fork me thread. Graphics help solicited The quickie image I put together of a fork sucks :) If someone comes up with an edited image of the .psd file vb comes with I will edit this post. Wishlist for this mod 1. I doubt I will have the time to put this together, but it would be nice if there was a dropdown with forums the user has permission to post in so that the user can fork the thread to a different forum. 2. Adding a post to the original thread stating it had been forked and a link to the new thread Final note Oblivion Knight donated an image you can use of a fork (Thanks). It is attached to this post. |
bloody nice idea.
|
What a great idea!
|
:) maybe crop your screenshots, big white spaces are not looking good.. ;)
and like said... GREAT idea! |
i couldnt understand what is it doing ?
|
One thing that might be useful is if it added a post to the original thread stating it had been forked and a link to the new thread - otherwise on a busy board you could get loads of forks many of which could be under the same thread.
|
Quote:
|
Brilliant Idea !!
|
/me installs and bows.
Nicely done!!! |
this is a pretty good idea it would be better if it let u choose where to put the fork after. and it should be called offtopic instead of fork :P
|
Then rename it :p
Satan |
i did :P
|
* poolking installs
nice one. :D |
clapclapclap
Well done. A big thumbs up for a wonderfully simple and very effective concept. Plus I love the fork image. I will be installing this when I get on over to 3.5 |
Just wondering, whats the difference between this and splitting? (apart from the fact that it says "Forked:" before the title.
|
Quote:
|
Quote:
Would it look better to have a full blown post with a link to the fork or just a note in smallfont in the post that was forked? (I think the latter, but the complexity of the mod would become considerably greater). |
Quote:
Quote:
I'll switch wording to reflect the best received suggestions. |
Quote:
This is similar to the quote feature. It starts a new thread quoting the old post. |
OH......
I thought this was only for the admin. O.K consider this installed on The UberGamers Forums |
Um if we're supposed to get the fork image from the attachment, I dont like the fact that it has a white background. Can you make it transparent?
|
Quote:
|
dont worry i suck at em too :P
|
Quote:
|
Thanks for the nice comments everybody!
|
Quote:
|
Just a quick question to any vb dev.
There are two new variables called in the plugin. I didn't really see the point of initializing them with a $var=""; statement considering the vars are not used in any database calls, plus they are essentially initialized with a value when they are used. If those fields are attempted to be passed into the page, since they aren't globalized, they should be nullified anyway. However, I know you are doing funky things with plugins, serializing them etc, so I wanted to know what are your best practices for new vars in a plugin? |
Fork off! ;)
|
This doesn't seem to be functioning correctly if the option "Automatically Quote Post / Thread Title" is set to No.
Every time I click on the fork icon, the new thread title is "Forked Thread: " with the same added inside the URL tags. Shouldn't it be grabbing the thread title if no post title is defined? |
I wasn't sure the best way to handle that as the setting is set to "yes" for me.
Are you saying you want the post part of it to quote the title and leave the subject blank? |
Quote:
However, if the option is set to "No" - it should be grabbing the thread's title and inserting that instead of having nothing. Otherwise you could end up with several threads with "Forked Thread: " as the title - which makes no sense really. |
Quote:
To fix it change PHP Code:
PHP Code:
Thanks for the feedback. |
I changed this part of code:
Code:
$newpost['title']="Fork of: $postinfo[title]"; Code:
$newpost['title'] = "Fork of: $posttitle"; |
Best forum idea for a long time! :) Won't be surprised if it gets incorporated as standard in future. :)
|
Quote:
Clicked install. Might be a good idea to zip the download. |
Quote:
Quote:
I don't know the protocol here, but the xml file is only 2.5k. And all images are precompressed and anyway mostly for preview. Would people really find it helpful to have a zip? Quote:
Quote:
Now updated :) NOTE TO ALL: If you've installed this already and want to update, just uninstall and reinstall. Even the template you edited will probably not need to be touched. If the current version is working for you I don't think you need to bother upgrading. It's not a major upgrade. The changes pretty much relate to phrases and if you had the "Quote Title on Reply" set to no. |
I LOVE this mod. A couple of feature suggestions/requests though.
1. Allow forked threads to be posted in a different forum than the one the original thread is in - based on forum permissions of course. 2. Add an admin/mod feature that would allow mods to fork and split a thread at the same time. In other words, I would fork a thread based on post x. Post x would be quoted and carried to the new thread. BUT, I could also select post y,z and q to be split from the original thread and added to the new one. This is different from a regular split in that post x would stay in the original thread, just as in a regular thread forking. Amy |
Quote:
This has joined "auto-merge doubleposts" on my lists of features that should be stock. |
Quote:
I've coded a feature like that for another (private) mod I've done in the 3.0 series, but I haven't seen enough code from 3.50 to be sure how to get the permissions right on that one. It's probably only a couple of lines, but I need the sql code to popup up a list of forums the current user is allowed to post in. It took awhile to figure out how to do that correctly in 3.0. It also needs the displayorder of the forums. And no parent forums can be in the list unless they are open to new posts. So this is not the same code used in forumjump. If someone feels like coming up with that sql code, I can probably do the rest pretty quickly. Suggestion 2 is a great one. I've never modded the split code at all, so not sure what that would entail. Definitely don't have time to work on that one. But I'll add it to the wishlist when I get a chance. |
You may not need to query the forums at all. It might be available in the cache. I used a simple bit of code:
Code:
$forumchoice = array(); |
All times are GMT. The time now is 12:29 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|