Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Users Choose Color/Font Of Username In Posts Details »»
Users Choose Color/Font Of Username In Posts
Version: 1.00, by Gio~Logist Gio~Logist is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Version: 3.0.8 Rating:
Released: 07-28-2005 Last Update: Never Installs: 6
Template Edits
 
No support by the author.

//////////////////////// Users Choose Color/Font Of Username In Posts \\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////////////////////////////// by gio~logist \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
------------------- Allow users to change what color their username is in posts --------------------
------------------------------------------ Via UserCP -------------------------------------------
//////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\

This hack was originally made for 3.5, however, Erwin gave me the OK to post it here as well, due to the fact that it also works on this version of vb :-D

Want members to be able to choose the font color of their usernames 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] "Color of Your Username"

[high]Description:[/high] Type in the color in which you will like your username to be. Keep in mind that writing the colors in text does not always work, so try and format it like this: #ff0000 (that code is for red).

[high]Display Size:[/high] 11

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


[high]HIT SAVE[/high]


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

HTML Code:
$post[musername]
Replace it with this

HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="color:$post[fieldx]">$post[musername]</font>
	<else />
$post[musername]
</if>
X will be the id for the field in which you created. 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]



Want them to be able to choose the font as well?

[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] "Font of Your Username"

[high]Description:[/high] Type in the font in which you will like. For example for tahoma, type in "Tahoma", without the quotations.

[high]Display Size:[/high] 15

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


[high]HIT SAVE[/high]

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

HTML Code:
$post[musername]
Replace it with this

HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="font-family:$post[fieldx]">$post[musername]</font>
	<else />
$post[musername]
</if>
The X in font-family will be the id for the field in which you created. 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]

If you want them to be able to choose both color AND font, only do step 1 in each part, and then replace:

HTML Code:
$post[musername]
with

HTML Code:
<if condition="$post['fieldx'] != '' ">
<font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[musername]</font>
	<else />
$post[musername]
</if>
The X in font-family will be the id for the field in which you created. The X in font-color will be the id for the field in which you created before. 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]Planned For Next Version (So Far)[/high]
- Have a pop up that allows you to pick a color and then shows the code for that color.

If you have any other ideas feel free to post them!

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-14-2005, 06:41 PM
HipHopFame HipHopFame is offline
 
Join Date: Dec 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice!! Installed..
Reply With Quote
  #3  
Old 08-15-2005, 05:03 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice modification, thank you for sharing.
Reply With Quote
  #4  
Old 08-15-2005, 06:42 AM
Andrew111888's Avatar
Andrew111888 Andrew111888 is offline
 
Join Date: Mar 2003
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless I'm missing something, the method I wrote for my forum the other day is slightly "safer" .
Reply With Quote
  #5  
Old 08-27-2005, 05:49 PM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for sharingn your nice hack, gio~logist...

At the moment, the font color and type only display in the postbit on my forum when a board user is online.

Guests do not see the username font changes.

Are others also experiencing this?

Thanks,

Khashyar
Reply With Quote
  #6  
Old 08-27-2005, 06:04 PM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think what might be happening, is that because the color and font profile fields are "private" fields, they are only showing for registered users...

Khashyar
Reply With Quote
  #7  
Old 09-07-2005, 01:24 PM
Anon47's Avatar
Anon47 Anon47 is offline
 
Join Date: Aug 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey thanks! This mod is great. I was getting sick of setting up a new usergroup everytime somebody wanted a new color.

How would I go about making the usernames show up in each member's individual color in the Members List and Who's Online list as well?
Reply With Quote
  #8  
Old 09-10-2005, 12:04 AM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Anon47
Hey thanks! This mod is great. I was getting sick of setting up a new usergroup everytime somebody wanted a new color.


How would I go about making the usernames show up in each member's individual color in the Members List and Who's Online list as well?
I am currently trying to work on getting profile fields to show in Who's Online. This isn't to easy but i am trying extremely hard because i need this for something im doing to my site.

Also, i will look into getting it to show in memberlist.

Quote:
Originally Posted by Khashyar
Thank you for sharingn your nice hack, gio~logist...

At the moment, the font color and type only display in the postbit on my forum when a board user is online.

Guests do not see the username font changes.

Are others also experiencing this?

Thanks,

Khashyar
This can be that:

A) Maybe guests not being able to see a user's profile has affected this.
B) Maybe the field is private

Those are the only two reasons that come to my head.
Reply With Quote
  #9  
Old 09-15-2005, 08:23 PM
HHU HHU is offline
 
Join Date: Sep 2005
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, Im Using Ushop So I Dont Want To Do This, But Is This Possible:

Using Vb 3.07

Same Idea Except Allow A User To Choose A Font And Font Color To Be Their Default Font Color / Font In The Usercp?

Couldnt Find A Thread.. Thanks For The Help
Reply With Quote
  #10  
Old 10-03-2005, 08:46 PM
damianp damianp is offline
 
Join Date: Sep 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant get this to work in version 3.0.9 can anyone help?

I am assuming that this is the right bit of code:

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
$post[onlinestatus]
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
<if condition="$post['fieldx'] != '' ">

<font style="font-family:$post[field7]; color:$post[field6];">$post[musername]</font>
<else />
$post[musername]
</if>



also the part I have highlighted in red ( ummm green )does that need to be changed aswell?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05364 seconds
  • Memory Usage 2,307KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete