Announcement

Collapse
No announcement yet.

Font Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PersianForums
    replied
    Thanks so much for the help, Really appreciate your care about other people

    You know I have a customized style so alt1 variable is kind of different in my style thats why I cant use it too. I have 3 kind of $post[message] in my forum :

    1.common vbulletin posts
    2.Members Article System
    3.General Article system (for VIP authors)

    and all of them are using separated templates so its kind of wired to edit all of their $post[message] , so I created a new Plugin Called : "change Message font" with this content :
    Code:
    $post['message']="<span style='font-family:Trebuchet MS; font-size: 14px;'>".$post['message']."</span>";
    and finally it solved my issue.


    Again thanks for all the help you gave me guys.

    Wish a great new year for all of you

    Leave a comment:


  • eJM
    replied
    Originally posted by PersianForums View Post
    Thanks for the reply,
    But I just wanna change only POSTs font not entire font of my forum , thats the point that I dont wanna use (and I cant use) the All style options Font feature to change my forum font.

    Regards.
    Sorry, but that's not what you said in your original post. You said the default font for your forums.

    If you want to, you can change the font for the class alt1. Although that background color apears on other areas besides the posts, it might be good to be consistent with the font family anywhere that background is used. The font size is different in posts than in, for instance, the thread lists or the forum lists, so it wouldn't be identical.

    If you insist on changing the font family in only the message area of posts, this should do it:
    Find in postbit_legacy template...
    Code:
    		<!-- message -->
    		<div id="post_message_$post[postid]">
    			$ad_location[ad_showthread_firstpost_start]
    			$post[message]
    		</div>
    		<!-- / message -->
    Change to...
    Code:
    		<!-- message -->
    		<div id="post_message_$post[postid]" style="font-family:'Trebuchet MS', sans-serif;">
    			$ad_location[ad_showthread_firstpost_start]
    			$post[message]
    		</div>
    		<!-- / message -->
    I assume the same code appears in the postbit template as well. So if that's the postbit you use, change it there instead of the postbit_legacy one.

    Since you are asking about fonts and the CSS to change them, you might find this interesting reading: http://www.w3schools.com/css/css_font.asp

    As an aside, it's always a good idea to post a link to the forum you are asking for help with.

    R'gards,

    Jim

    Leave a comment:


  • PersianForums
    replied
    Originally posted by Mark.B View Post
    This is where vB4 is an improvement as there's a specific stylevar to do this in vB4.

    Apologies for the pointlessly annoying interjection.
    Thanks for the reply,

    Yes you are right, But In my own opinion vb3 is so much more stable than vb4 , all of my vb licenses are vb4 but I have not any vb4 installed forum.

    Regards.

    Leave a comment:


  • Mark.B
    replied
    This is where vB4 is an improvement as there's a specific stylevar to do this in vB4.

    Apologies for the pointlessly annoying interjection.

    Leave a comment:


  • PersianForums
    replied
    Originally posted by BirdOPrey5 View Post
    I suppose it could be done via a plugin via an "automatic template edit" - that is using a the function str_replace on the postbit template to find the opening <div> tag before the $post[message] and adding the font code to it- but I really couldn't imagine justifying going through all that trouble when a simple template edit will work. Plus if you have customized style the auto template edits may not work well.
    Thanks for the reply,

    So I used this code : (I used <span></span> instead of <div></div> because if I use Div there will be additional <break> in my posts. ) :

    Code:
    $post['message']="<span style='font-family:Trebuchet MS; font-size: 14px;'>".$post['message']."</span>";
    is it ok ?

    thanks for the help

    Leave a comment:


  • PersianForums
    replied
    Originally posted by eJM View Post
    I don't understand why you aren't seeing it. In just about every section of All Style Options is a place to add or edit your Font Family. You could leave all of them blank except the Body section. Make that one this:
    Code:
    'Trebuchet MS', sans-serif
    As long as the visitor has Trebuchet MS on their computer system, then that's the font they will see everywhere on your forum. It's one of the most common fonts, but if you want to make sure they see an alternative of your choice, you can add other font family names after Trebuchet MS, separating each with a comma and a space.

    Jim
    Thanks for the reply,
    But I just wanna change only POSTs font not entire font of my forum , thats the point that I dont wanna use (and I cant use) the All style options Font feature to change my post font.

    Regards.
    Last edited by PersianForums; Fri 7th Jan '11, 4:58am.

    Leave a comment:


  • eJM
    replied
    Originally posted by PersianForums View Post
    Hello,

    I wanna set the default font of my forum to Trebuchet MS,

    I tried Main Css and All style options options but it didnt worked. its just shows me this font in editor not in the posts.

    Please help me about it.

    regards.
    I don't understand why you aren't seeing it. In just about every section of All Style Options is a place to add or edit your Font Family. You could leave all of them blank except the Body section. Make that one this:
    Code:
    'Trebuchet MS', sans-serif
    As long as the visitor has Trebuchet MS on their computer system, then that's the font they will see everywhere on your forum. It's one of the most common fonts, but if you want to make sure they see an alternative of your choice, you can add other font family names after Trebuchet MS, separating each with a comma and a space.

    Jim

    Leave a comment:


  • Joe D.
    replied
    I suppose it could be done via a plugin via an "automatic template edit" - that is using a the function str_replace on the postbit template to find the opening <div> tag before the $post[message] and adding the font code to it- but I really couldn't imagine justifying going through all that trouble when a simple template edit will work. Plus if you have customized style the auto template edits may not work well.

    Leave a comment:


  • PersianForums
    replied
    BirdOPrey5 Do you have any idea for using the <div> method in Plugin system ?

    Leave a comment:


  • PersianForums
    replied
    Oh! I didnt know that ,thanks for the suggestion.

    regards.

    Leave a comment:


  • Joe D.
    replied
    That works too, however the only issue is that you're not supposed to use the <font> tag anymore, it's depreciated so there will come a day when newer web browsers might not recognize it. the appropriate way to do this now would be inline css styles using either <div> or <span> tags.

    Leave a comment:


  • PersianForums
    replied
    thanks for the reply,

    You know I asked it because I have several custom products(like articles system and...) so I tried adding this plugin into the plugin system :

    Code:
    $post['message']="<font size='2' face='trebuchet ms'>".$post['message']."</font>";
    and it worked.

    Regards.

    Leave a comment:


  • Joe D.
    replied
    Not that I can see- the problem is, as I see it, is each DIV and table element has a unique name with the post id appended to it so settings 1 piece of extra css somewhere won't work.

    Maybe someone else has a better suggestion?

    Leave a comment:


  • PersianForums
    replied
    Thanks for the reply , there is no other way to do it via Style and templates section ?

    Leave a comment:


  • Joe D.
    replied
    One way would be to edit your postbit or postbit_legacy template.

    Find: $post[message]

    And enclose it in the following <div> tag:

    Code:
    <div style="font-family: 'trebuchet ms', sans-serif;">
    $post[message]
    </div>

    Leave a comment:

widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X