vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Fork Threads (https://vborg.vbsupport.ru/showthread.php?t=94420)

Oblivion Knight 08-16-2005 09:25 PM

Quote:

Originally Posted by GilbertZ
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?

No, I have no problem with the way that the plugin functions.. :)

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.

GilbertZ 08-16-2005 09:43 PM

Quote:

Originally Posted by Oblivion Knight
No, I have no problem with the way that the plugin functions.. :)

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.

I was misunderstanding you. Now I think I see what you mean. You're saying that the "No" setting should not apply here since it is a forked thread, rather than a quoted post. Correct?

To fix it change

PHP Code:

if ($vbulletin->options['quotetitle'])
{
    if (
$parentposttitle != '')
    {
        
$posttitle $parentposttitle;
    }
    else
    {
        
$posttitle $threadinfo['title'];
    }
    
$posttitle unhtmlspecialchars($posttitle);
    
$posttitle preg_replace('#^(' preg_quote($vbphrase['reply_prefix'], '#') . '\s*)+#i'''$posttitle);
    
$newpost['title']="Fork of: $postinfo[title]";
}
else
{
    
$newpost['title']="Forked Thread: ";


to

PHP Code:

if ($parentposttitle != '')
{
    
$posttitle $parentposttitle;
}
else
{
    
$posttitle $threadinfo['title'];
}
$posttitle unhtmlspecialchars($posttitle);
$posttitle preg_replace('#^(' preg_quote($vbphrase['reply_prefix'], '#') . '\s*)+#i'''$posttitle);
$newpost['title']="Fork of: $postinfo[title]"

If that's what you meant I'll fix the original file.

Thanks for the feedback.

Oblivion Knight 08-17-2005 08:13 AM

I changed this part of code:
Code:

$newpost['title']="Fork of: $postinfo[title]";
To this:
Code:

$newpost['title'] = "Fork of: $posttitle";
Now it's working how I wanted.. Thanks :)

Erwin 08-17-2005 11:29 PM

Best forum idea for a long time! :) Won't be surprised if it gets incorporated as standard in future. :)

TTG 08-18-2005 12:48 AM

Quote:

Originally Posted by Erwin
Best forum idea for a long time! :) Won't be surprised if it gets incorporated as standard in future. :)

Agree with that .. excellent idea.
Clicked install.

Might be a good idea to zip the download.

GilbertZ 08-18-2005 05:17 AM

Quote:

Originally Posted by TTG
Agree with that .. excellent idea.
Clicked install.

Thanks.

Quote:

Might be a good idea to zip the download.
Really?
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:

Originally Posted by Erwin
Best forum idea for a long time! :) Won't be surprised if it gets incorporated as standard in future. :)

Thanks Doc. I've installed some of your awesome hacks, so I appreciate the compliment coming from you :)

Quote:

Originally Posted by Oblivion Knight
I changed this part of code:
Code:

$newpost['title']="Fork of: $postinfo[title]";
To this:
Code:

$newpost['title'] = "Fork of: $posttitle";
Now it's working how I wanted.. Thanks :)

Good catch :)
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.

amykhar 08-23-2005 01:50 PM

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

KW802 08-23-2005 01:58 PM

Quote:

Originally Posted by Erwin
Best forum idea for a long time! :)

Agreed -- I wonder if it's too late to bug the Jelsoft guys about this for vB 3.5...... :D

This has joined "auto-merge doubleposts" on my lists of features that should be stock.

GilbertZ 08-23-2005 06:50 PM

Quote:

Originally Posted by amykhar
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

Thanks Amy. Part 1 is in the wishlist. I know I won't have time for awhile to add it.

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.

amykhar 08-23-2005 07:28 PM

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();

foreach (array_keys($vbulletin->forumcache) AS $forumid)
{
                $forumid = intval($forumid);
                $forumperms =& $vbulletin->userinfo['forumpermissions']["$forumid"];

                if (isset($vbulletin->forumcache["$forumid"]) AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND verify_forum_password($forumid, $vbulletin->forumcache["$forumid"]['password'], false))
                {
                        $forumchoice[] = $forumid;
                }
}

to get me all of the forums that a user was allowed to view. You could probably use very similar code to get the ones that they can post in.


All times are GMT. The time now is 08:00 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.01228 seconds
  • Memory Usage 1,769KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete