WYSYWIG HTML - use styles (classes)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

macangelo wrote:ok, I'm ready. Is there a (foolproof) howto telling me which files to replace and which not?

Thanks a lot

Macangelo
nope sry...

you have to make a fresh install I guess or you could use a program like http://www.winmerge.org
http://www.studmed.dk Portal for doctors and medical students in Denmark
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

I remember reading something about a bigger update at the end of May. Wouldn't it be clever to wait?

have a great day!
Macangelo
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

macangelo wrote:I remember reading something about a bigger update at the end of May. Wouldn't it be clever to wait?

have a great day!
Macangelo
well it up to you...
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Spaw Styles not displaying in browser

Post by jsw_nz »

Frold,

I got the drop down list to display in spaw and the styles actually display within the editor quite nicely.

However when I display the final page in my browser the css definition is not present and therefore the styled text displays according to defaults. I changed this line, not sure if this was needed, in the spaw_control.config.php file

// add javascript inline or via separate file: changed
$spaw_inline_js = true;

Still no proper display of inline styles. So basically the source code for the final page is correct in the body:

<P class=spawstyle2>Content for&nbsp;Contact 1</P>

but the css style definition is not being exported to the page's header:

Any idea what I am doing wrong?

Cheers, jsw
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Hi frold,

I just did the upgrade. Since I have another problem to solve first (for which I might start another thread in the troubleshooting section) I get back to this one later. But I will keep reading...

Have a great day

macangelo
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Frold, pSouper, Dexxus, Macangelo..........

Have any of you experienced the same problems, namely that the style shows up successfully in the editor but does not export in the css definitions, not getting rendered in the browser. I am not sure if this is an issue of the style getting over-ridden, but to the best of my understanding of the source code of the final rendered page, the css style is not being explicitly defined. This is such a nice feature, I am wondering if it is something I am doing wrong on my end, or this is a more general reproducible problem.

Cheers, jsw
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Okay, this is a WAG, as I only have access to the phpWCMS source code right now, not an actual installation :roll:

I found a reference to possibly similar discussion:
http://sourceforge.net/forum/message.php?msg_id=2547809

So, accordingly, as an experiment, perhaps someone could try modifying "spaw_control.config.php" like this:

Change:

Code: Select all

$spaw_default_css_stylesheet = $spaw_dir.'wysiwyg.css';
To:

Code: Select all

$spaw_default_css_stylesheet = $phpwcms["root"].'phpwcms_template/inc_css/frontend.css';
or something similar??
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Great

Post by jsw_nz »

Good Call Dexxus!

You are absolutely right. so in order to use the styles in this workaround they need to be declared in the frontend.css.

I went ahead and copied and pasted the the defaults from the:

include\inc_ext\spaw\wysiwyg.css into the phpwcms_template\inc_css\frontend.css file

On first try it did not work. Went ahead and edited:

spaw\spaw_control.class.php and explicitly declared:

Code: Select all

$spaw_default_css_stylesheet = $phpwcms["root"].'phpwcms_template/inc_css/frontend.css';
on line 57 (right after the same global declaration)
seems to work for me, although there may be a more elegant solution.
The nice part about this is you can easilty edit the frontend but the changes will need to be made manually to the array in spaw_control.config.php

Code: Select all

$spaw_dropdown_data['style']['style1'] = 'Style 1'; 
$spaw_dropdown_data['style']['style2'] = 'Style 2';
//
$spaw_dropdown_data['style']['myNewStyle in frontend.css'] = 'myNewStyle';
At the end of the day, this works. Thanks!

jsw
Harpo
Posts: 9
Joined: Mon 19. Apr 2004, 20:18
Location: The Netherlands

Nice solution...

Post by Harpo »

This is nice solution; thanks for working this out. I tried it and it was just what I needed.

But how does this go with the FCK editor??

See my post:
http://www.phpwcms.de/forum/viewtopic.php?t=2002

IMHO this is something for the FAQ.
Post Reply