vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   username color change (https://vborg.vbsupport.ru/showthread.php?t=318576)

LethalJ 05-07-2015 11:15 AM

username color change
 
Heya guys, hoping someone can help me with this. Basically we want to add two toned donator to forum as shown below.

https://vborg.vbsupport.ru/external/2015/05/23.png

I'm using the following code to achieve this

Code:

if( strpos( $user['musername'], 'tone: true;' ) !== false )
{
    $i = $b = 0;
   
    $username = '';

    $colours = array('009B48','FF7900');

    while( $i < strlen( $user['username'] ) )
    {
        if( $b > ( count( $colours ) - 1 ) ) $b = 0;
       
        $username .= '<span style="color: #' . $colours[ $b ] . '">' . $user['username'][$i] . '</span>';
       
        ++$b;
        ++$i;
    }
   
    $user['musername'] = '<strong>' . $username . '</strong>';
}


How could I seperate these colors eg Green first blending into the orange as shown below

https://vborg.vbsupport.ru/external/2015/05/24.png


Any help is greatly appreciated

Black Snow 05-07-2015 01:39 PM

Your using the code from my rainbow username plugin: https://vborg.vbsupport.ru/showthread.php?t=296239

Just add the two colours and voila!

LethalJ 05-07-2015 07:05 PM

Quote:

Originally Posted by Black Snow (Post 2545041)
Your using the code from my rainbow username plugin: https://vborg.vbsupport.ru/showthread.php?t=296239

Just add the two colours and voila!

Thanks for the reply, Just noticed images were missing. If I use only two colors then they mix through the name. I'm trying to make it so one color comes after the other as shown in screenshot two. Your rainbow code works fine for our rainbow donators :)

Thanks


All times are GMT. The time now is 03:55 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.00996 seconds
  • Memory Usage 1,718KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete