php forum
php mysql forum
php mysql smarty
 
Topic Options
#108688 - 09/03/01 02:39 AM Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
I want to work on replacing the redundant font tags in the templates with some basic css that reads the styles set in the style template and uses those values for the fonts.

Here's what I've done so far:

In public_common.pl, I've set the css to look like this:

Code:
code:


I've then went through and replaced all :
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}">
with
<font class="ts">

There are >300 instances of just this one set of tags in the templates - bandwidth and download speed should improve...

My problem is that the pages do not seem to be picking up on these styles, as the text sizes are bigger than specified... ideas? Is it because the ubb uses size="2" instead of pixels or x-small?

I am using IE6 to view the results...
_________________________
- Allen wavey
- What Drives You?

Top
#108689 - 09/03/01 02:07 PM Re: Basic CSS and the UBB
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
You can use pixels (like 80pt), percents (like 80%) or x-small/etc..

[ September 03, 2001: Message edited by: LK ]
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#108690 - 09/03/01 05:44 PM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
and there lies the rub, since ubb uses 1, 2, and 3 everywhere, it's not gonna be a matter of just reading the already set values in the styles...

ah well... it's just one extra step... should make a nice difference in download speed and bandwidth improvement. I'll add this as part of the xhtml templates or seperately but with using xhtml templates as the base smile
_________________________
- Allen wavey
- What Drives You?

Top
#108691 - 09/03/01 05:48 PM Re: Basic CSS and the UBB
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
BTW, I don't think Xpts are CSS v1.0 validated.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#108692 - 09/03/01 07:26 PM Re: Basic CSS and the UBB
Matt Jacob Offline
Master Hacker

Registered: 09/13/00
Posts: 4389
Loc: Tucson, Arizona
Quote:
quote:


80pt would be 80 points, not 80 pixels. wink But in response to Allen's initial question, CSS and HTML font sizes are not the same. CSS needs the number to be accompanied by a unit, and 10pt is roughly a 2 in HTML sizing.

Top
#108693 - 09/03/01 11:57 PM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
hmmmm...

thanks, both of ye... that explains the ugly I was seeing smile

Close?:
1 == 8pt == xx-small
2 == 10pt == x-small
3 == 12pt == small

Gonna read a little more at ALA, they had some weird stuff going on to make it appear the same in most all browsers...


I'll distribute the templates with the css manually set, maybe in the future include a control panel add-on that allows you to set it from the cp.
_________________________
- Allen wavey
- What Drives You?

Top
#108694 - 09/04/01 12:15 AM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
more... can I mix css class with other tags?

example... I have a a good number of fonts set that are exactly alike except they give a different text color... can I do something like:

<font color="vars_style{TableStripColor}" class="ts">

Or do I need a different css class set for each font tag that uses a different color?
_________________________
- Allen wavey
- What Drives You?

Top
#108695 - 09/04/01 05:10 AM Re: Basic CSS and the UBB
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
without that COLOR part wink

Also, I think STRICT means <div class="ts">, if you want it to be validated.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#108696 - 04/30/02 05:56 PM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
I didn't give up on this (and you thought I was taking a long time on the portal wink ) - I started css'ing the templates for 6.3 and am seeing a ~10% savings in file size which should translate into a significant gain in bandwidth savings. They should be ready when 6.3 goes final smile
_________________________
- Allen wavey
- What Drives You?

Top
#108697 - 04/30/02 06:50 PM Re: Basic CSS and the UBB
Matt Jacob Offline
Master Hacker

Registered: 09/13/00
Posts: 4389
Loc: Tucson, Arizona
Can you post the CSS you're currently working with? I hope it's not the same as what you posted back in the first post of this thread... smile

Top
#108698 - 04/30/02 07:12 PM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
hehe smile

check the thread in the dev forum for more details. will post it publicly as there is more to post smile
_________________________
- Allen wavey
- What Drives You?

Top
#108699 - 05/01/02 03:09 AM Re: Basic CSS and the UBB
PF Offline
Member

Registered: 04/06/02
Posts: 97
Loc: the UK
Not using 6.3, but I did the same thing for UBB6.05 a couple of weeks ago.

Difference being is that I've made it an external stylesheet, and it replaces UBB's "Templates", so you configure everything in the stylesheet.

Anyway, our stylesheet looks like this

[code][/code]The whole template updating took me probably around 5 hours in total to modify.
I would make a hack out of it, but it does require a lot of intelligence when installing other hacks, to make sure they comply with the stylesheet.

Allen, If you want, I can email you our highly modified templates, so you can use them to compare with, to make sure you get all the sections updated.

As far as I can tell i've covered all areas with it smile

Cheers

Ben/PF
_________________________
FFAddicts Forums - It's More Than A Game! It's A Religion!!

Top
#108700 - 05/01/02 01:29 PM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
thanks, it looks good smile

I'll be using 6.3's templates, which are a good bit different from 6.05's in some places, not so bad in others. I'll also be using ubb.threads' css naming scheme with a bit simpler .css file than yours - it'll help tremendously for those switching from one to another and it's one a lot of people (including me wink ) are used to, I know what's where smile

Once I start posting the template files publicly, I would value your input tho, when you have time smile
_________________________
- Allen wavey
- What Drives You?

Top
#108701 - 05/09/02 02:19 AM Re: Basic CSS and the UBB
jordo Offline
Moderator / Developer

Registered: 08/05/00
Posts: 830
</font><blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr /><font size="2" face="Verdana, Helvetica, sans-serif">Originally posted by AllenAyres:
more... can I mix css class with other tags?

example... I have a a good number of fonts set that are exactly alike except they give a different text color... can I do something like:

<font color="vars_style{TableStripColor}" class="ts">

Or do I need a different css class set for each font tag that uses a different color?
</font><hr /></blockquote><font size="2" face="Verdana, Helvetica, sans-serif">in case you never got this answered, afaik the proper way to go about overriding is like so:

<font style="color: vars_style{TableStripColor}" class="ts">

but then i was always under the impression that if you are setting font styles with the td css definitions you do not need any <font> tag at all...
_________________________
jordo

Top
#108702 - 05/09/02 06:29 PM Re: Basic CSS and the UBB
Matt Jacob Offline
Master Hacker

Registered: 09/13/00
Posts: 4389
Loc: Tucson, Arizona
jordo: that code looks good; glad to see you know about how the "cascade" in cascading style sheets works. smile

Allen: use <span> tags instead for doing that.

Top
#108703 - 05/09/02 10:21 PM Re: Basic CSS and the UBB
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
thanks both of you smile
_________________________
- Allen wavey
- What Drives You?

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks