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)

johnstires 08-30-2006 12:24 AM

How difficult would it be to restrict this hack on a per forum basis. I would like to restrict BBcode but only in certain forums.

I also have a question about restricting IMG tags. how else does one control this on a usergroup level.

Willing to pay for the enhancement:

https://vborg.vbsupport.ru/showthrea...81#post1063781

bhxtyrant 08-30-2006 05:03 AM

Quote:

Originally Posted by Abe1
You can't install this on a vb3.5 forum. I attached a file that you can. I'm not officaly releasing it though.

Hey abe,Sorry for the bother but i have 3.5.4 installed if i read the post correct then the file in this attachment is made to work with 3.5.4?If so there seems to be a problem because i get a database error that was posted on the first page of this thread after uninstalling the old version and installing the version in your post.

tekstylez 08-31-2006 02:15 AM

Quote:

Originally Posted by Abe1
I would need access to you ACP to find the problem.

Abe... I will send a PM with login info...

G_Man 08-31-2006 03:40 AM

Brilliant.

thanks.

Stoebi 08-31-2006 09:15 AM

Quote:

Code:

Warning: Invalid argument supplied for foreach() in /admincp/usergroup.php(181) : eval()'d code on line 30

It happens only with PHP 5. My workaround (posted in vbhacks-germany, too):

Hook: admin_usergroup_edit

Search for
Code:

    foreach ($custom_bbcodes AS $bbcode)
    {
        print_yes_no_row("[" . strtolower($bbcode) . "]", "abe1_bbcode[non_core][$bbcode]", $abe1_bbcode[non_core][$bbcode]);
    }

Replace with
Code:

if ($custom_bbcodes)
{
    foreach ($custom_bbcodes AS $bbcode)
    {
        print_yes_no_row("[" . strtolower($bbcode) . "]", "abe1_bbcode[non_core][$bbcode]", $abe1_bbcode[non_core][$bbcode]);
    }
}


Hook: bbcode_parse_start

Search for
Code:

            foreach ($abe1_bbcode[non_core] AS $bbcode => $yesno)
            {
                if ($yesno == 0)
                {
                    unset($this->tag_list['no_option']["$bbcode"]);
                    unset($this->tag_list['option']["$bbcode"]);
                }
            }

Replace with
Code:

        if ($abe1_bbcode[non_core])
        {
            foreach ($abe1_bbcode[non_core] AS $bbcode => $yesno)
            {
                if ($yesno == 0)
                {
                    unset($this->tag_list['no_option']["$bbcode"]);
                    unset($this->tag_list['option']["$bbcode"]);
                }
            }
        }


Regards, Stoebi

G_Man 09-05-2006 02:36 AM

I don't know if you would want to alter this hack any, but....

What would have been MUCH nicer for me is that the default be 'yes' instead of 'no'. Took me like 20 minutes to go through each Usergroup and turn ON all but two of the BBcodes...

Would have been great to just turn off those two codes for most of my groups.

Just a thought - again, brilliant hack. Cheers.

seg 09-09-2006 01:39 AM

Thank you much - this solved my problem!


Quote:

Originally Posted by Stoebi
It happens only with PHP 5. My workaround (posted in vbhacks-germany, too):

Hook: admin_usergroup_edit

Search for
Code:

    foreach ($custom_bbcodes AS $bbcode)
    {
        print_yes_no_row("[" . strtolower($bbcode) . "]", "abe1_bbcode[non_core][$bbcode]", $abe1_bbcode[non_core][$bbcode]);
    }

Replace with
Code:

if ($custom_bbcodes)
{
    foreach ($custom_bbcodes AS $bbcode)
    {
        print_yes_no_row("[" . strtolower($bbcode) . "]", "abe1_bbcode[non_core][$bbcode]", $abe1_bbcode[non_core][$bbcode]);
    }
}


Hook: bbcode_parse_start

Search for
Code:

            foreach ($abe1_bbcode[non_core] AS $bbcode => $yesno)
            {
                if ($yesno == 0)
                {
                    unset($this->tag_list['no_option']["$bbcode"]);
                    unset($this->tag_list['option']["$bbcode"]);
                }
            }

Replace with
Code:

        if ($abe1_bbcode[non_core])
        {
            foreach ($abe1_bbcode[non_core] AS $bbcode => $yesno)
            {
                if ($yesno == 0)
                {
                    unset($this->tag_list['no_option']["$bbcode"]);
                    unset($this->tag_list['option']["$bbcode"]);
                }
            }
        }


Regards, Stoebi


Ziki 09-15-2006 01:08 PM

So there is no chance getting a 3.5 version huh

TCB 10-02-2006 06:41 PM

Wonderfull mod..... thanks a lot :D

Nathan2006 10-03-2006 01:59 PM

Thank you Abe :)

Install


All times are GMT. The time now is 01:45 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.01235 seconds
  • Memory Usage 1,749KB
  • 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
  • (9)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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