PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
ohiodarter
Hangin' Around


Joined: Nov 06, 2002
Posts: 32

PostPosted: Fri Mar 30, 2007 10:50 pm Reply with quote Back to top

Quick question regarding WYSIWYG. When I edit a block, say a center block - in the editor, I can clearly see that the font size is X-Large and it is Comic Sans. Yet when I save it and go back to the Home page, it is tiny again. What am I missing as far as making What I See What I REALLY get. Thanks in advance for any help on this.
Mike
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 6:49 am Reply with quote Back to top

This is strange, but I can confirm what you are saying. I just went in and edited the first article on my test site for RN2.10, fkelly.org. I selected the text (I was testing the ampersand issue with that article) and changed it to extra large, comic sans. Saved it. Went to the home page and it was still "normal" sized. Went back into the editor and looked at source. It does have the font size and type tags around the text but for some reason it's not appearing on the home page. I'll keep looking but we may need Kguske to help with this ... though actually the editor seems to be doing what it's supposed to, it's the presentation that's not working properly.
View user's profile Send private message Visit poster's website
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 7:08 am Reply with quote Back to top

Wow. I looked further, looked at view source and in the source the text is wrapped inside the appropriate font code. That font code is in turn wrapped inside a couple of divs one of which has the class=content. I was thinking maybe the class was overriding the font so I saved the source html file and went in and edited it and took the divs out of that area. Still no joy, the comic sans isn't showing. I even edited the text a bit to be sure I wasn't seeing a cache artifact and the new text is there. Humm ... I wonder if that font might be missing from our systems. I'll be back.
View user's profile Send private message Visit poster's website
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 7:19 am Reply with quote Back to top

No, missing font doesn't have anything to do with it. I can change the font color and it works fine. I even tried wrapping the text in a h1 tag and, though the tag is there it doesn't affect the size of the font. Very odd. I even tried out IE to see if it was a browser specific issue and the same problem occurs. I also edited the opening message on my test site and the same problem occurs there as in news.

It's hard to understand how this could have slipped thru all the testing we did so I'm still looking for a different explanation.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sat Mar 31, 2007 8:17 am Reply with quote Back to top

Without looking at it, I'd say fkelly was on the right track regarding CSS overriding the font.
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 12:37 pm Reply with quote Back to top

I'm not sure Kguske. Cause when I saved my page as html and went in an manually edited the styles out the font size still didn't work. And, looking up font size thru Google shows that there are a fair number of experts saying we shouldn't be using that anyway.

Manually I can get most of the font attributes to work, like color, but when I put size in it has no effect. Very strange. Maybe I will try a "pure" html document because even taking the "immediately adjacent" styles out might leave some others still in effect.
View user's profile Send private message Visit poster's website
ohiodarter
Hangin' Around


Joined: Nov 06, 2002
Posts: 32

PostPosted: Sat Mar 31, 2007 1:03 pm Reply with quote Back to top

I am starting to lean towards the CSS override as well. I have two new sites that have different themes. One of them works for font sizing and one doesn't. I'm going to compare the CSS files of each and report back here on any differences.
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 1:10 pm Reply with quote Back to top

I think the problem is that we put font sizes in style.css, so for instance we have:

font {font-family: Verdana,Helvetica,sans-serif; font-size: 10px}

in the style.css for fisubice. I suspect this is overriding any explicitly coded size.

In fact, I just edited style.css for fisubice to eliminate the size from the font class in the style file and uploaded it to fkelly.org and the size attributes in the font tag now work.

I don't know what the other implications of removing this from the style.css would be, but it does seem to fix this one problem.
View user's profile Send private message Visit poster's website
ohiodarter
Hangin' Around


Joined: Nov 06, 2002
Posts: 32

PostPosted: Sat Mar 31, 2007 2:52 pm Reply with quote Back to top

I copied over the css file from a theme that allowed me to use the different font sizes and it worked flawlessly. Didn't have the time to compare the code, but I can guarantee that it is indeed the css file overriding nuke...
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sat Mar 31, 2007 3:31 pm Reply with quote Back to top

I have made just the one change I mentioned, removing the font-size from the style.css in fisubice and tested on fkelly.org. It seems to solve the problem. Whether the font-size should be in some other styles there is an open question to me.

Before:

Code:
font {font-family: Verdana,Helvetica,sans-serif; font-size: 10px}


after:

Code:
font {font-family: Verdana,Helvetica,sans-serif}


I looked at the Nukenews theme too and tried the same fix out. The font size was not showing up (in other words being overridden by the style) before I made the change and it is showing up after.

We probably need to make the same change to other themes but I'd want Raven and/or Montego and others to look at this first and see if they see any problems and/or if we should remove the font-size from td body p etc.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sun Apr 01, 2007 6:20 am Reply with quote Back to top

I was going to suggest removing references to the css file, or temporarily making it empty. But it seems you've confirmed that's where the issue is.

As for removing the font size from the CSS, another option is to create additional classes with the appropriate font size and specify those in the content, rather than overriding the font size.
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Sun Apr 01, 2007 6:57 am Reply with quote Back to top

The only thing that concerns me is if font requires the use of an explicit size in CSS to validate - I'll have to check on that.

Creating a new font class would seem to be the best option as you said Smile
View user's profile Send private message Send e-mail Visit poster's website
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Sun Apr 01, 2007 7:09 am Reply with quote Back to top

Let us know Guardian. Kguske, yes, that would work but I was trying to keep the "size" of the fix down. If we can fix this problem by just removing one attribute from one class in each style.css where it occurs that would seem to me to be desirable short term. Users would need very little PHP expertise to make those changes themselves and the probability of fouling up "other things" would be minimized.

Many references on the web state that we shouldn't be sticking in font-size="whatever" tags outside of classes in our documents anyway. But straightening that out is probably something we should build into the next release. I think that right now the wysiwyg editor puts such codes in when a user choses a font size but I'd need to double check to be sure.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Apr 01, 2007 10:13 am Reply with quote Back to top

Maybe the WYSIWYG editor should be configured to wrap text in its own classes for size and colors (e.g. span tags). Font tags are evil, according to the latest dogma. Wink

Then we could add a wysiwyg.css link to header.php.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Mon Apr 02, 2007 2:41 pm Reply with quote Back to top

Danger, Will Robinson!

That would be a good deal of work and it would likely cause conflicts with most themes...
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Mon Apr 02, 2007 5:29 pm Reply with quote Back to top

And removing font sizes from all themes isn't a lot of work? Wink

I don't know how hard it is to make the editor spit out span tags with classes instead of font tags...but is it that bad?

And then the classes in wysiwyg.css would be suitably named so as to not conflict with existing themes.

E.g.

span.wysiwyg-large { font-size: large; }
span.wysiwyg-xlarge {font-size: x-large; }

I'm just rambling but that is my idea. It's using CSS they way it was supposed to be IMHO.
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 3186
Location: near Albany NY

PostPosted: Mon Apr 02, 2007 5:38 pm Reply with quote Back to top

I could remove font sizes from all themes style.css files in ... oh ... probably a half hour and have them back to the svn in that time too. We would want to run thru and test them all that way but I don't think there would be complications. Famous last words (:

However, users who have the problem bothering them probably have enough information at this point to make their own adjustments (a.k.a. hacks). There are really two issues in my mind at this point:

1. Why did we stick font-size into those classes in the css in the first place? And is that a good idea? They go beyond just the "font" class to a bunch of others. I'm not a css expert by any means but that just doesn't look like a good idea to me and it permeates the themes.

2. How difficult is it to adjust the editor as Gremmie suggested and is that the best approach.

We are relatively early in a new release cycle and coming up with the "best" solution at this point takes priority. I think.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Mon Apr 02, 2007 5:42 pm Reply with quote Back to top

If the wysiwyg editor continues to spit out font tags, then folks with custom themes are likely going to run into the same problem. If the wysiwyg editor emits span tags with classes, and the classes have unique enough names, I can't imagine their theme being able to override the editor, and it will work for everyone.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Mon Apr 02, 2007 6:11 pm Reply with quote Back to top

If you use FireFox, you can trying this setting in includes/FCKeditor/fckconfig.js:
Code:
FCKConfig.GeckoUseSPAN   = true ;
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Mon Apr 02, 2007 6:39 pm Reply with quote Back to top

Hopefully the editor is smart enough to not try and SPAN across a block tag... can you spell compliance issue? Sad

(My God, I sound more and more like Steph with each passing day... )
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Mon Apr 02, 2007 7:07 pm Reply with quote Back to top

The problem with that setting is that it gives different results for IE and FF.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum