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)
-   -   Users Choose Username Font/Color Posts (https://vborg.vbsupport.ru/showthread.php?t=93099)

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

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

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]Current Add-Ons[/high]
Exclude Certain Colors



[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!

webslugger 07-28-2005 10:44 PM

great idea! could you also add a field to let them choose the font?

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

refresh

webslugger 07-28-2005 10:53 PM

excellent! thanks

Gio~Logist 07-28-2005 11:11 PM

I UPDATED THE INSTRUCTIONS! IF YOU ALREADY INSTALLED, READ THE NEW INSTRUCTIONS!


I dont use vb3.5 so correct me if i was wrong in any of my codes, however, i don't THINK i was.

.Tim 07-28-2005 11:17 PM

The color doesn't change for me.

Gio~Logist 07-28-2005 11:19 PM

Did you use new instructions?
What did you insert in your profile?
Did you make sure you followed instructions correctly?

.Tim 07-28-2005 11:34 PM

Yes.
I tried many different codes, even the one from the example and nothing.
Yes, I even reverted and did it again.

Gio~Logist 07-28-2005 11:41 PM

wow im an idiot... simple html mistake..... sorry about that, try now! i edited instructions....

.Tim 07-28-2005 11:48 PM

That worked, thanks! Great hack my users will love this.

monstergamer 07-29-2005 12:14 AM

thanx for this, but i had some thing like this and i added a glow around the usernames as well

Gio~Logist 07-29-2005 12:29 AM

im glad you guys like it so far.... again, feel free to make more requests n stuff!

Boofo 07-29-2005 12:43 AM

Wouldn't this mess with your html marking in the usergroups, though? ;)

.Tim 07-29-2005 01:02 AM

Quote:

Originally Posted by gio~logist
im glad you guys like it so far.... again, feel free to make more requests n stuff!

Would be nice if it could show up in other places like "who's online".:D

Tony G 07-29-2005 01:40 AM

Thank you for sharing your mod. Could you please document your modification in a .txt file and attach it? It's easier for members to refer back to your mod if they need to install it again.

normandyq8 07-29-2005 01:50 AM

thank you

but if you can do same this:
https://vborg.vbsupport.ru/showthread.php?t=60065

that will be great

Gio~Logist 07-29-2005 02:04 AM

Quote:

Originally Posted by Boofo
Wouldn't this mess with your html marking in the usergroups, though? ;)

What?

Quote:

Originally Posted by Boofo
Thank you for sharing your mod. Could you please document your modification in a .txt file and attach it? It's easier for members to refer back to your mod if they need to install it again.

I'll have that first thing tommorow.

Gio~Logist 07-29-2005 02:04 AM

Quote:

Originally Posted by normandyq8
thank you

but if you can do same this:
https://vborg.vbsupport.ru/showthread.php?t=60065

that will be great


Actually i can :-D That will be done tommorow as well :-D

Boofo 07-29-2005 02:35 AM

Quote:

Originally Posted by gio~logist
What?

The html markup in the Usergroup settings for highlighting the names of the Admins, Mods, etc.

bigcurt 07-29-2005 03:31 AM

Screenshots would also be a good idea gio ;). Also this should overwrite your usergroup markup just like boofo said, so if you have html markup usegroups, I would be careful.

~Curt

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

Actually it only overwrites it IF THE USER HAS A COLOR SELECTED.

I'm a bit busy right now however, expect the release of user font hack tonight or sooner!

Boofo 07-29-2005 10:21 AM

Then a user could set their name the same as a Mod or Admin. ;)

And would you please post this in a text file so others can download it and have it in case of a re-install?

yoyoyoyo 07-29-2005 10:42 AM

I don't know if you wrote this for me:

https://vborg.vbsupport.ru/showthread.php?t=91845

but thanks! I will check it out later. As far as more ideas to throw in the hack- how about having a list of the fonts that they can choose in a drop-down menu?
Quote:

Originally Posted by Boofo
Then a user could set their name the same as a Mod or Admin. ;)

And would you please post this in a text file so others can download it and have it in case of a re-install?

ooh - that is why a drop-down menu idea would be best I think, even for the colors.

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

Quote:

Originally Posted by yoyoyoyo
I don't know if you wrote this for me:

https://vborg.vbsupport.ru/showthread.php?t=91845

but thanks! I will check it out later. As far as more ideas to throw in the hack- how about having a list of the fonts that they can choose in a drop-down menu?


ooh - that is why a drop-down menu idea would be best I think, even for the colors.


I didn't see your request however, i'm glad i can help. I will update this thread with instructions on how to make it function in who's online as well. Also, i would do a drop down menu, however, not everyone likes the same fonts. As for colors..... if someone chooses a color the same as one in which admins have....... does it really matter? That's why they invented showgroups.php If it really does matter then i can try and make a drop down, however, it doesnt seem that big of a deal at the moment.

yoyoyoyo 07-29-2005 11:25 AM

Quote:

Originally Posted by gio~logist
I didn't see your request however, i'm glad i can help. I will update this thread with instructions on how to make it function in who's online as well. Also, i would do a drop down menu, however, not everyone likes the same fonts. As for colors..... if someone chooses a color the same as one in which admins have....... does it really matter? That's why they invented showgroups.php If it really does matter then i can try and make a drop down, however, it doesnt seem that big of a deal at the moment.

I think it is a big deal (the color/font). Admins and mods like to stand out. Mods at my site (and 99.999% of all of the other sites) work for no money, etc. and they feel that they have earned their title/markup status. I think it is cool to allow regular users to choose their own color/font, except for the admin/mod fonts/colors. Sure it is no big deal in the large scope of things, just as items purchased in the uttstore shop or rep are no big deal in reality, but people get very posessive of funny little icons, etc. next to their names.

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

So then i suppose you expect me to try and guess what color each admin of a forum has set each usergroup to so that then i can determind what to put int he drop down?

john1744 07-30-2005 04:20 PM

I dont know why they're griping, but this hack is awesome. Thanks tons man.

john1744 07-30-2005 04:37 PM

The only thing I could think of is I wish the colors were expanded to the other areas of the forum, as in the What's Happening area, and in the last post column, things like that.

The color picker would be nice as well.

Gio~Logist 07-30-2005 05:12 PM

I already have the color picker ima use, i just need to write instructions and stuff.

I will explain how to get this working on other parts of the forum as well when i release the color picker.

john1744 07-30-2005 05:13 PM

You get that stuff put in and I think it could be HOTM

john1744 08-04-2005 03:20 PM

Any updates?

jesus likes pie 08-06-2005 09:06 PM

this would be really good. Excellent idea but I wont use it since we resrve different/special colors for staff only.

I'll get the font color one though!

Bubble #5 08-18-2005 09:48 PM

Quote:

Originally Posted by gio~logist
So then i suppose you expect me to try and guess what color each admin of a forum has set each usergroup to so that then i can determind what to put int he drop down?

Of course not, but you could have a place where the admin could enter in the colors that are excluded, and the hack would then ignore those colors, or even make it easy for the admin to add the colors available themselves, and then just those colors would be available in the drop down list. As long as members can duplicate admin and mod colors the hack is useless, and defeats a basic vB feature.

Kirk Y 08-19-2005 02:12 AM

Quote:

Originally Posted by Bubble #5
Of course not, but you could have a place where the admin could enter in the colors that are excluded, and the hack would then ignore those colors, or even make it easy for the admin to add the colors available themselves, and then just those colors would be available in the drop down list. As long as members can duplicate admin and mod colors the hack is useless, and defeats a basic vB feature.

Just what I was thinking: if you could somehow specify a banned or black-list of color vars, then I'd totally install this hack.

john1744 08-19-2005 02:25 AM

Yeah that would be awesome, cause right now I have a user who is a ghost. IE: his username is the same as the background of the forum.

Bubble #5 08-19-2005 02:44 AM

Quote:

Originally Posted by john1744
right now I have a user who is a ghost. IE: his username is the same as the background of the forum.

Hehehe.... sorry, didn't mean to laugh, but that is funny (and part of the reason why I won't use this hack as it stands) :surprised:

fly 09-04-2005 08:12 PM

I use postbit_legacy and $post[musername] appears twice (unless I have it in there twice from some other hack...). I'll figure it out, but you may want to update the instructions...

Gio~Logist 09-05-2005 07:16 AM

[high]Exclude Certain Colors Add-On[/high]


Change
HTML Code:

<if condition="$post['fieldx'] != '' ">
<font style="color:$post[fieldx]">$post[musername]</font>
        <else />
$post[musername]
</if>

To

HTML Code:

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

<if condition="$post['fieldx'] == 'COLORCODE1' OR $post['fieldx'] == 'COLORCODE2' OR $post['fieldx'] == 'COLORCODE3' OR $post['fieldx'] == 'COLORCODE4'  ">

<else />
<font style="font-family:$post[fieldx]">$post[musername]</font>
</if>

        <else />
$post[musername]
</if>

Replace COLORCODE1, COLORCODE2, ETC. with the codes you want to excluce.

john1744 09-06-2005 06:24 AM

Simply awesome thanks tons gio~logist

NuclioN 10-10-2005 10:15 AM

How to use this just for the online colors on forumhome??


All times are GMT. The time now is 03:05 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.01303 seconds
  • Memory Usage 1,843KB
  • 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
  • (8)bbcode_html_printable
  • (11)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