Reply to comment

It's impossible to override this function.
Why? Look at the functions name. It confusses drupal thinking its an implementation of hook_theme(). So any override in template.php using phptemplate_tiny_mce() or theme_name_tinymce_theme() wont work.
You need to patch the module.
If you want to add a text area that doesnt need tinymce just add an other rule shown by the id of 'my-textarea'.

<?php
/**
 * Customize a TinyMCE theme.
 *
 * @param init
 *   An array of settings TinyMCE should invoke a theme. You may override any
 *   of the TinyMCE settings. Details here:
 *
 *    http://tinymce.moxiecode.com/wrapper.php?url=tinymce/docs/using.htm
 *
 * @param textarea_name
 *   The name of the textarea TinyMCE wants to enable.
 *
 * @param theme_name
 *   The default tinymce theme name to be enabled for this textarea. The
 *   sitewide default is 'simple', but the user may also override this.
 *
 * @param is_running
 *   A boolean flag that identifies id TinyMCE is currently running for this
 *   request life cycle. It can be ignored.
 */
function theme_tinymce_theme($init$textarea_name$theme_name$is_running) {
   
// uncomment to debug this
   
/*   print_r($init);
    print_r($textarea_name);
    print_r($theme_name);
    print_r($is_running);
*/  
  
switch ($textarea_name) {
    
// Disable tinymce for these textareas
    
case 'log'// book and page log
    
case 'img_assist_pages':
    case 
'caption'// signature
    
case 'pages':
    case 
'access_pages'//TinyMCE profile settings.
    
case 'user_mail_welcome_body'// user config settings
    
case 'user_mail_approval_body'// user config settings
    
case 'user_mail_pass_body'// user config settings
    
case 'synonyms'// taxonomy terms
    
case 'description'// taxonomy terms
    
    //add your rule here 
    
case 'my-textarea':
       

        unset(
$init);
      break;

    
// Force the 'simple' theme for some of the smaller textareas.
    
case 'signature':
    case 
'site_mission':
    case 
'site_footer':
    case 
'site_offline_message':
    case 
'page_help':
    case 
'user_registration_help':
    case 
'user_picture_guidelines':
      
$init['theme'] = 'simple';
      foreach (
$init as $k => $v) {
        if (
strstr($k'theme_advanced_')) unset($init[$k]);
      }
      break;
  }

  
/* Example, add some extra features when using the advanced theme.

  // If $init is available, we can extend it
  if (isset($init)) {
    switch ($theme_name) {
     case 'advanced':
       $init['extended_valid_elements'] = array('a[href|target|name|title|onclick]');
       break;
    }
  }

  */

  // Always return $init
  
return $init;
}
?>

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img><p><b><i><table><th><tr><td><blockquote><br /><img /><tbody><span><strike>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <codes>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.