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 - Advanced BBCode Permissions (https://vborg.vbsupport.ru/showthread.php?t=122942)

John Stone 05-11-2008 09:03 PM

Great hack! I was using with 3.6.7 with no adverse issues. I'm about to deploy 3.7.0--will it still work? I've come to depend on this hack!

Antivirus 05-14-2008 10:31 PM

Really cool idea Abe1. I have a question however, are the permissions set in this mod also taken into consideration in /misc.php when generating the list of available BB Codes and examples?

For example, here: https://vborg.vbsupport.ru/misc.php?do=bbcode

thincom2000 05-15-2008 01:15 PM

Nope. That has always been an issue.

EDIT: But in vBulletin 3.7, some new hooks make it much easier to do. Look at hooks misc_bbcode_bit for custom and misc_bbcode_complete for default bbcodes. For misc_bbcode_bit a continue is not possible, so you must be clever and restore/truncate the templates on each pass.

thincom2000 05-15-2008 02:57 PM

I believe this only works in vBulletin 3.7.0, because earlier versions don't have these hooks.
If you see this post, Abe, you're free to integrate it into the product.

To handle custom BB-Code perms, plugin at: misc_bbcode_bit
Note: You will need to modify the forum ID for your own setup.
PHP Code:

if (empty($full_parse))
{
    if (!
defined('BBCODE_ENABLED_FORUM'))
    {
        
define('BBCODE_ENABLED_FORUM'2);
    }

    
$full_parse = array(
        
$vbulletin->templatecache['help_bbcodes_bbcode'],
        
$vbulletin->templatecache['help_bbcodes_link']
    );
}

$bbcode['output'] = $bbcode_parser->parse($bbcode['bbcodeexample'], BBCODE_ENABLED_FORUM);

if (empty(
$bbcode_parser->tag_list[($bbcode['twoparams'] ? 'option' 'no_option')][$bbcode['bbcodetag']]))
{
    
$vbulletin->templatecache['help_bbcodes_bbcode'] = '';
    
$vbulletin->templatecache['help_bbcodes_link'] = '';    
}
else
{
    
$vbulletin->templatecache['help_bbcodes_bbcode'] = $full_parse[0];
    
$vbulletin->templatecache['help_bbcodes_link'] = $full_parse[1];


To handle default BB-Code perms, plugin at: misc_bbcode_complete
PHP Code:

$show['bbcodebasic'] = (!empty($bbcode_parser->tag_list['no_option']['b'])) ? true false;
$show['bbcodecolor'] = (!empty($bbcode_parser->tag_list['option']['color'])) ? true false;
$show['bbcodesize'] = (!empty($bbcode_parser->tag_list['option']['size'])) ? true false;
$show['bbcodefont'] = (!empty($bbcode_parser->tag_list['option']['font'])) ? true false;
$show['bbcodealign'] = (!empty($bbcode_parser->tag_list['no_option']['left'])) ? true false;
$show['bbcodelist'] = (!empty($bbcode_parser->tag_list['option']['list'])) ? true false;
$show['bbcodeurl'] = (!empty($bbcode_parser->tag_list['option']['url'])) ? true false;
$show['bbcodecode'] = (!empty($bbcode_parser->tag_list['no_option']['code'])) ? true false;
$show['bbcodephp'] = (!empty($bbcode_parser->tag_list['no_option']['php'])) ? true false;
$show['bbcodehtml'] = (!empty($bbcode_parser->tag_list['no_option']['html'])) ? true false


Antivirus 05-16-2008 01:55 PM

ah- thanks for explaining that thincom2000! hopefully Abe incorporates this into the mod.

Jamyn 05-29-2008 04:37 PM

Looking forward to a vb 3.7 version of this, because right now it doesn't seem like there's any other option to disable bbcode per usergroup. I can't believe the devs overlooked that, with the proliferation of IMG spam.

jojo77 05-29-2008 05:08 PM

Quote:

Originally Posted by Jamyn (Post 1535300)
I can't believe the devs overlooked that, with the proliferation of IMG spam.


Me too. Not giving us an option for only admins to post HTML poses a huge risk. Should be a no brainer addon.

anwar.abdullakh 06-01-2008 10:47 PM

looking forward to a 3.7 version too.
I have some custom BBcodes that I only want my staff to use, I hope you can find the time abe to release a 3.7 version soon.

Veo 06-07-2008 03:50 PM

I'm need it too.

Darkstarproject 06-09-2008 08:53 PM

I know this isnt made for vb 3.7, but I have installed it and tested it, and it is working just fine on vb 3.7.1. I have custom BB Code as well.


All times are GMT. The time now is 03: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.02561 seconds
  • Memory Usage 1,761KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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