two colors in one username??!?!?!?
+7
ankillien
Sanket
Sir Chivas™
Zerotheheroe
xDroiidx
Reverse
Photondragon12345
11 posters
Page 1 of 1
Re: two colors in one username??!?!?!?
CSS, i'll try to get the code for you
This was the best code i could find
This was the best code i could find
- Code:
a[href="/u"]{
color: #AAAAAA !important;
}
Re: two colors in one username??!?!?!?
you have to put the user number, like this https://help.forumotion.com/u26520
But you would take the /us26520 and put it into the code to make
But you would take the /us26520 and put it into the code to make
- Code:
a[href="/u26520"]{
color: #AAAAAA !important;
}
Re: two colors in one username??!?!?!?
i think its a sub link, like sometimes i go on a site and i see that, then when i highlight over the white ppart of their name (the color thats different) an ad pops up, so maybe it was just that, cause iknow that having two colors in username isnt possible
Re: two colors in one username??!?!?!?
@reverse yes this person is in a group
@xxdroiidx how does that person create the sublink
@xxdroiidx how does that person create the sublink
Re: two colors in one username??!?!?!?
Hi,
}
a[href="/g10-vip"] {
background: url("https://i.servimg.com/u/f45/15/95/60/34/glitte10.gif");
}
That allows for a specific image to be added to a username, upon the username's color. So maybe you could get a color and add that in as a shade or something. I don't know if it would work properly though, but you can try. My forum is PHBB.
}
a[href="/g10-vip"] {
background: url("https://i.servimg.com/u/f45/15/95/60/34/glitte10.gif");
}
That allows for a specific image to be added to a username, upon the username's color. So maybe you could get a color and add that in as a shade or something. I don't know if it would work properly though, but you can try. My forum is PHBB.
Re: two colors in one username??!?!?!?
I don't think it's possible.
Unless you create an image that has 2 different colors, to use the following code.
Unless you create an image that has 2 different colors, to use the following code.
- Code:
}
a[href="/g10-vip"] {
background: url("http://i45.servimg.com/u/f45/15/95/60/34/glitte10.gif");
}
Re: two colors in one username??!?!?!?
Sir chivas, I just posted that code above you stupid "noob"
lololololololoolOLolOlOOloOLOlOLoLOlOLolOOLOLoL.
leave sir chivas. just leave.
lololololololoolOLolOlOOloOLOlOLoLOlOLolOOLOLoL.
leave sir chivas. just leave.
Re: two colors in one username??!?!?!?
Zerotheheroe, please be respectful towards other members.
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: two colors in one username??!?!?!?
Hi,
Can you post link tot he forum where this is done?
Can you post link tot he forum where this is done?
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: two colors in one username??!?!?!?
As long as a space is in the username, this should do it.
Modules>>Javascript codes management
Remember:
*Enable Javascript!
*In all pages.
*Replace u1 with username # on the url
*Replace #ff0000 with any color code.
*For the first part of username, it uses the regular color that it would be without the code.
I tested it on mine and it works!
Modules>>Javascript codes management
- 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)})});
Remember:
*Enable Javascript!
*In all pages.
*Replace u1 with username # on the url
*Replace #ff0000 with any color code.
*For the first part of username, it uses the regular color that it would be without the code.
I tested it on mine and it works!
Re: two colors in one username??!?!?!?
amy cool you are nice may i ask how? and also may i ask how you made those footer link images at the bottom of your page?
Re: two colors in one username??!?!?!?
A working vode was already posted , read up.Photondragon12345 wrote:amy cool you are nice may i ask how? and also may i ask how you made those footer link images at the bottom of your page?
Re: two colors in one username??!?!?!?
oh its working except is there any way to do it so its two colors in the chatbox? where it is not two colors currently
Re: two colors in one username??!?!?!?
lilyheart7 wrote:
- 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)})});
This code can be shortened to just this:
- Code:
$(function(){
$('a[href="/u1"]').each(function(i,e){
var name = this.innerHTML.replace(/<[^>]+>/g, '');
this.innerHTML = this.innerHTML.replace(name, name.replace(/([^\s]+)/, '<span style="color:#f00">$1</span>');
});
});
To do the chatbox ones, you'd need to ensure the chatbox was an IFRAME chatbox rather than an EMBED.
You can actually do this really easily since Forumotion inserts the chatbox via javascript and they have left the old function in place. Just simply put in Javascript file for the homepage: window.insertChatBoxNew = insertChatBox;
Now that the chatbox is an iframe, you can access the iframe and send it into jQuery as the context parameter.
Making the final script for everything something like:
- Code:
window.insertChatBoxNew = insertChatBox;
$(function(){
var color = function(html) {
var name = html.replace(/<[^>]+>/g, '');
return html.replace(name, name.replace(/^([^\s]+)/, '<span style="color:#f00">$1</span>');
};
$('a[href="/u1"]').each(function(i,e){
this.innerHTML = color( this.innerHTML );
});
var cb = document.getElementById('frame_chatbox');
if(cb) {
cb.name = 'chatbox';
$('a[href="/u1"]', document.chatbox.document.getElementById('chatbox')).each(function() {
this.innerHTML = color( this.innerHTML );
});
}
});
Making the chatbox coloring possible, and much faster.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: two colors in one username??!?!?!?
Amy pro powers is everywhere wait y am i here o.o
Nuran- New Member
- Posts : 11
Reputation : 1
Language : English
Re: two colors in one username??!?!?!?
lol I forgot to remove those unnecessary parts once I saw they did not do anything to chatbox actually but oh well, didn't realize that the code would land one day here in support forum.
And thanks for the infos LG, you always make good input
And thanks for the infos LG, you always make good input
Amy Cool- New Member
- Posts : 13
Reputation : 2
Language : English
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum