Status
Not open for further replies.

tyteen4a03

New member
Hi, how do I add custom user title changes? Say I have a new effect called "Rainbow", how do I add it to User title changes for users to select?
 
If you really wanted to implement any items like this, you could of course use the 'Custom Item' and in the option for Notifications put your ID and this would inform you of the purchase then you just insert the HTML code to the appropriate field.
Anything like this I notify the Buyer that the action will be implemented within 24hrs...

That's How I'm Doing It...
 
If you really wanted to implement any items like this, you could of course use the 'Custom Item' and in the option for Notifications put your ID and this would inform you of the purchase then you just insert the HTML code to the appropriate field.
Anything like this I notify the Buyer that the action will be implemented within 24hrs...

That's How I'm Doing It...
That's hacky... I would like to see the official way of doing it.
 
Their is not a way to do Rainbow effect yet, it was asked before and is currently under consideration for a future update.
 
For those that would like to have Rainbow Text For User Names;

I've messed about and found a way to give you just what you want....

Tested on vB4.1.5

{The PHP code is not mine and is freely available}

1: Create a usergroup
Title: Rainbow
You can set the Usergroup to have any permissions you want. {I just used the basic user permissions}

If you want the user to determine when they wish to turn off/on the rainbow from their usercp:
Public Group Settings: YES
Otherwise leave as no and admin will have control



Username HTML Markup
Insert this code into the first box;

HTML:
<strong style="color: #FFBC58; rainbow: true;">

And in the second box;
HTML:
</strong>



2: Create a new Plugin
Plugins & Products > Add New Plugin

Product: vBulletin
Hook Location: fetch_musername
Title: Rainbow
Execution Order: 1
Active: Yes

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

    $colours = array('d31539', 'ff7e00', 'ffc20e', '90d125', '187acb', '6f3198', 'ab1d8e');

    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>';
}

Save!


3: Create The Item
DBTech - vBShop > Manage Items

From the Item Management dropdown select : Usergroup Change

Fill in all the fields as you like except for:
Item Type Specific Fields

User Group: Rainbow
Usergroup Type: Secondary Usergroup
Add / Remove: Add

To inform the member how to activate/deactivate you could put in the Description something like this:
Description:
This Item Gives The Buyer The Opportunity To Have Their Username Shine Like A Rainbow In The Sky.

To Activate/Deactivate You Will Find The Setting In Your UserCP
My Settings :: My Account :: Permission Groups

Or Copy and paste this Url:
Mysite.com/profile.php?do=editusergroups




This is the only other way that I have been able to get the rainbow text working for the User name, it also has the advantage of allowing the user to switch on & off.

Enjoy!
 
Last edited:
Status
Not open for further replies.

Legacy vBShop

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,260
Customer rating
0.00 star(s) 0 ratings
Back
Top