The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

i forgot how to make 2 colour in username

View previous topic View next topic Go down

i forgot how to make 2 colour in username

Post by hydra.virus on August 25th 2012, 11:27 am

Please help me how to make 2 colours in 1 username

hydra.virus
Forumember

Posts : 34
Reputation : 1
Language : English
Location : Malaysia

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by DarkGlow on August 25th 2012, 3:51 pm

In order to create two colors in one username, there MUST be a space. (like Dark Glow) Wink

Go to:

1) ACP.
2) Advanced mode.
3) Modules tab.
4) JavaScript codes management.
5) Enable it (if disabled).
6) Create a new JavaScript (marked as a green plus).
7) Name the title as you wish.
Cool Placement: In all pages.
9) Insert the following code:

Code:
jQuery(document).ready(function(){jQuery('a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox a[href="/u1"]').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox_members a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)})});

10) Replace 'u1' with username # on the URL.
11) You can put ANY color you like instead of #FF0000

NOTE; for the first part of the username, it uses the normal color it'd be without the code.

And that's it, sir. Wink


Last edited by DarkGlow on August 27th 2012, 11:55 am; edited 1 time in total

DarkGlow
Forumember

Male Posts : 629
Reputation : 92
Language : English | Hebrew | Arabic
Location : Israel

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by hydra.virus on August 25th 2012, 6:31 pm

then after that? y i fail? still normal colour

WHAT U MEANs for
10) Replace 'u1' with username # on the URL.

hydra.virus
Forumember

Posts : 34
Reputation : 1
Language : English
Location : Malaysia

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by Sir Chivas™ on August 25th 2012, 6:42 pm

Alright,

click on a member. Then somelike this will appear in their link (URL)

http://forumslink.com/u1

You get the u1 and replace it with the members' #



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6756
Reputation : 428
Language : English, Spanish, and French
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by hydra.virus on August 26th 2012, 2:58 am

i fail again can u upload 1 pic how to do that? =.= sorry if i make u busy today... please



Code:
jQuery(document).ready(function(){jQuery('a[href="/http://shadowztours.forumonline.biz/Hydra v!rus#"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#00FFFF;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox a[href="http://shadowztours.forumonline.biz/Hydra v!rus#"]').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:   #800080;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox_members a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#00FFFF;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)})});


That true? or still got problem

like this /???

Code:
jQuery(document).ready(function(){jQuery('a[href="/http://shadowztours.forumonline.biz/u45#"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#00FFFF;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox a[href="/http://shadowztours.forumonline.biz/u45#"]').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#800080;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox_members a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#00FFFF;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)})});

hydra.virus
Forumember

Posts : 34
Reputation : 1
Language : English
Location : Malaysia

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by DarkGlow on August 27th 2012, 12:20 am

Use the code I've given. Replace the original member's number with 1 (number one in ''u1'') You wish to know his number? Visit his profile page, it will tell you it.

DarkGlow
Forumember

Male Posts : 629
Reputation : 92
Language : English | Hebrew | Arabic
Location : Israel

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by hydra.virus on August 27th 2012, 2:14 am

Like this ??


Code:
jQuery(document).ready(function(){jQuery('a[href="/http://shadowztours.forumonline.biz/u45"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox a[href="/http://shadowztours.forumonline.biz/u45"]').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox_members a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)})});


his id number - http://shadowztours.forumonline.biz/u45


still cant Sad

hydra.virus
Forumember

Posts : 34
Reputation : 1
Language : English
Location : Malaysia

Back to top Go down

Re: i forgot how to make 2 colour in username

Post by DarkGlow on August 27th 2012, 12:53 pm

Alright, I'll be clear enough.

You did mess up a bit, but that's no problem. Wink

Observe the following and do not mistake this time. Smile

NOTE; THE USERNAME YOU WISH FOR IT TO HAVE TWO COLORS MUST HAVE A SPACE IN IT.

1. Log into your administration panel.

2. Please choose the advanced mode.



3. Click on the modules tab.



4. Click on JavaScript codes management, bottom-left of your page.



5. Click on ''Create a new JavaScript''.



6. Do as the following image has; do not do anything else:



* Label the title as typed.
* In all pages; do not change it.

You see where it says to put the code at? Put the following one there:

Code:
jQuery(document).ready(function(){jQuery('a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox a[href="/u1"]').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)});jQuery('#chatbox_members a[href="/u1"] span').each(function(){var t=jQuery(this).text();var splitT=t.split(" ");var halfIndex=Math.round(splitT.length/2);var newText="";for(var i=0;i<splitT.length;i++){if(i==halfIndex){newText+="<span style='color:#ff0000;'>"}newText+=splitT[i]+" "}newText+="</span>";jQuery(this).html(newText)})});

I recommend clicking on ''Select Content'' on the script window. Then copy and paste.

You see that ''/u1'' in the script? You have to replace '1' (number one) with the exact member's number. You can go to his or her profile, and notice it on the URL page. Like in here:



That image shows ''/u35''. If I wanted to do the same as you, I'd go to that script above and replace '1' (which is in ''/u1'' in that script) with 35 so it may be; ''/u35''. So if you wish to know a member's number, go to his profile and look at the URL.

* You see that ''FF0000'' in the script? It's a color code, change it to whatever color code you wish for the member to have. Here's a link to color codes:

http://www.computerhope.com/htmcolor.htm

Here's a quick note:

=> For the first part of username, it uses the regular color that it would be without the code.

Do NOT forget to enable the JavaScript, by the way:



Good luck.

DarkGlow
Forumember

Male Posts : 629
Reputation : 92
Language : English | Hebrew | Arabic
Location : Israel

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum