[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

sharpdust
Registered User
Posts: 195
Joined: Mon May 26, 2003 1:05 pm

Post by sharpdust » Sat Nov 22, 2003 4:04 am

something weird is going on with this mod. i can get the drop down box on my subsilver template but not on my fiblack3d template...

link...
http://server775.dnslive.net/~oneroad/forum/

there is a change template option at the bottom of the index.

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

Post by Herbalite » Sat Nov 22, 2003 5:40 am

sharpdust wrote: something weird is going on with this mod. i can get the drop down box on my subsilver template but not on my fiblack3d template...

link...
http://server775.dnslive.net/~oneroad/forum/

there is a change template option at the bottom of the index.
You have to modify the template posting_body.tpl for all your installed templates.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

sharpdust
Registered User
Posts: 195
Joined: Mon May 26, 2003 1:05 pm

Post by sharpdust » Sun Nov 23, 2003 4:02 am

whoops, my bad. easy mod didn't get that unfortunately.

jip78
Registered User
Posts: 183
Joined: Tue Apr 08, 2003 11:17 pm

Post by jip78 » Sat Dec 06, 2003 3:07 am

Hey, thanks for the awesome MOD.
It works fine for me using the subSilver template with only
a few other MODs installed.

I do have a question though.
How do I add the text "Font Type:" infront of the drop down box?

Thanks!

Image

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

Post by Herbalite » Sat Dec 06, 2003 5:28 am

jip78,

All you have to do is to change the template posting_body.tpl. (That's a version that is useable for one language only. If you need it for several lnaguage there's a bit more work to do.

In the MOD you'll find a section for posting_body.tpl that looks like this:

Code: Select all

&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>
Change this to:

Code: Select all

&nbsp;Font Type:<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>
That should do the trick
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

jip78
Registered User
Posts: 183
Joined: Tue Apr 08, 2003 11:17 pm

Post by jip78 » Sat Dec 06, 2003 6:08 am

Awesome! Thanks!!!! :D

hakobg
Registered User
Posts: 13
Joined: Wed Dec 31, 2003 10:37 pm
Contact:

Post by hakobg » Mon Jan 12, 2004 7:40 am

This is a perfect mod to use. But I found something needs to be added on it. When users check "Show all post by 'this user'", they don't see the actual font face used in original thread,post.

Could you tell me what would I need to edit in order to have the exactly same fonts, used in original post, in search.php?

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

Post by Herbalite » Mon Jan 12, 2004 2:36 pm

hakobg wrote: Could you tell me what would I need to edit in order to have the exactly same fonts, used in original post, in search.php?
I'll have to check it out for myself. As soon as I find out, I'll post again.
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 » Mon Jan 12, 2004 2:48 pm

Other BBCode entries are suppressed either. I tried it with font color, which won't display either. So it seems that the issue is not related with this particular MOD, but is rather a feature of phpBB.
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

hakobg
Registered User
Posts: 13
Joined: Wed Dec 31, 2003 10:37 pm
Contact:

Post by hakobg » Tue Jan 13, 2004 7:39 am

Herbalite wrote: Other BBCode entries are suppressed either. I tried it with font color, which won't display either. So it seems that the issue is not related with this particular MOD, but is rather a feature of phpBB.


Dear Harbalite,

Thank you for your reply.

I am not very professional in php scripting, but I would like to point the following code, which I believe has connection with my concern. Would you please take a look and give a comment on this?

File: includes/functions_search.php

Code: Select all

		// Quickly remove BBcode.
		$entry = preg_replace('/\[img:[a-z0-9]{10,}\].*?\[\/img:[a-z0-9]{10,}\]/', ' ', $entry); 
		$entry = preg_replace('/\[\/?url(=.*?)?\]/', ' ', $entry);
		$entry = preg_replace('/\[\/?[a-z\*=\+\-]+(\:?[0-9a-z]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]/', ' ', $entry);
Thanks

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

Post by Herbalite » Tue Jan 13, 2004 12:30 pm

I made some tests with removing code filtering BBCode. However after removing it, then the BBCode would appear as one enters them while writing a new message or editing it :(

Secondly, I don't know all the reasons why the developers of phpBB did remove the BBCode. One resaon is that in this particular type of search a message might get truncated in length. That will obviously create some problems as BBCode tags might gone missing.

Also, I suspect that there are some security concerns behind it all.

So while I agree it would be nice to have the BBCode show up there as well, I'd leave it as it is.
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 » Wed Jan 14, 2004 8:43 pm

am i stupid asking this but how do i install a mod? a bb code mod i should say

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

Post by Herbalite » Thu Jan 15, 2004 12:43 am

[ego]Nova wrote: am i stupid asking this but how do i install a mod? a bb code mod i should say

How to install MODs
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 7:58 am

this one doesnt come witha file about where to add the all the code to

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:24 am

[ego]Nova wrote: this one doesnt come witha file about where to add the all the code to
Can you be more specific what you mean with that :?
In the interest of cutting costs, the light at the end of the tunnel has been switched off...

Post Reply

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