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:


All times are GMT. The time now is 01:27 AM.

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.01119 seconds
  • Memory Usage 1,736KB
  • 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
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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