vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   New Posting Features - User selected default posting font and color (https://vborg.vbsupport.ru/showthread.php?t=171870)

Theoldwiz 03-01-2008 10:00 PM

User selected default posting font and color
 
Hello,

This mod allows users to select their default posting font and color. You will have to select this at registration and can update it whenever you want in profile.

First you must make two new single selection menu user profile fields. Options for them are below.

Profile field one:

Title: Default Post Color

Description: What color your posts show up as?

Options:

Black
Blue
Green
Red
Pink
Orange
Purple

Set Default: Yes, but no first blank option

Display Order: Doesnt Matter

Field Requiried: Yes, at registration and profile updating

Field Editable by User: Yes

Private Field: No

Field Searchable on Members List: No

Show on Members List: No


Profile field two:

Title: Default Post Font

Description: What do you want your default post font to be?

Options:

Arial
Arial Black
Arial Narrow
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Fixedsys
Franklin Gothic Medium
Garamond
Georgia
Impact
Lucida Console
Microsoft Sans Serif
Palatino Linotype
System
Tahoma
Times New Roman
Tribuchet MS
Verdana

Set Default: Yes, but no first blank option

Display Order: Doesnt Matter

Field Requiried: Yes, at registration and profile updating

Field Editable by User: Yes

Private Field: No

Field Searchable on Members List: No

Show on Members List: No

Now go to the user profile field manager, and jot down the two field numbers of the new fields listed on the right side of the two fields. Along with that, write down what number goes with what field. Please note this is not the display number, its the number next to it that says fieldX

Template Edits:

Go to your styles postbit/postbit legacy (whatever you use)

Find:
Code:

<!-- message -->
After Add:
Code:

<font COLOR="$post[fieldX]"><font face="$post[fieldX]">

Replace: The first red X with your default text color field number
The second red X with your default font field number.



Find:
Code:

<!-- / message -->
Add Above:
Code:

</font></font>

You are done, hope you like it!

Magnumutz 03-02-2008 10:10 AM

Yeah, i find pretty useful.
Thanks a lot.

Forum Lover 03-02-2008 12:24 PM

Code:

<font COLOR="$post[fieldX]"><font face="$post[fieldX]">
I got connfused here. Can u show me a example please?

its not working for me. I put [field1] instead.

Veer 03-02-2008 02:13 PM

Nice, why note to include font size?

thanks.

AWMGolfer 03-02-2008 02:19 PM

When you create a profile field, just to the left of the order numbers it will say field(number here). Use the numbers for the font color and face and plug it in for X. Starting to sound like a math teacher..lol.

Anyway, love it and thank you, thank you, thank you!!

Theoldwiz 03-02-2008 03:20 PM

Glad you guys love it.

Dont forget to hit install

I will be trying to add usergroup permissions and size soon in 1.1 :)

Magnumutz 03-02-2008 10:34 PM

One question... what if an user wants to change colors when making a post... will that work?
Will it ever integrate within the quickreply or editor?

Theoldwiz 03-02-2008 10:46 PM

It switches instantly. Im only good with template edits so creating something that complex could get hard. If anyone ever wants to team up though I have great ideas, and that would surely be one of em

xtrung 03-03-2008 01:16 AM

i had try same way for same idea :) but all message also show with new selected color.

i think we should add default color BBcode when member is posting by add new plugin

Forum Lover 03-03-2008 04:47 AM

FL clicked INSTALL. :up:

FENIX 03-03-2008 09:07 AM

Used on 3.6, have been waiting for this :) Many thanks


Edit: Does not appear to work - the fields appear in the user control panel, but after making a selection the posts do not show the new default face/colour.

Edit2: Dug up the old code from here https://vborg.vbsupport.ru/showthrea...ght=font+color which is working - so perhaps it is your coding?

AWMGolfer 03-03-2008 10:12 AM

Would it be some of the differences between 3.6 and 3.7? Not a coder here but it worked with no issues for me on 3.7.

Theoldwiz 03-03-2008 12:54 PM

Its working just fine for many people,

its been tested on 3.6 and works great. If you want I can come on and take a look

avsunforum 03-04-2008 08:12 AM

owww yea thanks:D

Eywah 03-04-2008 07:37 PM

Thanks man.

Im speak english too bad ım sorry.

User select text color okay
User select text font okay
User select text style (bold) ???

Help me please...

Theoldwiz 03-05-2008 01:28 AM

I didnt feel that was needed

hozmay 03-05-2008 01:07 PM

Quote:

Originally Posted by Pehchaan (Post 1455163)
Nice, why note to include font size?

