vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Administrative and Maintenance Tools - Exclude Usergroups or forums from time limit editing posts (https://vborg.vbsupport.ru/showthread.php?t=245311)

joshg1 05-20-2013 05:18 PM

This is fantastic Asterix! Thank you.
In the future, do you think there could be a way to set specific time limits for editing posts for each usergroup?
It seems today that your addon removes the global time limit for specific user groups, but doesn't let me specify things like "let usergroup{x} edit own posts for 60 days".
But regardless, this is a huge benefit and great addon!

AramisErak 08-29-2013 09:34 AM

I found that I needed to hack the code just a touch in order to be able to automatically remove people from the exemption.

Code:

if ((THIS_SCRIPT == 'editpost') OR (THIS_SCRIPT == 'showthread'))
                        {
                                if($vbulletin->options['ct_nolimit_active'])
                                {   
                                        $ctnolimitgroups = explode(',',$vbulletin->options['ct_nolimit_groups']);
                                        $ctnolimitexgroups = explode(',',$vbulletin->options['ct_nolimit_exgroups']);
                                        $ctnolimitforums = explode(',',$vbulletin->options['ct_nolimit_forums']);
                                       
                                        if (is_member_of($vbulletin->userinfo,$ctnolimitgroups))
                                                {
                                                $GLOBALS['vbulletin']->options['edittimelimit'] = 0;
                                                if (!is_member_of($vbulletin->userinfo,$ctnolimitexgroups))
                                                        {
                                                        $GLOBALS['vbulletin']->options['edittimelimit'] = 0;
                                                        }

                                                }
                                        else
                                                {
                                                        if (in_array($threadinfo['forumid'],$ctnolimitforums))
                                                        {
                                                                if (!is_member_of($vbulletin->userinfo,$ctnolimitexgroups))
                                                                {
                                                                $GLOBALS['vbulletin']->options['edittimelimit'] = 0;
                                                                }
                                                        }
                                                       
                                                }
                                }
                        }

By deleting the code in red, and adding the code in blue, the exception group now blocks any exception list member group, and so I canhave a "not allowed to edit posts" infraction group. It would be nice if there was a separate preference check for a group list that overrides the allowed to edit group list.

(It would be even nicer if that was adjacent to the allowed to edit boxes , in a separate column...)

Other than that bit of hacking, love it.

Asterix_ita 08-29-2013 10:29 AM

Hi

this var ctnolimitexgroups: selected groups are excluded in all forums

ctnolimitexgroups: selected groups are excluded in the forums previously selected

with your edit there is no total exclusion if the groups are not present in both var

regards

AramisErak 09-06-2013 12:55 AM

I've tested with various groups, and by deleting the red, adding the blue, it does not allow edit for other groups, does allow it for the included groups unless an excluded group is there. (If you're colorblind, however, you might not see the colors in the edit, which would cause failure.)


All times are GMT. The time now is 06:11 AM.

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.01000 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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