evil.cz
Linux do každé rodiny, linux do každé kanceláře!

Reply to comment

IMCE and TinyMCE setup under Drupal 6

Step-by-step how-to.

1. Download drupal modules: tinymce-6.x-*.tar.gz, imce-6.x-*.tar.gz
2. Download TinyMCE application: tinymce_3_1_*.zip
3. Download language pack: tinymce_lang_pack.zip (use check-boxes for language selection and a Download button, not XML links ;-)
4. Copy modules into /sites/all/modules/
5. Copy TinyMCE into /sites/all/modules/tinymce. There will be a directory /sites/all/modules/tinymce/tinymce (twice tinymce)
6. Copy language pack into .../tinymce/tinymce/jscripts/tiny_mce
7. Allow both modules in Drupal
8. Chech roles and permissions for both modules
9. Setup IMCE rules
10. Open /tinymce/tinymce.admin.inc, find row #120 containing text:
'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : NULL,
and replace "NULL" with "array()":
'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : array(),
11. Administer TinyMCE module (create new a new profile), check Image and Advanced image
12. Add this function to your current theme's template.php file.(create it if you don't have it. make sure it has <?php at the beginning.)

<?php
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
static $access, $integrated;

if (!isset($access)) {
$access = function_exists('imce_access') && imce_access();
}

$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

if ($init && $access) {
$init['file_browser_callback'] = 'imceImageBrowser';
if (!isset($integrated)) {
$integrated = TRUE;
drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
}
}

return $init;
}
?>

13. Go to admin/settings/performance and Clear cached data (at the bottom).
14. Make sure your users have access to IMCE (admin/settings/imce)
15. Clear your browser's cache and start testing.
16. In case of a failure, try alternative themes or browsers and report back with details.
[Step #12-16 see http://drupal.org/node/241753#comment-792305]

Your rating: None Average: 1 (1 vote)

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.