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)
-   -   Personal Font/Color in Posts (https://vborg.vbsupport.ru/showthread.php?t=93127)

Gio~Logist 07-28-2005 10:00 PM

Personal Font/Color in Posts
 
Personal Font/Color in Posts
by gio~logist
Allow users to change what color/font their posts are in threads Via UserCP

[high]Step 1[/high]
[high]Go to User Profile Fields >> Add New User Profile Field[/high]

Choose A "Single-Line Text Box"

[high]Title:[/high] "Your Font Color In Posts"

[high]Description:[/high] This is the color of the font in which will appear in your posts. (Ex: #ff0000 is red)

[high]Display Size:[/high] 11

[high]Max length of allowed user input:[/high] 8


[high]HIT SAVE[/high]



[high]Step 2[/high]
[high]Go to User Profile Fields >> Add New User Profile Field[/high]

Choose A "Single-Line Text Box"

[high]Title:[/high] "Your Font In Posts"

[high]Description:[/high] This is the font in which will appear in your posts. (Ex: Tahoma)

[high]Display Size:[/high] 15

[high]Max length of allowed user input:[/high] 20


[high]HIT SAVE[/high]


[high]Step 3[/high]
Now go to edit your postbit template and search for this code:

HTML Code:

$post[message]
Replace it with this

HTML Code:

<if condition="$post['fieldx'] != '' OR $post['fieldx'] != ''">

<font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[message]</font>

 

    <else />

$post[message]

</if>

Replace the first x in the condition statement with the ID of the ?Your Font Color In Posts? profile field, and replace the second with the ?Your Font In Posts? profile field. The X in font-family will be the id for the field in which you created in the first step and the X in color will be the id for the field in which you created in the first step. To view the id of the field created go to the "Profile Field Manager" and find the field ID of the field you made. (This appears under the "Name" column). It should show as fieldx where x is the ID.


[high]HIT SAVE[/high]

[high]AND WE'RE DONE![/high]


[high]Addons Already Made[/high]
Glowing Posts For Mods, S.Mods, and Admins


[high]Planned Addons For Next Release[/high]
- Nothing So Far

Feel Free to Post Any Ideas/Suggestions

Gio~Logist 07-29-2005 11:10 AM

Zip Updated.....Hope You All Like

yoyoyoyo 07-29-2005 11:11 AM

how is this different than the one you released yesterday?
Users Choose Username Font/Color Posts
https://vborg.vbsupport.ru/showthread.php?t=93099

Gio~Logist 07-29-2005 11:32 AM

Quote:

Originally Posted by yoyoyoyo
Users Choose Username Font/Color Posts

You just answered your own Q.

That hack changes the color/font of your USERNAME in posts, this hack changes the color/font of your POSTS themselves.

pimpery 07-29-2005 11:36 AM

Quote:

Originally Posted by gio~logist
You just answered your own Q.

That hack changes the color/font of your USERNAME in posts, this hack changes the color/font of your POSTS themselves.

why not combine the two hacks while you are at it?

yoyoyoyo 07-29-2005 11:39 AM

Quote:

Originally Posted by pimpery
why not combine the two hacks while you are at it?

that's why I was confused... these should probably both be in the same hack, with the admin option to install one or the other or both features, as well as WOL. Also, usergroup permissions to only allow pre-specified usergroups to have the option appear in the user cp options would be nice.

Gio~Logist 07-29-2005 11:49 AM

I do not have time to do the admin option thing. Why not just make field/dont make field editable in order to enable/disable the hack?

You want only certain usergroups to be allowed to do this?

yoyoyoyo 07-29-2005 11:56 AM

Quote:

Originally Posted by gio~logist
I do not have time to do the admin option thing. Why not just make field/dont make field editable in order to enable/disable the hack?

You want only certain usergroups to be allowed to do this?

Yes, I think that would be a much-needed option. Any perks you can give to Mods/certain usergroups are a bonus.

normandyq8 07-30-2005 11:07 AM

thank you

sweet i will installed :D

Gio~Logist 07-30-2005 03:14 PM

Quote:

Originally Posted by yoyoyoyo
Yes, I think that would be a much-needed option. Any perks you can give to Mods/certain usergroups are a bonus.

Glowing Font In Posts


[high]Step 1[/high]
[high]Go to User Profile Fields >> Add New User Profile Field[/high]

Choose A "Single-Line Text Box"

[high]Title:[/high] "Glow For Moderators and Admins"

[high]Description:[/high] This is the glow color of the font in which will appear in your posts. (Ex: #ff0000 is red) <font color="red"> This Will Only Work For Moderators and Administrators.

[high]Display Size:[/high] 11

[high]Max length of allowed user input:[/high] 8


[high]HIT SAVE[/high]

[high]Step 3[/high]
Now go to edit your postbit template and search for this code:

HTML Code:

<font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[message]</font>
Replace it with this

HTML Code:

<if condition="$bbuserinfo['usergroupid'] == '6' OR $bbuserinfo['usergroupid'] == '7' OR $bbuserinfo['usergroupid'] == '5'">
<div style="font-style:normal;filter:Glow(color=$post[fieldx],strength=1);height:14px;">
<font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[message]</font>
</div>

    <else />

<font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[message]</font>

</if>


Replace the X in the <div style= tag with the field ID for the field we just created.


[high]HIT SAVE[/high]

[high]AND WE'RE DONE![/high]


This will make it so that mods, s mods, and admins can have glowing posts.


All times are GMT. The time now is 01:46 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.01149 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_html_printable
  • (5)bbcode_quote_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