Jump to content


Tinymce - Path To Css Doesn't Work


  • You cannot reply to this topic
22 replies to this topic

#1 Guest_dragonos_*

  • Guests

Posted 09 May 2006 - 07:10 AM

Hi,

I try to setuo TinyMCE correctly.
I entered the correct path to my site-css but the css doesn't seem to be used.

I tried the path fro my servers root and the absolute path (http://...).

What's wrong?


Thanks.
dragonos

#2 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 09 May 2006 - 01:04 PM

dragonos, on May 9 2006, 04:10 AM, said:

Hi,

I try to setuo TinyMCE correctly.
I entered the correct path to my site-css but the css doesn't seem to be used.

I tried the path fro my servers root and the absolute path (http://...).

What's wrong?
Thanks.
dragonos
Did you enter the allowed tags in the input box provided...??? This feature is TinyMCE specific and not one that was concocted by Etomite so it should be covered in the TinyMCE documentation...

#3 Guest_dragonos_*

  • Guests

Posted 09 May 2006 - 02:45 PM

Ralph (rad14701), on May 9 2006, 03:04 PM, said:

Did you enter the allowed tags in the input box provided...??? This feature is TinyMCE specific and not one that was concocted by Etomite so it should be covered in the TinyMCE documentation...

I entered the path to my global css in the etomite configuration.
Isn't it possible that TinyMCE shows the correct formating (e.g. font-color, ...) while editing?

#4 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 09 May 2006 - 07:26 PM

dragonos, on May 9 2006, 11:45 AM, said:

I entered the path to my global css in the etomite configuration.
Isn't it possible that TinyMCE shows the correct formating (e.g. font-color, ...) while editing?
Yes, it should, but as I mentioned previously, these are TinyMCE related issues and not issues directly related to Etomite... Any TinyMCE specific questions need to be addressed either through the TinyMCE documentation or in the TinyMCE support forums on their website...

For any additional Etomite related help we would need the following:

<generic_request>

Please supply us with additional information so we can better assist you in resolving this issue... The following information, complete with version/release will be of great help... If the issue is browser-specific also include browsers tested and the results of each...

Server Operating System
Server Software
PHP version
MySQL

</generic_request>

#5 anarchistic

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 13 May 2006 - 04:04 PM

I'll reply for him. I'm using Uniserver 3.3 on WinXP SP2.

That includes this: "Apache/2.0.55 (Win32) DAV/2 PHP/5.1.1"

I have included the path to my CSS file and used the CSS selectors, but neither appear to have any effect on the default TinyMCE.

I've also installed Etomite on my Dreamhost account and the same thing happens. I'm using a default install. The only thing I do is provide various different possible links to the CSS file and a couple of CSS selectors which I've added the classes for into the default new-E.css

It completely refuses to work on either server.

Do you guys have it working in 0.61 Prelude?

#6 anarchistic

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 14 May 2006 - 12:43 PM

Alright, I've investigated further.

In the file: /manager/actions/dynamic/mutate_content.dynamic.action.php

This code:
tinyMCE.init({
      relative_urls : true,
      document_base_url : "<?php echo $ETOMITE_PAGE_BASE['relative']; ?>",
      mode : "textareas",
      theme : "advanced",
      relative_urls : rel,
      remove_script_host : false,
      convert_urls : true,
      plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zo
om,flash,searchreplace,print, _
contextmenu,paste,directionality,fullscreen,noneditable,ibrowser",
      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,ful
lscreen,ibrowser",
      theme_advanced_toolbar_location : "top",
      theme_advanced_toolbar_align : "left",
      theme_advanced_path_location : "bottom",
      content_css : "example_full.css",
      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]",
      external_link_list_url : "example_data/example_link_list.js",
      external_image_list_url : "example_data/example_image_list.js",
      flash_external_list_url : "example_data/example_flash_list.js",
      file_browser_callback : "mcFileManager.filebrowserCallBack",
      theme_advanced_resize_horizontal : false,
      theme_advanced_resizing : true
    });

As far as I can tell, content_css : "example_full.css", should be some kind of database config parameter call, but it's not.

Also, theme_advanced_styles : "<?php config params from db ?>" should be in there somewhere, but it's not.

Funnily enough, when I make these corrections, TinyMCE works how I want it to. Do you still think it's a problem with TinyMCE? :rolleyes:

#7 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 14 May 2006 - 02:45 PM

So... what changes are you proposing we make?

#8 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 14 May 2006 - 02:57 PM

anarchistic, on May 14 2006, 09:43 AM, said:

Alright, I've investigated further.

In the file: /manager/actions/dynamic/mutate_content.dynamic.action.php

<<< SNIP >>>

As far as I can tell, content_css : "example_full.css", should be some kind of database config parameter call, but it's not.

Also, theme_advanced_styles : "<?php config params from db ?>" should be in there somewhere, but it's not.

Funnily enough, when I make these corrections, TinyMCE works how I want it to.  Do you still think it's a problem with TinyMCE?  :rolleyes:
If you come up with a fix you can post it here and it will be considered for future releases... Your investigation into this matter and the possibility of a fix is greatly appreciated... You, obviously, have more time to invest into this matter than I do at present and I can't begin to total the number of hours I have invested into getting the editor integrations to the limited level of functionality they are at now... My original comments were more along the lines of seeking the answers through TinyMCE as this truly is a TinyMCE issue and not one of Etomite other than the integration code itself which in turn relies on knowledge of TinyMCE...

#9 anarchistic

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 28 May 2006 - 08:53 AM

content_css : "example_full.css",
needs to be:
theme_advanced_styles : "<?php echo($cssSelectors); ?>",
content_css : "<?php echo($cssPath); ?>",

Holy fart! I made a change and it worked! :D

Do you want me to put this in the bug forum?

#10 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 29 May 2006 - 07:22 PM

View Postanarchistic, on May 28 2006, 04:53 AM, said:

content_css : "example_full.css",
needs to be:
theme_advanced_styles : "<?php echo($cssSelectors); ?>",
content_css : "<?php echo($cssPath); ?>",

Holy fart! I made a change and it worked! :D

Do you want me to put this in the bug forum?
I'll give the code a good testing and if everything seems to be working we'll ad the fix into the next batch of patches...

#11 charismaddux

    Etomite Forum Newbie

  • Member
  • 42 posts

Posted 06 June 2006 - 11:42 PM

Yup, that worked! Thanks anarchistic!

#12 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 06 June 2006 - 11:47 PM

Ralph, does this one need to be committed to the core?

#13 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 07 June 2006 - 01:24 AM

View PostDean, on Jun 6 2006, 07:47 PM, said:

Ralph, does this one need to be committed to the core?
I have installed the modifications to the code but haven't had time to test the functionality other than to know that the editor still works... :rolleyes: Any reviews of this mod would be appreciated... :eto:

#14 Guest_xrepins_*

  • Guests

Posted 07 June 2006 - 03:14 PM

Ha! I noticed this at the weekend and just figured it was me. Good to have it resolved. Thanks.

#15 Guest_xrepins_*

  • Guests

Posted 07 June 2006 - 03:44 PM

I have to say that so far it's not working for me, but I'll investigate further at my end before I make any further statement :)

