Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 



       myfreeforum.org Forum Index -> PhpBB3 General Support
Vicky

Fonts

http://drewschofield.myfreeforum.org

Several members have said that they can not get their font to change despite me adding the correct BBCode.

They are only trying to use Comic Sans MS but it is just showing the normal forum font.
admin (no pm's please)

When you compose a post it will only show a normal font.

If you are saying someone has posted Comic Sans and it is not showing then you need to give us a link where we can see it.
Vicky

Here is a test I carried out

http://drewschofield.myfreeforum.org/viewtopic.php?f=276&t=4041
Zudane

Well, I do see this:

Code:
<font face="Comic Sans MS">Trying to post Comic Sans</font>


But I forget, is that the right way to style it?
admin (no pm's please)

that does show as:

<font face="Comic Sans MS">Trying to post Comic Sans</font>

and has changed the font.
Vicky

I've tried it in both mozilla and internet explorer and this is what i see

admin (no pm's please)

Trying to post Comic Sans

Is what we get here   Something in the css of your site must be overriding.
Vicky

Is there anyway to solve it?
Zudane

From the css:

font, th, td, p {
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:12px;
}

Wouldn't inline styling override that?
Vicky

Zudane wrote:
From the css:

font, th, td, p {
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:12px;
}

Wouldn't inline styling override that?


Afraid I don't know the answer to that
Nick(NR)

may I suggest altering the bbcode to:

Code:
<span style="font-family:'Comic Sans MS'">Hello</span>


obviously swapping out the hello bit
Vicky

Nick(NR) wrote:
may I suggest altering the bbcode to:

Code:
<span style="font-family:'Comic Sans MS'">Hello</span>


obviously swapping out the hello bit


So use that instead of this

Code:
<font face="Comic Sans MS">Trying to post Comic Sans</font>
Zudane

Yes vicky.

Basic reasoning: Your CSS is telling the pages to load any font styles as a certain style, the one I showed above.

If you set it as a span and do the in-line styling like Nick showed, then you are not using the font tag, so the CSS won't be overriding it.

So instead of the font tag as the bbcode, use the span tag.  Should give the right effect.

note that any ones you've already used the font style bbcode on will need to be edited and resubmitted, then they should work correctly.
admin (no pm's please)

Nice one guys, so css overrides the font tag, so you need to use a css style in a span. I kind of knew the font tag was depreciated, but did not really know the implications.
Zudane

deprecated, but still supported in most major browsers, since older sites still use it.

I still remember a lot of old html, so I'm learning some of the newer stuff, like self-closing tags, IE: <br /> instead of <br>.  And learning some tags can't be self-closed, like script tags.
Vicky

I've tried using the code suggested

Code:
<span style="font-family:'Comic Sans MS'">Hello</span>


Obviously chaged slightly so it shows as

Code:
span style="font-family: {SIMPLETEXT1};">{TEXT}</span>".


I can't insert this instead of the BBCode as it says it's not valid so I've inserted it in the HTML replacement box and this is what I get - http://drewschofield.myfreeforum.org/viewtopic.php?f=276&t=4041

Wish I knew what I was doing wrong?
Vicky

Zudane wrote:
From the css:

font, th, td, p {
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:12px;
}

Wouldn't inline styling override that?


One of my moderators has asked couldn't I just amend the css or take out what is message up the font code?
admin (no pm's please)

Why not go the span route? Much better than messing around with the forum CSS, and future proof.
Vicky

Oddly enough I've just deleted and adding again the BBCode from

http://www.phpbb.com/kb/article/adding-custom-bbcodes-in-phpbb3

and everything seems to be running fine - http://drewschofield.myfreeforum.org/viewtopic.php?f=276&t=4081

I wondering if there was some error as I had to re-run my conversion to version 3 but the BBCodes remained from the earlier conversion?
Nick(NR)

admin (no pm's please) wrote:
Nice one guys, so css overrides the font tag, so you need to use a css style in a span. I kind of knew the font tag was depreciated, but did not really know the implications.


I can't help being this good you know

admin (no pm's please) wrote:
Why not go the span route? Much better than messing around with the forum CSS, and future proof.


Future proof indeed and much simpler, as I have a work test post here: http://portalogy.myfabforum.org/viewtopic.php?f=4&t=24

Right here's the seeds you needs:

BBCode usage:
[Comic_Sans_MS]{TEXT}[/Comic_Sans_MS]

HTML replacement:
<span style="font-family:'Comic Sans MS'">{TEXT}</span>

Help line:
a pre-defined font called Comic sans MS

and obviously tick yes to show it when posting

One word of warning I've noticed with this, is that people will have to bbcode color the text then comic sans ms bbcode it, because if you color it after comic sans, the color will not take as it's being placed outside the span, put it inside, it will color.

Enjoys
Zudane

If that was the code you first used exactly, then you missed a < bracket - making it invalid.

And Nick, you forgot to disable html, the </span> tag was ending a span somewhere and not showing up.

And lastly, you COULD amend the css to add in a new class, but really that's a lot more work than the span option.
Nick(NR)

yeh, sry shoulda disabled html in my post and why css, it's not even needed for this?
Zudane

I just said that because it's possible to be done like that.  Not the easiest way, but still possible.
Nick(NR)

Zudane wrote:
I just said that because it's possible to be done like that.  Not the easiest way, but still possible.


Fair enough, I just posted the most simple way to acheive this without confuzzzing people who want to use it, check my test post link above and you'll see what I mean.

       myfreeforum.org Forum Index -> PhpBB3 General Support
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum