You are here

function tinybrowser_get_tinymce_root in TinyBrowser 7

Function to get the tinyMCE directory (where tiny_mce.js exists)

3 calls to tinybrowser_get_tinymce_root()
config_tinybrowser.php in tinybrowser/config_tinybrowser.php
tinybrowser_install in ./tinybrowser.install
Implements hook_install().
tinybrowser_settings_form in ./tinybrowser.module

File

./tinybrowser.module, line 30

Code

function tinybrowser_get_tinymce_root() {
  if (module_exists("tinytinymce")) {
    $install_dir = drupal_get_path('module', 'tinytinymce');
    if (file_exists($install_dir . '/tinymce/jscripts/tiny_mce/tiny_mce.js')) {
      return '../../tinytinymce/tinymce/jscripts/tiny_mce';
    }
  }
  else {
    if (module_exists("wysiwyg")) {
      $install_dir = wysiwyg_get_path('');
      if (file_exists($install_dir . '/tinymce/jscripts/tiny_mce/tiny_mce.js')) {
        return '../../../libraries/tinymce/jscripts/tiny_mce';
      }
    }
  }
  return '';
}