vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Default Posting Font (https://vborg.vbsupport.ru/showthread.php?t=97544)

JJR512 10-03-2005 10:00 PM

Default Posting Font
 
This is a very simple hack. In fact it's almost embarrassing to call it a hack. :)

In a nutshell, this gives your members the ability to select a font face in which all of their messages will appear. This includes not only new messages after they select the font, but also any of their old messages, too, because the font they select is applied to their messages in the postbit template at the time they are viewed.

Installing involves creating a new custom profile field and a modification to the postbit and/or postbit_legacy template(s).

NOTE: If anyone would like to show me how to auto-populate the font selection list with the currently installed fonts, I'd be glad for the tutorial. (As it is now, you have to copy the list of fonts from the style editor into the custom profile field, which works but is not elegant.)

Daniel 10-04-2005 05:48 PM

Hm... doesnt seem to work :\

Snake 10-04-2005 06:00 PM

Screenshots please?

Daniel 10-04-2005 06:23 PM

Screenshots of what? It would be the same thing as someone posting in a different type of font anywhere.

VaaKo 10-04-2005 06:25 PM

here's a screenshot
but it doesn't work one bit
and this isn't a modification lol

Daniel 10-04-2005 06:28 PM

Doesnt work for me either :\

Snake 10-04-2005 06:54 PM

Nice hack.

Nevermind. It's working fine now. :)

Snake 10-04-2005 07:07 PM

How about making a hack for Font Color too? That would be cool.

JJR512 10-04-2005 07:45 PM

Lebanese Forces: Not sure what the screenshot is meant to show me, because there's nothing wrong with anything in it.

If anyone is having a problem, please do the following: Install the modification, select a font for yourself (or another member of your board), and give me a URL to a page that has a post from you (or that other member).

JJR512 10-04-2005 07:47 PM

You know what: I bet I know what the problem is.

In Step 8, in both in instances of "$post[field8]", change the 8 to whatever number you noted in Step 6. I hope that's all the problem is, because this is a very simple modification.

VaaKo 10-04-2005 08:05 PM

I did change that
I had field5 and it's still not working for me
and how about you add a color too

JJR512 10-04-2005 09:09 PM

The only other reason I can think of for it to not work is if you select a font that you don't actually have on your computer. That's why I asked for a URL to a message post by a user that has a default font selected.

Adding color and size are easy enough, but I'd like to make sure it's actually working first before extending it. :)

Again, the only reasons why it wouldn't work can possibly be are: 1. The field number in the code inserted into the template doesn't match the actual field number for the profile field; 2. You don't have the font installed on your computer, so although it's actually working, you can't see any difference; 3. My instructions aren't clear enough and a mistake was made installing it.

It could be #3... But please give me a URL to a thread on your board where someone has posted and that someone has a default font set, tell me who it is (so I know where to look), and I'll see what's up.

VaaKo 10-04-2005 09:15 PM

I didn't install it yet on my boards, I tested it on my localhost
let's hear from the others, if it worked with others, i'll install it again!

The Wise One 10-04-2005 10:20 PM

this functions as intended on my test boards...3.5.0 final.

doesnt work in quotes though. i set my font to georgia (making sure i had that font in my fonts folder), made a post, the text came out as intended, then quoted that post. the quote did not retain the font choice i made.

other than that...works great. the color options would be great :)

The Wise One 10-04-2005 11:22 PM

i got the color option working based on the colors available in the editor.

if the mod creator doesnt mind...ill post it up here.

Daniel 10-05-2005 12:52 AM

If he doesn't allow you to, just make a new thread, because I could really use it.

JJR512 10-05-2005 01:15 AM

I'll have something with color and size posted here in this thread tomorrow.

Snake 10-05-2005 03:04 PM

Yeah that's cool. What about effects too like bold, italic, underline and stroke? This would be cool.

Snake 10-07-2005 06:54 PM

Well you said you're going to release it tomorrow and nothing is up so far.

NuclioN 10-07-2005 08:02 PM

I wonder if it is possible to post with fonts that are on the server and not on a member's computer, so it doesn't matter what they choose.

Snake 10-08-2005 11:54 AM

I can't say that's possible but it's a good idea.

The Wise One 10-08-2005 09:27 PM

i sent him what i did for the color. if he doesnt post it by monday morning (1030 am eastern) then ill put up my color mod addition.

The Wise One 10-10-2005 02:20 PM

this is what i did to get the color options. the file is attached.

*Note: this is an add on to the original mod. all i did was replicate the instructions from the original mod and modified where appropriate.

JJR512 10-10-2005 05:56 PM

Quote:

Originally Posted by NuclioN
I wonder if it is possible to post with fonts that are on the server and not on a member's computer, so it doesn't matter what they choose.

Not really. The problem is that different platforms (Windows, Macintosh, Linux, etc.) have their own sets of fonts. The other part of the problem is that the website tells the member's internet browser what font to use, so the font has to be on the member's computer.

From the point of view of your question, the only way to guarantee font compatibility would be to make each of the fonts that are optional on your message board be downloadable from your site. However, you then have to deal with legal and licensing issues, as they are not all free. My preferred font, for example, is Palatino Linotype, which is part of the standard font options available in vBulletin. This font is copyright Microsoft and has been included with Windows since either ME or 2000. I don't think you can legally distribute it.

akanevsky 10-12-2005 08:20 PM

In this list of yours, there shouldn't be any fonts that are not universal and that cannot be found on some of the computers out there...

JJR512 10-13-2005 03:07 PM

Quote:

Originally Posted by Dark Visor
In this list of yours, there shouldn't be any fonts that are not universal and that cannot be found on some of the computers out there...

