[2.0.6] Font Face BBCode

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
16
52%
Very Good
11
35%
Good
3
10%
Fair
0
No votes
Poor
1
3%
 
Total votes: 31

mguffey5
Registered User
Posts: 30
Joined: Fri Sep 24, 2004 2:21 am
Location: Maryland
Contact:

Post by mguffey5 » Sat Sep 25, 2004 3:48 pm

Herbalite wrote: Do you have an URL where I can check it out for myself, maybe I can see something by looking at the HTML code phpBB is generating?


http://www.theclaydawgs.com/phpbb/

Herbalite
Registered User
Posts: 205
Joined: Wed Apr 10, 2002 8:11 am
Location: South East Asia

Post by Herbalite » Sat Sep 25, 2004 11:53 pm

mguffey5 wrote:
Herbalite wrote:Do you have an URL where I can check it out for myself, maybe I can see something by looking at the HTML code phpBB is generating?


http://www.theclaydawgs.com/phpbb/

The font markup is completely missing. Together with the fact that you are not using the standard template, most likely you need to add the following for all your templates installed.

#
#-----[ OPEN ]------------------------------------------
# You need to do this for all of your installed template styles
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]------------------------------------------
# You need to do this for all of your installed template styles
<!-- BEGIN size_close --></span><!-- END size_close -->

#
#-----[ AFTER, ADD ]------------------------------------------
# You need to do this for all of your installed template styles

<!-- BEGIN font_open --><span style="font-family: {FONT}"><!-- END font_open -->
<!-- BEGIN font_close --></span><!-- END font_close -->
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

mguffey5
Registered User
Posts: 30
Joined: Fri Sep 24, 2004 2:21 am
Location: Maryland
Contact:

Post by mguffey5 » Sun Sep 26, 2004 12:26 am

Herbalite wrote:
mguffey5 wrote:
Herbalite wrote:Do you have an URL where I can check it out for myself, maybe I can see something by looking at the HTML code phpBB is generating?


http://www.theclaydawgs.com/phpbb/

The font markup is completely missing. Together with the fact that you are not using the standard template, most likely you need to add the following for all your templates installed.

#
#-----[ OPEN ]------------------------------------------
# You need to do this for all of your installed template styles
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]------------------------------------------
# You need to do this for all of your installed template styles
<!-- BEGIN size_close --></span><!-- END size_close -->

#
#-----[ AFTER, ADD ]------------------------------------------
# You need to do this for all of your installed template styles

<!-- BEGIN font_open --><span style="font-family: {FONT}"><!-- END font_open -->
<!-- BEGIN font_close --></span><!-- END font_close -->


Thanks, That wored, I just hadn't installed this code on all templates I've installed. - Thanks Again I'm a very happy person. :)

rr2000
Registered User
Posts: 39
Joined: Fri Oct 03, 2003 10:52 am

font face-ing subject

Post by rr2000 » Tue Oct 05, 2004 9:55 am

It works for the message body. Will it work in 'Subject'? If yes, how?

Herbalite
Registered User
Posts: 205
Joined: Wed Apr 10, 2002 8:11 am
Location: South East Asia

Re: font face-ing subject

Post by Herbalite » Tue Oct 05, 2004 10:21 am

rr2000 wrote: It works for the message body. Will it work in 'Subject'? If yes, how?
It won't work in the subject area, as all other BBCodes don't work either in the subject.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

rr2000
Registered User
Posts: 39
Joined: Fri Oct 03, 2003 10:52 am

Post by rr2000 » Tue Oct 19, 2004 3:49 pm

btw, thanks for this wonderful mod. I have some Q's

1. My font list is too long. It makes the select box too wide. Is it possible to add something like '...' in the midle and make it short. One way is:

Code: Select all

<option value="loooooong list">short list
2. Anyway to display the font face in the textarea? For unicode, it works.

Herbalite
Registered User
Posts: 205
Joined: Wed Apr 10, 2002 8:11 am
Location: South East Asia

Post by Herbalite » Fri Oct 29, 2004 1:23 am

rr2000 wrote: btw, thanks for this wonderful mod. I have some Q's

1. My font list is too long. It makes the select box too wide. Is it possible to add something like '...' in the midle and make it short. One way is:

Code: Select all

<option value="loooooong list">short list
2. Anyway to display the font face in the textarea? For unicode, it works.

I am working on an upgrade to this MOD, which will take care of that.

For the moment you could do the following for to your question one

Assuming you have installed the MOD already

#
#-----[ OPEN ]------------------------------------------
# You need to do this for all of your installed template styles
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]------------------------------------------
#

&nbsp;<select name="addbbcodefontface" onchange="bbfontstyle('[font=' + this.form.addbbcodefontface.options[this.form.addbbcodefontface.selectedIndex].value + ']', '[/font]');this.selectedIndex=0;" onmouseover="helpline('n')" accesskey="n">
<option value="0" class="genmed" selected="selected">{L_FONT_STYLE}</option>
<!-- BEGIN font_styles -->
<option value="{font_styles.L_FONTNAME}" class="genmed" style="font-family:{font_styles.L_FONTNAME};">{font_styles.L_FONTNAME}</option>
<!-- END font_styles -->
</select>


#
#-----[ REPLACE WITH ]------------------------------------------
#

&nbsp;<select name="addbbcodefontface" onchange="bbfontstyle('[font=' + this.form.addbbcodefontface.options[this.form.addbbcodefontface.selectedIndex].value + ']', '[/font]');this.selectedIndex=0;" onmouseover="helpline('n')" accesskey="n" style="width:150px;">
<option value="0" class="genmed" selected="selected">{L_FONT_STYLE}</option>
<!-- BEGIN font_styles -->
<option value="{font_styles.L_FONTNAME}" class="genmed" style="font-family:{font_styles.L_FONTNAME};">{font_styles.L_FONTNAME}</option>
<!-- END font_styles -->
</select>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

The darkred markup code has been added. You can change the width of the select box to your liking.

As to your 2nd question. Not at this time, it would require an entire redesigning of the posting box, which would encompass all bbcodes. That's another MOD to do. A BBCode WYSIWYG editor.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

MightyScoop
Registered User
Posts: 7
Joined: Fri Nov 05, 2004 11:27 pm

Post by MightyScoop » Fri Nov 05, 2004 11:39 pm

First post. Hi guys.

Sorry if this is in the wrong place, but I didn't wanna start an entirely new thread for it.

I was using THIS font face mod but came across a problem that someone was having here. Some of the fonts worked, and some didn't. It was mentioned that maybe it was because of the spaces. Anyway, i noticed a couple of tiny errors in the hack i used and corrected them.

Code: Select all

Find

// [face] and [/face] for setting text face
	$text = preg_replace("#\[face=(Arial|Arial Black|Sans MS|Corier New|Franklin Gothic Medium|Georgia|Impact|Lucida Console|Lucida Sans Unicode|Miriam|Symbol|Tahoma|Times New Roman|Trebuchet MS|Verdana|Webdings)\](.*?)\[/face\]#si", "[face=\\1:$uid]\\2[/face:$uid]", $text);

replace with

// [face] and [/face] for setting text face
	$text = preg_replace("#\[face=(Arial|Arial Black|Sans MS|Courier New|Franklin Gothic Medium|Georgia|Impact|Lucida Console|Lucida Sans Unicode|Miriam|Symbol|Tahoma|Times New Roman|Trebuchet MS|Verdana|Webdings)\](.*?)\[/face\]#si", "[face=\\1:$uid]\\2[/face:$uid]", $text);

(The change is the spelling of COURIER)

open language/lang_english/lang_main.php

Find

$lang['font_Comic_Sans_MS'] = 'Comic Sans MS';

Replace with

$lang['font_Comic_Sans_MS'] = 'Sans MS';
That should do it...

/Freya
Registered User
Posts: 3
Joined: Thu Jan 06, 2005 8:36 pm
Location: Belgium
Contact:

Post by /Freya » Thu Jan 06, 2005 8:45 pm

This worked perfect for me, really easy to install too. Only the fonts that you can choose from aren't much, maybe the list should be a bit bigger so that people don't have to add all the fonts theirself?

User avatar
JaceMan
Registered User
Posts: 20
Joined: Sun Oct 24, 2004 5:04 pm

Post by JaceMan » Sat Jan 15, 2005 9:11 am

The mod is installed and it seems like I can change the fonts by manually typing in the BBcode, but it did not generate a drop down list in any of my templates. It also does not appear to have edited my faq.

phpbb 2.0.11

Herbalite
Registered User
Posts: 205
Joined: Wed Apr 10, 2002 8:11 am
Location: South East Asia

Post by Herbalite » Sat Jan 15, 2005 9:46 am

JaceMan wrote: The mod is installed and it seems like I can change the fonts by manually typing in the BBcode, but it did not generate a drop down list in any of my templates. It also does not appear to have edited my faq.

phpbb 2.0.11
Did you apply all of the template realted changes for all of your templates?
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

User avatar
JaceMan
Registered User
Posts: 20
Joined: Sun Oct 24, 2004 5:04 pm

Post by JaceMan » Sat Jan 15, 2005 8:58 pm

Yes, I did... checked, double checked, and triple checked. I elected to use a heavily modified version of BBcode Box that I made instead as I could never figure out where I slipped up.

cellfx
Registered User
Posts: 5
Joined: Sun May 16, 2004 11:37 pm

extra space between letters in each word

Post by cellfx » Sun Mar 27, 2005 7:38 am

Hi I just did an update to 2.01.3 and added this mod at www.cellularfx.ca now all of the posts each have the words spaced out long style. What I mean is that in the forum posts each word has the letters s p a c e d o u t . This is making the postings very difficult to read.

Do you have any ideas of what may have caused this?

Thanks in advance for any assistance anyone can give.

Herbalite
Registered User
Posts: 205
Joined: Wed Apr 10, 2002 8:11 am
Location: South East Asia

Post by Herbalite » Sun Mar 27, 2005 9:36 am

For some reason between all characters there is a blank followed by &nbsp; inserted. But I am at loss how my MOD could have caused this.

However, I tried to subscribe to your forum to try out some things and couldn't do so. I got the following error while trying to subscribe

SQL Error : 1054 Unknown column 'user_wordwrap' in 'field list'

Now that has nothing at all to do with my MOD. All I can suggest is that you check all the MOD instructions. Once I can subscribe, then I might be able to help you furthermore.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

cellfx
Registered User
Posts: 5
Joined: Sun May 16, 2004 11:37 pm

Many Thank you's for finding my problem, missing field

Post by cellfx » Mon Mar 28, 2005 7:20 am

So sorry to be a bother I used easymod to do an install of word wrapping mod and I must have missed that it did not do the sql update.

Now that the field has been added to the database your mod works like a charm.

Nice work, Your mod ROCKS!

Post Reply

Return to “[2.0.x] MOD Database Cleanup”