vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Hyperlink feature of editor being used to spam (https://vborg.vbsupport.ru/showthread.php?t=324077)

Snowhog 12-28-2016 07:45 PM

Thank you.

Okay, created a test user. The default editor for all new registrants is the Enhanced Editor.

I logged out and logged in as the new user. Started a new Thread and the Link button is still in the editor and is functional. Previewing the post shows an active hyperlink. :(

MarkFL 12-28-2016 07:54 PM

Quote:

Originally Posted by Snowhog (Post 2579976)
Thank you.

Okay, created a test user. The default editor for all new registrants is the Enhanced Editor.

I logged out and logged in as the new user. Started a new Thread and the Link button is still in the editor and is functional. Previewing the post shows an active hyperlink. :(

Odd, because it removes the "Link" button for me, whether I set the Standard or Enhanced editor. What code are using in the plugin?

Snowhog 12-28-2016 07:55 PM

Code:

if (is_member_of($vbulletin->userinfo, array(2)))
{
    $k1 = 0;
    $k2 = 0;

    foreach($this->config['toolbar'] AS $arr_1)
    {
        if (is_array($arr_1))
        {
            foreach($arr_1 AS $arr_2)
            {
                if ($arr_2 === 'Link')
                {
                    unset($this->config['toolbar'][$k1][$k2]);
                    break 2;
                }

                $k2++;
            }
        }

        $k1++;
        $k2 = 0;
    }
}


MarkFL 12-28-2016 08:02 PM

Are you certain your test user is a member of usergroup 2?

When you saved the plugin, did you make it active?

Snowhog 12-28-2016 08:04 PM

Yes, the plugin is marked Active. The new user I created is in Primary Usergroup Registered User, which is usergroupid 2.

--------------- Added [DATE]1482963810[/DATE] at [TIME]1482963810[/TIME] ---------------

What about using hook location editor_switch_wysiwyg_to_standard instead? What would the PHP code consist of for this for members of usergroupid 2?

MarkFL 12-29-2016 12:05 AM

Try adding the following line to the top of the plugin I posted:

PHP Code:

global $vbulletin


Snowhog 12-29-2016 02:54 AM

That worked. The Enhanced Editor for my test user now doesn't contain the Link button. Thank you.

MarkFL 12-29-2016 08:50 AM

I have published a product here that will allow you to remove whichever buttons you want and select the affected usergroups:

Custom Toolbar

I have cited you as a co-author. :)

Snowhog 12-29-2016 09:10 AM

Thank you so very much.

Installed the MOD after making the prior plugin inactive. I'll check it out with my test user. I selected Link, Unlink, Html, and Php to be removed from the editor for Registered Users.

--------------- Added [DATE]1483010822[/DATE] at [TIME]1483010822[/TIME] ---------------

Works perfectly. The buttons I selected to be removed were not on the toolbar when I logged in with my test user. This is great! :up:

Snowhog 04-27-2017 01:55 PM

Just noticed that in Custom Toolbar v1.1 under Buttons to Remove you have "Hold down the [CTRL] key to select multiple forums". That should be "Hold down the [CTRL] key to select multiple buttons".


All times are GMT. The time now is 07:18 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.01175 seconds
  • Memory Usage 1,739KB
  • 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)bbcode_php_printable
  • (1)bbcode_quote_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
  • (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