Upgrade/Replace module TinyMCE 1.2 TO/BY 2.0.

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
tigercat

Upgrade/Replace module TinyMCE 1.2 TO/BY 2.0.

Post by tigercat »

Hi there everybody.

Short
Updating TinyMCE from 1.2 to 2.0RC3 does not succeed. Page content is now shown only in HTML code. With 1.2 it worked.
Bug in Release Candidate or in CMSMS 0.11beta?

System
CMSMS 0.11 beta.
Firefox 1.0.6 portable / IE 6.0
Mysql 4.0.26

Details
I am running current beta version of CMSMS 0.11.
This comes along with module TinyMCE 1.2. I wanted to upgrade it to current beta 2.0 release candidate 3.

What I did:
- uninstalled TinyMCE1.2 (admin -> modules -> uninstall)
- removed TinyMCE folder from /modules/
- unzipped new TinyMCE to folder /modules/TinyMCE20RC3
- copied old "TinyMCE.module.php" to new folder (and adapted path name to "tiny_mce.js")
- installed TinyMCE2.0 (admin -> modules -> install)

After installing everything seems OK (status tells INSTALLED). But editing pages is not possible. Page content is shown only in HTML.
Later I tried to set TinyMCE as default WYSIWIG-editor (-> user preferences) like someone posted here in forum. This did not help either cause dropdown box is empty. Cannot choose any editor. ;-(

Does anybody know about this or a similar problem?
Any idea is geatly appreaciated.
tigercat

Re: Upgrade/Replace module TinyMCE 1.2 TO/BY 2.0.

Post by tigercat »

Had some little success on my own I want to tell.

(1)
It seems to be important to give the new module (2.0) the same folder and file names like the old one (1.2).
So I removed the old TinyMCE folder from /modules replacing it with the new content.
After that HTML code is editible now.

One problem is remaining: Cannot insert pictures - why??
tigercat

Re: Upgrade/Replace module TinyMCE 1.2 TO/BY 2.0.

Post by tigercat »

(2)
Had to adapt TinyMCE.module.php to get images back and to include the new features.
My temporary adaption:

Code: Select all

<__script__ type="text/javascript" src="<?php echo $gCms->config['root_url'] ?>/modules/TinyMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></__script>
<__script__ type="text/javascript">
	tinyMCE.init({
		mode : "exact",
		elements : "<?php
			$elements = '';
			foreach ($gCms->variables['tinymce_textareas'] as $oneelement)
			{
				$elements .= $oneelement . ', ';
			}
			if (strlen($elements))
			{
				$elements = substr($elements, 0, strlen($elements) -2);
			}
			echo $elements;
		?>",
		<?php
		if (isset($gCms->variables['tinymce_stylesheet']))
		{
			$css = $gCms->variables['tinymce_stylesheet'];
			$striptags = $this->GetPreference('striptags', 'false');
			if ($striptags == 'true')
			{
				$css .= '&stripbackground=true';
			}
	
			echo 'content_css : "' . $css . "\",\n";
		}
		?>
		theme : "advanced",
		plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
		theme_advanced_buttons1_add_before : "save,newdocument,separator",
		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
		theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
		theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
		theme_advanced_buttons3_add_before : "tablecontrols,separator",
		theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",
		plugin_insertdate_dateFormat : "%Y-%m-%d",
		plugin_insertdate_timeFormat : "%H:%M:%S",
		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		file_browser_callback : "mcFileManager.filebrowserCallBack",
		theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true
	});
</__script>
Locked

Return to “CMSMS Core”