vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Force-changing editor type with a plugin (https://vborg.vbsupport.ru/showthread.php?t=277744)

Mark.B 01-29-2012 09:00 PM

Force-changing editor type with a plugin
 
I would like to force the non-wysiwyg version of CKEditor for users of a certain browser, using this plugin code:

Code:

if (is_browser('whatever')
{
$vbulletin->userinfo[showvbcode]=0;
}

I have tried putting this at editor_toolbar_switch but it doesn't work.

Any idea where to put this?

Lynne 01-29-2012 11:38 PM

Mark, did you mean to put this in the vB3 forum?

Mark.B 01-30-2012 09:43 AM

No it should be vB4, sorry. Late at night.

Lynne 01-30-2012 09:28 PM

Moved.

Maybe editor_toolbar_start?

Mark.B 02-01-2012 07:04 PM

Thanks Lynne; I found that the only way to reliably force the change was actually to hack the includes_editor.php file and put it in there, can't see any hooks near to where I placed the code but at least it works.

I don't mind the odd file edit, I've got about a dozen now anyhow.

Lynne 02-02-2012 12:47 AM

File edits - oh noooooos!

LOL. That is the way we used to have to always install mods, as you know. :)

ForumsMods 02-02-2012 01:17 AM

editor_wysiwyg_compatible
PHP Code:

if (is_browser('whatever')
{
    
$hook_return 0;




All times are GMT. The time now is 04:06 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.00982 seconds
  • Memory Usage 1,724KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete