[2.0.6] Font Face BBCode

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

Rating:

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

taheri
Registered User
Posts: 10
Joined: Tue Jan 13, 2004 7:07 pm

Post by taheri » Thu Jan 15, 2004 2:09 pm

I've installed the mod, but it doesn't work. I'm sure I've done it in accordance to the instructions, but I have no drop down list and tryping in the code to change the font doesn't work either.

What is wrong?

taheri
Registered User
Posts: 10
Joined: Tue Jan 13, 2004 7:07 pm

Post by taheri » Thu Jan 15, 2004 2:11 pm

Also, the last requirement in the mod, it states:

// Font face start
$faq[] = array("How to change the font face used","To alter the font face of your text, the following tag can be used. Keep

in mind that how the output appears will depend on the viewers browser, system and that the font in question is installed:

<ul><li>Changing the font face of text is achieved by wrapping it in <b>[font=][/font]</b>. You need to specifiy a

recognized font face. (Safe font face descriptions are the generic font face names provided with CSS (Cascading Style

Sheets). E.g. sans-serif, serif, monospace, cursive, fantasy). You can use comma seperated lists of font faces too. E.g.

arial,geneva,helvetica,sans-serif. For example to create text with monospace font face you could use:<br /><br /><b>[font=

monospace]Monospaced Text[/font]</b>.<br /><br />This will output <span style='font-family:monospace'>Monospaced text</

span></li></ul>");


Where exactly do I put it after $faq[] = array("How to change the text colour or size", "?

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

Post by Herbalite » Thu Jan 15, 2004 2:22 pm

taheri wrote: I've installed the mod, but it doesn't work. I'm sure I've done it in accordance to the instructions, but I have no drop down list and tryping in the code to change the font doesn't work either.

What is wrong?
Check out the templates (*.tpl files) if the code is really there.
Last edited by Herbalite on Thu Jan 15, 2004 2:29 pm, edited 1 time in total.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

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

Post by Herbalite » Thu Jan 15, 2004 2:28 pm

taheri wrote: .....

Where exactly do I put it after $faq[] = array("How to change the text colour or size", "?
If you have "word wrap" off in your editor, it should be easy to see where is belongs. It should start on a seperate line. If you cannot turn of word wrap then it is right after the "); of the line $faq[] = array("How to change the text colour or size", " .
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

[ego]Nova
Registered User
Posts: 21
Joined: Thu Jan 08, 2004 9:18 pm

Post by [ego]Nova » Thu Jan 15, 2004 6:10 pm

well in the link i was given it has the whole copy to open and stuff well usally a txt file is included to tell u this stuff but this mod doesnt

ginaM
Registered User
Posts: 6
Joined: Tue Jan 13, 2004 2:28 am

Post by ginaM » Thu Jan 15, 2004 6:48 pm

1. Will it recognize any font I add, if I use the standard Windows fonts? Please see this link: http://www.kayskreations.net/fonts/fonttb.html Does anyone have a better link of font names?

2. Do I only have to add them in the language/lang_english/lang_main.php?
I saw a place in the admin panel that had all the current fonts listed, do I also add them there with commas seperating their name? I found out I have a limited amount of space here.

Thank you!! Great Mod! I suprised my forum with this last night.

Gina

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

Post by Herbalite » Thu Jan 15, 2004 11:49 pm

[ego]Nova wrote: well in the link i was given it has the whole copy to open and stuff well usally a txt file is included to tell u this stuff but this mod doesnt
There is no extra file that you need to copy, you need to modify existing files from phpBB only.

Those files are mentioned in the MOD And in that it conforms to the MOD standard.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

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

Post by Herbalite » Fri Jan 16, 2004 12:06 am

ginaM wrote: 1. Will it recognize any font I add, if I use the standard Windows fonts? Please see this link: http://www.kayskreations.net/fonts/fonttb.html Does anyone have a better link of font names?

2. Do I only have to add them in the language/lang_english/lang_main.php?
I saw a place in the admin panel that had all the current fonts listed, do I also add them there with commas seperating their name? I found out I have a limited amount of space here.

Thank you!! Great Mod! I suprised my forum with this last night.

Gina

1) Windows will recognize the standard fonts that come with it (unless they were removed). The fun thing is, if you know the majority of your people uses Windows, then you can also provide WingDings/WebDings fonts, giving some extra icons and emoticons.

However if you have users on other machines then they might not have the same font installed.

2) You can add any fonts in language/lang_english/lang_main.php. That is enough if your board uses English only. If you have other language packs installed you'll need to extend the same list into other language packs as well.

The reason I made it this way, is because of non-western fonts. For example Chinese fonts on native Chinese "whatever your" OS, do use Chinese names to identify some of the fonts. English font names will be recognized as well, and it look much prettier, than the English Character provided in Chinese Fonts.

They should then appear in the drop-down list.

3) Also, if you check out the BBCode faq after installing this MOD, then you'll notice that you can enter any font name manually too. That is you just type something like:

[font=Lucida Console]On a phpBB with this MOD installed and using Windows (or Linux with WINE and MSIE installed) you'll see "Lucida Console"[/font]

So you can run a quick test which fonts your system will display.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

ginaM
Registered User
Posts: 6
Joined: Tue Jan 13, 2004 2:28 am

Post by ginaM » Fri Jan 16, 2004 3:19 pm

