vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   multicolored name (https://vborg.vbsupport.ru/showthread.php?t=160208)

MathewC 10-14-2007 11:28 AM

multicolored name
 
<a href="http://www.mmoccforum.com/interviews-articles/6994-interview-amber-hydro-island-community-manager.html#post67122" target="_blank">http://www.mmoccforum.com/interviews...html#post67122</a>

How did he get two colors as his name? :P

dyna88 10-14-2007 12:12 PM

He used the font tag...

HTML Code:

<font color="black">C</font><font color="orange">h</font><font color="black">u</font>

johnrizz 10-14-2007 04:32 PM

Where is this tag placed?

Kirk Y 10-14-2007 05:44 PM

No.. that wouldn't work. You'd need a plugin to break down the username and switch the style on each letter.

RobDog888 10-14-2007 10:48 PM

1 Attachment(s)
You would also want to use the "<span style='color: #FF0000;'/>" as its more w3c compliant. :)

Chris M 10-14-2007 11:57 PM

You can also use vBulletin's own Replacements system to replace all occurences of "Chris M" to "Chris M" etc

Chris

Freesteyelz 10-15-2007 12:13 AM

Quote:

Originally Posted by RobDog888 (Post 1360154)
You would also want to use the "<span style='color: #FF0000;'/>" as its more w3c compliant. :)

It should be:

Code:

<span style="color:#ff0000">text_here</span>
I also tend to like to keep everything lower case. :)

Kirk Y 10-15-2007 12:46 AM

Well I got bored and decided to see what I could put together, and came up with this:
PHP Code:

$x 0;
while(
$x strlen($this->post['username']) AND $this->post['usergroupid'] == 6)
{
    
$_color = ($_color == "red") ? "black" "red";
    
$post['musername'] .= "<span style='color:".$_color."'>".$this->post['username'][$x]."</span>";
    
$x++;



Dunno how efficient it is, but it does work.

johnrizz 10-15-2007 01:05 AM

Quote:

Originally Posted by Kirk Y (Post 1360249)
Well I got bored and decided to see what I could put together, and came up with this:
PHP Code:

$x 0;
while(
$x strlen($this->post['username']) AND $this->post['usergroupid'] == 6)
{
    
$_color = ($_color == "red") ? "black" "red";
    
$post['musername'] .= "<span style='color:".$_color."'>".$this->post['username'][$x]."</span>";
    
$x++;



Dunno how efficient it is, but it does work.

Could you please explain on were to place this? is this a plugin?

Freesteyelz 10-15-2007 01:10 AM

Quote:

Originally Posted by Kirk Y (Post 1360249)
PHP Code:

<span style='color:".$_color."'


Is that syntax correct?


All times are GMT. The time now is 01:01 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.03189 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (3)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
  • (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