DrupalBin
Submit Code
About
Recent Posts
Drupal 5 menu
1 min 39 sec
ago
Views 2 get all field names
43 min 57 sec
ago
Code
1 hour 22 min
ago
How do i make this work in D6 (I have to clear the cache everytime to see the tabs)
4 hours 13 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for enable / disable TinyMCE via template.php (Login/Logout Fix)
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
<?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 phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $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 case 'hours': //dealer page opening hours case 'message': //contact form message case 'nodewords-description': // meta tags description unset($init); break; } // Add some extra features when using the advanced theme. // If $init is available, we can extend it if (isset($init)) { /* This was quoted out as it caused a white screen login in and out switch ($theme_name) { case 'advanced': $init['width'] = '100%'; //force editor content cell to full width! break; } */ if($theme_name=='advanced'){ $init['width'] = '100%'; //force editor content cell to full width! } } // Always return $init return $init; } ?>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.