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

Reply
 
Thread Tools
Default User Color? Details »»
Default User Color?
Version: , by CdaKnight CdaKnight is offline
Developer Last Online: Oct 2004 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-04-2002 Last Update: Never Installs: 0
 
No support by the author.

I've started to make a hack that will allow a user to have a default post color, and not have to set it in the actual post everytime.

I'm kind of a hacking n00b, so all I've been able to do is make the profile field.

Is there any way I can make a tag similar to normalfont, that is just like normalfont, except it is used only to display post test, with the specified color? (I just need to know where it's defined so I can copy it and make something new.)

Thanks,
CdaKnight

Show Your Support

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

Comments
  #2  
Old 11-04-2002, 01:39 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can set replacement variables in your Admin CP by going to the Replacement section, and click Modify. Then, make something up like <postfont> and the replacement being <font color=$post[fieldx]>

Change x to the number of your custom profile id.

and </postfont> replacement being </font>

Then, in your postbit, add <postfont> and </posfont> around $post[message].
Reply With Quote
  #3  
Old 11-04-2002, 01:46 AM
CdaKnight CdaKnight is offline
 
Join Date: Jan 2002
Location: Houston
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot!!!!!!!!!!!!!!!
Reply With Quote
  #4  
Old 11-04-2002, 01:55 AM
CdaKnight CdaKnight is offline
 
Join Date: Jan 2002
Location: Houston
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm. Now I'm having a problem.

All of my fonts default to blue.

is there a way I can set a default value for the profile field?
Reply With Quote
  #5  
Old 11-04-2002, 02:00 AM
CdaKnight CdaKnight is offline
 
Join Date: Jan 2002
Location: Houston
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And I just figured out why. Its not translating $post[field5] into whatever the custom field is.

And to continue my question, I just thought of something. Is there a way to set a default if the user has nothing in the field?
Reply With Quote
  #6  
Old 11-04-2002, 02:04 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Make it easy on yourself.

Forget about the <postfont> replacement.

In your postbit, use the HTML code directly like this:

<font color="$post[field5]">$post[message]</font>

It will work 100%.
Reply With Quote
  #7  
Old 11-04-2002, 02:06 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The replacement variables don't parse custom profile IDs since replacement variables are not php file specific. So you can use them in your replacements it looks like, unless the variable is global.
Reply With Quote
  #8  
Old 11-04-2002, 02:17 AM
CdaKnight CdaKnight is offline
 
Join Date: Jan 2002
Location: Houston
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to set a default? All the people who haven't set a font color are blue.
Reply With Quote
  #9  
Old 11-04-2002, 02:27 AM
CdaKnight CdaKnight is offline
 
Join Date: Jan 2002
Location: Houston
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And I just realized its not replacing. Where I have <font color="#$post[field5]"> it has <font color="#">
Reply With Quote
  #10  
Old 11-04-2002, 02:37 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's because the person has not filled out Custom Profile Field 5 out - are you sure it's custom profile id 5? It should be higher than that since usually the first 5-10 are taken already.

Why use #?

Why not have a custom user profile, and have your users enter either a color eg. "black, red, blue" or a hex "#000000" etc.

Then use <font color="$post[fieldx]"> NOT <font color="#$post[fieldx]"> - this way you won't have font becoming blue.

Also, then users can put in colors in words eg. marineblue, gold, yellow etc.
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 03:26 PM.


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.12951 seconds
  • Memory Usage 2,285KB
  • Queries Executed 23 (?)
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
  • (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