Thread: New Posting Features - Quick Editor Improver - Support Attachment
View Single Post
  #237  
Old 06-12-2009, 02:49 AM
sunrise2006's Avatar
sunrise2006 sunrise2006 is offline
 
Join Date: Feb 2006
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Saviour View Post
Is there any way to disable this Quick Editor Reply for certain forums? I know I'd have to edit the SHOWTHREAD template. I'm just not sure where...and what code to use.

Thank you in advance...
For current version you may limit it based on usergroup and style, but for specified forums this is not possible, sorry.

However this is not meant you may not have that, because of if you know about vBulletin and plug-ins system, you may add new option to Quick Editor Improver as you will need to create a new plug-in for this capability.

Another way for this issue that I think it's better and easy follow:

Quote:
Admincp -> Plugins & Products -> Plugin Manager
Edit Button Visibility Bitfields plug-in same as this:
PHP Code:
                    if ($vbulletin->options['qeimp_enabled'])
                    {
                        
$qei_apply false;
                        if (
$vbulletin->options['qei_excluded_usergroups'])
                        {
                            
$qei_exclusergroups explode(','$vbulletin->options['qei_excluded_usergroups']);
                        }
                        if (
$vbulletin->options['qei_excluded_styles'])
                        {
                            
$qei_exclstyles explode(','$vbulletin->options['qei_excluded_styles']);
                        }
                        
$exclforums '1,2,3,4,5,6,7';
                        if (
$exclforums)
                        {
                            
$qei_exclforums explode(','$exclforums);
                        }
                        
                        if (!
$qei_exclforums OR (isset($qei_exclforums) AND !in_array($forumid$qei_exclforums)))
                        {                        
                            
//if (!isset($qei_exclusergroups) OR (isset($qei_exclusergroups) AND !in_array($vbulletin->userinfo['usergroupid'], $qei_exclusergroups)))
                            
if ((!isset($qei_exclusergroups) AND !isset($qei_exclstyles)) OR !((isset($qei_exclusergroups) AND in_array($vbulletin->userinfo['usergroupid'], $qei_exclusergroups)) OR (isset($qei_exclstyles) AND in_array($vbulletin->userinfo['styleid'], $qei_exclstyles))))
                            {                    
                                switch (
THIS_SCRIPT)
                                {
                                    case 
'showthread':
                                        
$qei_apply = ($vbulletin->options['qei_applyto']) ? true false;
                                    break;
                                    case 
'member':
                                        
$qei_apply = ($vbulletin->options['qei_applyto']) ? true false;
                                    break;
                                    case 
'group':
                                        
$qei_apply = ($vbulletin->options['qei_applyto']) ? true false;
                                    break;
                                    case 
'blog':
                                        
$qei_apply = ($vbulletin->options['qei_applyto']) ? true false;
                                    break;
                                    case 
'project':
                                        
$qei_apply = (16 $vbulletin->options['qei_applyto']) ? true false;
                                    break;
                                    default:
                                        
$qei_apply true;
                                    break;
                                }
                            }
                            if (
$qei_apply AND intval($vbulletin->options['qei_visiblebuttons']) > 0)
                            {
                                
$bv_bitfield = array(
                                    
'qr_visible_smilies'    =>    1,
                                    
'qr_visible_size'        =>    2,
                                    
'qr_visible_font'        =>    4,
                                    
'qr_visible_align'        =>    8,
                                    
'qr_visible_list'        =>    16,
                                    
'qr_visible_code'        =>    32,
                                    
'qr_visible_php'        =>    64,
                                    
'qr_visible_html'        =>    128,
                                    
'qr_visible_custom'        =>    256,
                                    
'qe_visible_smilies'    =>    512,
                                    
'qe_visible_size'        =>    1024,
                                    
'qe_visible_font'        =>    2048,
                                    
'qe_visible_align'        =>    4096,
                                    
'qe_visible_list'        =>    8192,
                                    
'qe_visible_code'        =>    16384,
                                    
'qe_visible_php'        =>    32768,
                                    
'qe_visible_html'        =>    65536,
                                    
'qe_visible_custom'        =>    131072,
                                    
'pmqr_visible_smilies'    =>    262144,
                                    
'pmqr_visible_size'        =>    524288,
                                    
'pmqr_visible_font'        =>    1048576,
                                    
'pmqr_visible_align'    =>    2097152,
                                    
'pmqr_visible_list'        =>    4194304,
                                    
'pmqr_visible_code'        =>    8388608,
                                    
'pmqr_visible_php'        =>    16777216,
                                    
'pmqr_visible_html'        =>    33554432,
                                    
'pmqr_visible_custom'    =>    67108864
                                
);
                            }
                        }
                    } 
Please remember that $exclforums = '1,2,3,4,5,6,7' will specified forumids to be excluded, thus you may spot a simple option on vBulletin options for it.

Good Luck
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01383 seconds
  • Memory Usage 1,877KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete