More info for bgcolor admin (edit) mode

General questions about CMSimple
Post Reply
Nicky
Posts: 164
Joined: Sun Feb 08, 2009 9:50 am
Location: Antwerp, Belgium

More info for bgcolor admin (edit) mode

Post by Nicky » Mon Feb 01, 2010 8:45 pm

Cmsimple XH with built-in FCK editor.

I would like to change the background colour in admin/edit mode to match the colour of the template. White text is otherwise invisible.

In wiki I found this:
"If you use the FCKeditor4CMSimple, the FCKeditor-Integration for CMSimple, what we strongly suggest to do, this setting is done in the file FCKeditor/custom_configurations/fckconfig_cmsimple.js as all configurations are stored there, so that any update of the editor will not overwrite your settings. "

But, where exactly in the file "cmsimple.js" is the background colour of the editor textarea determined, and how to change it?

I have tried to change colour code (originally it's #ffffff) in the file (same folder as cmsimple.js) "custom_fck_editorarea.css" this:

body
{
background-color: #000000;
padding: 5px 5px 5px 5px;
margin: 0px;
}


but, strangely that had no influence at all.

Thanks in adv for help.

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: More info for bgcolor admin (edit) mode

Post by Holger » Wed Feb 03, 2010 12:56 pm

Hi Nicky, sorry being late, I've not noticed your thread.

By default the editor use the css of the template. Sometimes that's not a good idea, you give an example ;) .
In top of the file /cmsimple/fckeditor.php you'll find the code below:

Code: Select all

/*** Configuration: ***********************************************************************
*******************************************************************************************/

// It's recommended to apply the basic css - settings from your template
// to ./FCKeditor/custom_configurations/custom_fck_editorarea.css.
// You can try to use your template-css by setting $use_Template_Css = true;

$use_Template_Css = true;

/*** No need to change something below this line ******************************************
*******************************************************************************************/  
If you change the line

Code: Select all

$use_Template_Css = true;  
to

Code: Select all

$use_Template_Css = false;  
the editor will use the settings in the file ./FCKeditor/custom_configurations/custom_fck_editorarea.css. Now you should apply all the settings you need from your template-css to this file (or just copy the whole content as a quick and dirty solution) and here you can make propper settings to the <body> tag.
After deleting the browsercache and re-login you'll see your changes.

There are other ways to style the editarea but for me it seems to be easy that way without changing / adding ids to the template.

Holger

Nicky
Posts: 164
Joined: Sun Feb 08, 2009 9:50 am
Location: Antwerp, Belgium

Re: More info for bgcolor admin (edit) mode

Post by Nicky » Wed Feb 03, 2010 3:31 pm

Well, I think managed to to what you described -> change true to false in fckeditor.php
and I copied complete stylesheet.css in the document custom_fck_editorarea.css

Something weird though.. (only in edit mode)

in admin mode the following appears in left top corner (Mozilla Firefox), and template is somewhat deformed:


in IE it looks reasonably OK (template does not deform) but some characters are replaced by question marks

next » becomes next ?


Any idea? Thanks fr yr time.

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: More info for bgcolor admin (edit) mode

Post by Holger » Wed Feb 03, 2010 8:43 pm

Hmm, for me it looks like a encoding problem within the files.
But without a url, ftp-access or a zip of your installation that would be hard to figure out :? .

Holger

Nicky
Posts: 164
Joined: Sun Feb 08, 2009 9:50 am
Location: Antwerp, Belgium

Re: More info for bgcolor admin (edit) mode

Post by Nicky » Wed Feb 03, 2010 9:19 pm

Thanks, you are completely right!
For some weird reason, the document fckeditor.php, when transferred via ftp and back, generated as first characters
 just before <?php

I did this (download/upload) to change 'true' to 'false' (see above).

Solution was to download full XH package again to obtain fckeditor.php in original version, upload that file and modify it directly on the server via hosting control panel...

Probably some strange coincidence I don't think this will happen on every server/host, I'm happy I found the error, though.
By the way, background colour fine, all css as it should be.
Thanks Holger!

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: More info for bgcolor admin (edit) mode

Post by Gert » Wed Feb 03, 2010 9:48 pm

If you have that:  on left top of your site, mostly there is a file encoded in utf-8 with BOM (Byte Order Mark), convert it to utf-8 without BOM.

In my last case of that problem it was the template.htm. But maybe it is another file. Mostly that  is visible in FF only.

Check the encoding of your files, <edit>and the settings of your offline editor, like Holger says</edit>

Gert

You can ask google for , you will find interesting informations.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: More info for bgcolor admin (edit) mode

Post by Holger » Wed Feb 03, 2010 9:51 pm

Hi Nicky,
Nicky wrote:Probably some strange coincidence I don't think this will happen on every server/host, I'm happy I found the error, though.
No, that's not a server problem. The characters are the BOM (Byte order mark) of an utf-8 encoded document.
It seems you have edited the file and your editor has added the BOM at the top.

Normally, to prevent problems in utf-8 - installations, all files of the fckeditor package should be encoded in utf-8 without BOM.

Holger

Post Reply