thanks.

hi,first you must make two new single selection menu user profile fields. Options for them are below.

Title: Default Post Font

Description: What font your posts show up as?

Options:
Default
1
2
3
4
5
6
7

Set Default: Yes, but no first blank option

Display Order: Doesnt Matter

Field Requiried: Yes, at registration and profile updating

Field Editable by User: Yes

Private Field: No

Field Searchable on Members List: No

Show on Members List: No

Template Edits:

Go to your styles postbit or postbit legacy

Find ;

Code:

<!-- message -->
After add ;

<font size="$post[fieldX]">

Find ;

Code:

<!-- / message -->
Above add ;

Code:

</font>

Theoldwiz 03-06-2008 11:22 PM

Thats nice, but the title is misleading and it leads to bugs, thats why Im working on it for 1.01

Weston 03-15-2008 03:54 PM

i cnt get it to word dunno what i did wrong but yea its not workin

Sothside40 03-17-2008 12:23 AM

thanks nice hack,

Kaleem 03-21-2008 06:56 PM

i tried this it did not work no clue why though :s

odonel 03-30-2008 04:10 PM

did not work for me either on 3.7 RC1

johnpmaster 03-31-2008 07:14 PM

thanks , works great with 3.7.0 rc1

Fırtına 04-04-2008 09:43 AM

Thanks :)

Bl4z3 04-04-2008 11:07 PM

The font style works, but not the font 'color'.

Im on RC2, any help?

mblb 04-05-2008 08:52 AM

It's not working for me either. Also RC2

tounet 04-06-2008 10:14 PM

thanks good idea

but you can use this code:
Code:

<font face="$post[fieldX]" size="$post[fieldx]" color="$post[fieldx]">    </font>

Theoldwiz 04-09-2008 12:49 PM

The people who are not getting it to work are most likely making the simple mistake of entering the wrong field. If you need help send me a pm and I will have a look

I didnt add size because I dont know why anyone would want every one of their posts to be the same size (except if its just the default size of 2)

mblb 04-10-2008 03:14 AM

I could only get mine to work on postbit legacy.

fateL 04-10-2008 06:31 AM

Works good, thanks man. How would I make an option for bold, italic font too?

Breathex 04-10-2008 08:06 PM

Quote:

Originally Posted by fateL (Post 1487292)
Works good, thanks man. How would I make an option for bold, italic font too?

Yes, this is important.

Theoldwiz 04-15-2008 01:03 PM

Quote:

Originally Posted by mblb (Post 1487197)
I could only get mine to work on postbit legacy.

Just edit the legacy template

ShadowOne 04-30-2008 07:12 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=167487&highlight=font+color" target="_blank">https://vborg.vbsupport.ru/showt...ght=font+color</a>

thats the one i posted for 3.6 which works for 3.7 as well with no bugs...

Fırtına 05-01-2008 10:14 AM

Teşekk?rler, Thanks :)

SavvyPirates 05-02-2008 01:05 AM

Thanks for the hack. I just installed this (on 3.7.0 Gold) and it works great.

Quote:

Originally Posted by Theoldwiz (Post 1486666)
I didnt add size because I dont know why anyone would want every one of their posts to be the same size (except if its just the default size of 2)

I found a reason...some of the fonts (such as Garamond) at their default size are much smaller that what we are ued to with the Verdana default. Increasing the size is necessary to help people be able to read your post without a magnifying glass.

It appears that we can allow a default size to be selected by using the same method as you used for the font and color. Just need a third new profile field and a third font tag in the postbit.

FLMom 05-03-2008 09:22 PM

Before I start messing around with this, it is possible for a user to use Bold, Italics or Underline if they want too? I would also like to see a size option. It would come in handy for those on my site with poorer vision ;)

Thanks!

Hams 05-05-2008 06:42 PM

Thanx..

ahayat 05-19-2008 01:52 PM

nice hack , thanks. clicked at install and nomiated.

here it is some spell mistake in font list please Edit it, i have seen over many places,they just copy the same.

it is "Trebuchet MS" instead Tribuchet MS :D

Finally, i want to see in Quoted box same font as well,because someone does Quote you it does not show the same font we selected :D.

Can you find it please?

Cheers

nymyth 06-01-2008 08:36 PM

cant get this to work....the font never changes....

Peace

WDZaphod 06-03-2008 06:43 AM

Simple and VERY useful!

Thanks!!


All times are GMT. The time now is 05:23 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.01403 seconds
  • Memory Usage 1,818KB
  • 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
  • (9)bbcode_code_printable
  • (4)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