Thank you for taking the time to post back to me Herbalite. I added more fonts last night and everything worked just like you said it would. I appreciate it.

My forum and I thank you for this quick and easy Mod too. They love to play with new things so this made them happy. I am taking font requests now. I am so glad I switched over to my own site and use phpbb now.

Gina

Charles Waters
Registered User
Posts: 10
Joined: Sat Jan 24, 2004 5:37 pm
Location: Torrance, California
Contact:

WORKED

Post by Charles Waters » Sat Jan 24, 2004 11:45 pm

Installed after the following mods were installed:

Signatures control 1.0.0 RC3
Bottom aligned signature 1.0.2
Abnormal posts widening fix 1.0.1
Forum Clock 1.0.2
Admin Userlist 1.6.1 wGEric 2.0.6 subSilver english details
Topic display order
QBar/QMenu 1.0.1
Profile Control Panel 2.0.0-1
Post Icons : icons for topics and posts - part 1 1.0.1
Last topic_from - Profile Control Panel 1.0.2
Keep unread topic - part 5 : db storage
Keep unread topic - Part 4 - Categories hierarchy 1.0.0
Keep unread topic - Part 3 - Topic list mod extens 1.0.0
Keep unread topic - part 1 - common part to all se 1.0.0
Announces Suite - Part 2 (without Split topic v 2. 3.0.2)
Split topic type 2.0.1
Simply Merge Threads 1.0.1
Categories hierarchy - part 2
Categories hierarchy - part 1
EasyMOD 0.0.11a Nuttzy 2.0.6
Site Description 1.1.0
Stop Author View Increase 1.0.1
Fading Links 1.0.2

Just FYI to help!
If you need anything else, just email me!

sysop@bbs.westcoastfiero.com

User avatar
filippo
Registered User
Posts: 29
Joined: Thu Feb 19, 2004 9:08 am

Error message

Post by filippo » Fri Feb 20, 2004 3:03 pm

I've installed the mod twice and twice I had this error message at the top of the page when i read the post :

Code: Select all

Parse error: parse error, unexpected '<' in ...\includes\bbcode.php(63) : eval()'d code on line 56
Do you have an idea of what's wrong ?

I installed too :

The calendar
Profile Configuration Panel

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

Re: Error message

Post by Herbalite » Sat Feb 21, 2004 12:50 am

filippo wrote: I've installed the mod twice and twice I had this error message at the top of the page when i read the post :

Code: Select all

Parse error: parse error, unexpected '<' in ...\includes\bbcode.php(63) : eval()'d code on line 56
Do you have an idea of what's wrong ?

I installed too :

The calendar
Profile Configuration Panel

Please post the code around line 56 in /includes/bbcode.php
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

User avatar
filippo
Registered User
Posts: 29
Joined: Thu Feb 19, 2004 9:08 am

include/bbcode.php

Post by filippo » Sat Feb 21, 2004 10:48 am

Here is the code from line 45 to line 66 :

Code: Select all

function load_bbcode_template()
{
	global $template;
	$tpl_filename = $template->make_filename('bbcode.tpl');
	$tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename));

	// replace \ with \\ and then ' with \'.
	$tpl = str_replace('\\', '\\\\', $tpl);
	$tpl  = str_replace('\'', '\\\'', $tpl);

	// strip newlines.
	$tpl  = str_replace("\n", '', $tpl);

	// Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
	$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl);

	$bbcode_tpls = array();

	eval($tpl);

	return $bbcode_tpls;
}
Thanks

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

Re: include/bbcode.php

Post by Herbalite » Sat Feb 21, 2004 4:58 pm

filippo wrote: Here is the code from line 45 to line 66 :

Thanks
That looks fine, seems the problem is in the bbcode.tpl then.

Check that file carefully, for all the entries for this MOD.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

User avatar
filippo
Registered User
Posts: 29
Joined: Thu Feb 19, 2004 9:08 am

Post by filippo » Sat Feb 21, 2004 7:37 pm

Thank you.
Since it's not too long I write the all .tpl : I don't really understand what's written here and how it is linked with the other file.

Code: Select all

<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->

<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->

<!-- BEGIN listitem --><li><!-- END listitem -->

<!-- BEGIN quote_username_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{USERNAME} {L_WROTE}:</b></span></td>
	</tr>
	<tr>
	  <td class="quote"><!-- END quote_username_open -->
<!-- BEGIN quote_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_QUOTE}:</b></span></td>
	</tr>
	<tr>
	  <td class="quote"><!-- END quote_open -->
<!-- BEGIN quote_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END quote_close -->

<!-- BEGIN code_open --></span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_CODE}:</b></span></td>
	</tr>
	<tr>
	  <td class="code"><!-- END code_open -->
<!-- BEGIN code_close --></td>
	</tr>
</table>
<span class="postbody"><!-- END code_close -->


<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->

<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->

<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->

<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->

<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->

<!--(((MOD BBCode Choose font-->
<!-- BEGIN font_open --><span style="font-family: {FONT}"><!-- END font_open -->
<!-- BEGIN font_close --></span><!-- END font_close -->
<!--)))MOD BBCode Choose font-->

<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->

<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->

<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
Cheers.
Last edited by filippo on Sun Feb 22, 2004 8:10 am, edited 1 time in total.

Post Reply

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