I understand that. But please remember that this list is not "mine"; rather, it is the list provided by vBulletin itself. My instructions say to copy the list of fonts from the style settings. This is the list of fonts that a user can select from the message editor when posting a message.

Anyone installing this hack is free to modify the list of fonts available to the user to select in his/her usercp. You can remove some names, you can add other names. Just remember that there are very few truly universal fonts, and not everything in the list may be available to everyone. But that same warning applies to the fonts you have available to users to select from the message editor when they're composing a message. If there's a font you don't want to be available to be in a post, you should remove that font name from your style settings; therefore, when you copy that list into this hack, that font won't be available there, either.

Snake 10-13-2005 08:09 PM

Any update on this one so far?

akanevsky 10-13-2005 08:18 PM

Quote:

it is the list provided by vBulletin itself.
Oh.. Sorry.
[high]* akanevsky goes to file a complaint with Jelsoft :)[/high]

JJR512 10-13-2005 09:44 PM

Quote:

Originally Posted by Aftermath
Any update on this one so far?

If you're referring to the colors request, see post #23 above. :)

JJR512 10-13-2005 09:47 PM

Quote:

Originally Posted by Dark Visor
Oh.. Sorry.
[high]* Dark Visor goes to file a complaint with Jelsoft :)[/high]

...On the other hand, if you can show me how to get the font selection list part of my hack to automatically polulate with the same list of installed fonts for the style, I'd be very interested to see that. This way, when installing the hack, one wouldn't have to copy the list, one would only have to install the hack. Also if the font list was ever changed, the font selection list part of the hack would also change, too. As it is now, if you remove fonts or add fonts to the board itself, you'd have to make those same changes to the settings for the custom profile field.

Snake 10-14-2005 11:10 AM

Quote:

Originally Posted by JJR512
If you're referring to the colors request, see post #23 above. :)

Thanks but I was looking for a better version for the color hack... :)

JJR512 10-14-2005 12:14 PM

I haven't had the chance to actually install the version with the color selector, because I don't plan on using it myself. So I haven't really seen it in action. But I had assumed it was just another drop-down selector box, like the font name.

What, exactly, is it that you would like to see; how can it be made better?

Colejo 10-15-2005 02:24 AM

Is this not the same as this https://vborg.vbsupport.ru/showthrea...ight=user+font ?

I only ask because I want something like this but I want the one that works the best.

Snake 10-15-2005 07:16 PM

Quote:

Originally Posted by JJR512
I haven't had the chance to actually install the version with the color selector, because I don't plan on using it myself. So I haven't really seen it in action. But I had assumed it was just another drop-down selector box, like the font name.

What, exactly, is it that you would like to see; how can it be made better?

Well I am hoping to see it exactly like the way you've done for default font hack, with the drop-down list and all that kind of stuff.

Snake 10-15-2005 07:20 PM

Here's what I mean. If you could do something similar like the below image, that would be cooL!

http://img153.imageshack.us/img153/9...stcolor5sa.jpg

Colejo 10-18-2005 09:04 AM

Quote:

Originally Posted by The Wise One
this is what i did to get the color options. the file is attached.

*Note: this is an add on to the original mod. all i did was replicate the instructions from the original mod and modified where appropriate.

I added font size in the Profile Field also but I'm messing something up in the code to add to the postbit I'm probably missing an if or > when I tried to add the extra condition for the size. I'm sure if I try a few times I can get it but I was wondering if you can put in that 3rd condition?

The Wise One 10-18-2005 09:25 AM

Quote:

Originally Posted by Colejo
I added font size in the Profile Field also but I'm messing something up in the code to add to the postbit I'm probably missing an if or > when I tried to add the extra condition for the size. I'm sure if I try a few times I can get it but I was wondering if you can put in that 3rd condition?

this should work for the conditional in postbit:

Code:

<div id="post_message_$post[postid]"><if condition="$post[fieldX]"><font face="$post[fieldX]"<if condition="$post[fieldX]"> color="$post[fieldX]"</if><if condition="$post[fieldX]"> size="$post[fieldX]"</if>>$post[message]</font><else />$post[message]</if></div>
remember to change X to the field ID # of the field you created for size.

Colejo 10-18-2005 09:31 AM

Quote:

Originally Posted by The Wise One
this should work for the conditional in postbit:

Code:

<div id="post_message_$post[postid]"><if condition="$post[fieldX]"><font face="$post[fieldX]"<if condition="$post[fieldX]"> color="$post[fieldX]"</if><if condition="$post[fieldX]"> size="$post[fieldX]"</if>>$post[message]</font><else />$post[message]</if></div>
remember to change X to the field ID # of the field you created for size.

That did it thanks.

TechDawgFan 10-18-2005 02:27 PM

I got a question here. I've set up my custom fields for font face and size (not going to do color) and edited the postbit and postbit_legacy templates as described in post #37 (The Wise One). I noticed three things.

1. Not only do my new posts show up with my default font and size, but all of my previous posts do as well. Why? What if I don't WANT my old posts to have the new defaults applied?

2. If the default size, but NOT font is selected in my options, the post uses the board default with no change to size.

3. If I log out and view my new post with a default font and size applied, I see the board default, NOT the default, so I am the only one able to see my defaults. Why? Will guests and other members be able to see the formatted text or not?

TDF

JJR512 10-18-2005 03:46 PM

1. The font is applied to a message when it is displayed, that's why you make changes to the postbit and postbit_legacy templates. This is by design. The only other way I could think of to use a default font would be to put the font tags inside the message that gets stored in the database, which because of the permanence of that, I didn't want to do.

2. I don't know about this, I haven't actually used the version with the size option myself.

3. I'll look into that...


All times are GMT. The time now is 04:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01241 seconds
  • Memory Usage 1,820KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete