Author |
Message |
dad7732
RavenNuke(tm) Development Team

Joined: Mar 18, 2007
Posts: 1242
|
Posted:
Mon May 12, 2008 9:13 am |
|
Edit "Messages" with CSS and it's lost when saviing. Load Message format in the editor, click on "Source" and nothing is shown in the <head> tag. So, how do you retain CSS style formatting? I MUST be missing SOMEthing (as usual).
Cheers, Jay |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon May 12, 2008 9:30 am |
|
Confused...messages can't affect what's displayed in the <head> tag. If the css class is lost from the message, that's a different issue. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
dad7732

|
Posted:
Mon May 12, 2008 9:32 am |
|
Confusion override ..
My "Messages" has a <head> tag with style. Everything in the <head> tag is lost when viewing the source and/or saving after editing the body of the message.
Cheers |
|
|
|
 |
kguske

|
Posted:
Mon May 12, 2008 10:08 am |
|
That's because head isn't defined in the allowableHTML array in config.php. You don't want this because it's defined (overridden) in the header.php file (i.e. even if the editor didn't remove it, it wouldn't work). You can do inline CSS or add the CSS (inline or linked) in the header.php, custom_header.php or javascript.php files. |
|
|
|
 |
dad7732

|
Posted:
Mon May 12, 2008 10:26 am |
|
Actually my "Messages" format on this particular site is a holdover from Nuke 6.5 in this example. What I can do is to edit the messages locally and then paste it as "source" and save. That works.
So, the only way to create style is inline in each tag in FCK without having to modify any other configuration file(s) which is fine by me. The least amount of fingers in the pie the better.
Cheers |
|
|
|
 |
kguske

|
Posted:
Mon May 12, 2008 8:56 pm |
|
You could also have CSS defined externally, loaded in a link rel tag, and specify the class in the editor. |
|
|
|
 |
dad7732

|
Posted:
Mon May 12, 2008 9:19 pm |
|
Yep, can do that as well. Also found out something else interesting. I can enter:
Code:<style type="text/css">
.hot3 {
font-family: verdana,arial;
color: black;
font-weight: bold;
background-color: ivory;
font-size: 14px;
width : 600px;
margin-left : auto;
margin-right : auto;
border : thin solid red;
padding : 15px;
text-align: justify;
}
body {
background-color:black;
}
</style>
|
at the top of the regular html, just do NOT add a <head> or anything else including a <body> tag or else the CSS will be stripped upon a re-edit.
Also interesting is that FCK will add a <p> before the <style> tag and a </p> after the </style> tag. All CSS will be intact from edit to edit and that way I don't have to do inline style, etc. However, I do like the use of the link rel tag as that's a bit easier depending on the complexity of the CSS.
Cheers |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Mon May 12, 2008 9:26 pm |
|
Yeah, because embedding CSS in-line the way you are doing here will break compliance (XHTML). |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
dad7732

|
Posted:
Mon May 12, 2008 10:14 pm |
|
Dunno what it's breaking, works in FF, Seamonkey, Nav 9, Flock, etc. |
|
|
|
 |
montego

|
Posted:
Tue May 13, 2008 5:33 am |
|
dad7732, if being XHTML compliant is of no value to you and it renders fine for you in all the browsers that you wish to support, then forget what I said. |
|
|
|
 |
dad7732

|
Posted:
Tue May 13, 2008 6:03 am |
|
No no ... let me restate, sorry!! What I meant was, "what does it break?". If there is a critical issue then I need to fix it, thanks. |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Tue May 13, 2008 7:01 am |
|
Doing it that way is non-compliant, i.e. it is against the rules of XHTML. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
kguske

|
Posted:
Tue May 13, 2008 11:57 am |
|
dad7732 wrote: | However, I do like the use of the link rel tag as that's a bit easier depending on the complexity of the CSS. |
And, it's XHTML compliant, so you get the Good Housekeeping Seal of Approval (just kidding).
Seriously, you might as well just put the CSS inline (instead of insert the style outside the <head> tag). That will work and keep the compliance police happy, too. |
|
|
|
 |
dad7732

|
Posted:
Tue May 13, 2008 5:47 pm |
|
Thanks guys!! It's only the one site brought up from Nuke 6.5 where there was only the basic editor AND my most important support site to boot. So .. keeping the fingers out of the pie will suffice for the moment but I will reformat the messages on THAT site on my local system making sure it works and is compliant and THEN upload it. All the rest based on RN will of course will be formatted correctly from the beginning.
Good Housekeeping Seal accepted ..
Cheers |
|
|
|
 |
montego

|
Posted:
Wed May 14, 2008 5:55 am |
|
Quote: | and keep the compliance police happy, too |
I figured someone has to pick up the charge for 64bitguy. |
|
|
|
 |
|