#16 Guest_xrepins_*

  • Guests

Posted 07 June 2006 - 04:05 PM

I take that back; it works fine. It's my brain that's faulty. :)

#17 anarchistic

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 14 June 2006 - 04:13 AM

So just out of interest, what happens now? Have you guys "committed it to the core"?

#18 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 14 June 2006 - 05:25 AM

View Postanarchistic, on Jun 14 2006, 12:13 AM, said:

So just out of interest, what happens now? Have you guys "committed it to the core"?
Yes, but not to the release downloads... The fix is only available as information for manual editing or by downloading the patched module file... Future releases will contain this modification...

#19 Meriadoc

    Etomite Forum Newbie

  • Member
  • 2 posts

Posted 09 August 2006 - 04:08 PM

I stumbled across the issue this thread concerns earlier today while trying to add styles to the dropdown menu in TinyMCE. And would like to thank anarchistic as his patch has saved me a lot of time. However I have noted a possible problem with the patch, luckily it's not a massive issue.

If you leave the "CSS selectors" field under the "Interface & editor settings" tab blank, then "<?php echo ($cssSelectors);?>" displays "theme_advanced_styles". This means that in the style dropdown menu you have an option "theme_advanced_styles" which is not a valid style. If you put a space in the "CSS selectors" field then you end up with a space as an option in the drop down menu. Therefore if 'tiny_css_selectors' is empty then no "theme_advanced_styles :" should appear in the tinyMCE.init call.

Here is the offending extract from the HTML

theme_advanced_styles : "theme_advanced_styles",
content_css : "../templates/bl/styles/standard.css",

Maybe this would be a better way to fix this problem, you need to edit this file "mutate_content.dynamic.action.php":

First Change this:
<!-- tinyMCE -->
  <?php
  } elseif($which_editor==1) {
	$cssPath = !empty($tiny_css_path) ? $tiny_css_path : "";
	$cssSelectors = !empty($tiny_css_selectors) ? $tiny_css_selectors : "theme_advanced_styles";
  ?>

to this:
<!-- tinyMCE -->
  <?php
  } elseif($which_editor==1) {
	$cssPath = !empty($tiny_css_path) ? "content_css : \"$tiny_css_path\",\n" : "";
	$cssSelectors = !empty($tiny_css_selectors) ? "theme_advanced_styles : \"$tiny_css_selectors\",\n" : "";
  ?>

then change this:
content_css : "example_full.css",
or this:
theme_advanced_styles : "<?php echo($cssSelectors); ?>",
content_css : "<?php echo($cssPath); ?>",
to this:
<?php echo($cssSelectors); ?>
<?php echo($cssPath);?>

Therefore if no values are set for either "tiny_css_path" or "tiny_css_selectors" then no values are passed into the tinyMCE.init call.

Edited by Meriadoc, 09 August 2006 - 04:09 PM.


#20 Chris Desautels

    Etomite Forum Newbie

  • Member
  • 1 posts

Posted 14 August 2006 - 06:24 PM

For the record, I'm having the same problem and editing the mutate_content.dynamic.action.php file has had no effect. Just for grins, I edited that file by hardcoding the path to the css file as well and that had no effect either :blink:

Mac OS 10.3.4
Apache 2.0.49
Php 4.3.10
MySQL 4.0.18





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users