Advertisement
Guest User

TinyFix useroption integration

a guest
Feb 5th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1.             //$showWysiwyg = !XenForo_Visitor::isBrowsingWith('mobile');
  2.            
  3.             /*Hack starts here - To remove it, just delete all code between and uncomment above line*/
  4.             $options = XenForo_Application::get('options');
  5.             $visitor = XenForo_Visitor::getInstance();
  6.  
  7.             $tinyfix_rte_mobile_option = ($options->tinymce_fix_mobile_opt_reverse) ? !$visitor->tinyfix_rte_mobile : $visitor->tinyfix_rte_mobile;
  8.            
  9.             if($options->tinymce_fix_mobile == 'no')
  10.             {
  11.                 $showWysiwyg = !XenForo_Visitor::isBrowsingWith('mobile');
  12.             }
  13.             elseif($options->tinymce_fix_mobile == 'yes' && $tinyfix_rte_mobile_option)
  14.             {
  15.                 $showWysiwyg = true;
  16.             }
  17.             else
  18.             {
  19.                 //External addon
  20.                 $visitor = XenForo_Visitor::getInstance();
  21.                 if(!$visitor->getBrowser['isMobile'] || $visitor->getBrowser['isTablet'])
  22.                 {
  23.                     $showWysiwyg = true;
  24.                 }
  25.                 else
  26.                 {
  27.                     $showWysiwyg = false;
  28.                 }
  29.             }
  30.             /*Hack finishes here*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement