Username in color problem
2 posters
Page 1 of 1
Username in color problem
This was working fine until i touched something in the group management panel, went back and redid it over and it still does not work.
https://help.forumotion.com/t129844-username-in-multiple-colors
Now it doesn't work, were their any changes made to the Javascript or the editor that could have changed something and make it stop working?
this is the script i'm using:
$(function(){
$('a[href="/uXXX]').not(function(){return $("img",this)[0]}).html('<strong><font color="#000000">Go</font><font color="#ff9600">Power</font><font color="#0000">Sports</font></strong>');
});
http://gokartbazaar.com
Thanks
https://help.forumotion.com/t129844-username-in-multiple-colors
Now it doesn't work, were their any changes made to the Javascript or the editor that could have changed something and make it stop working?
this is the script i'm using:
$(function(){
$('a[href="/uXXX]').not(function(){return $("img",this)[0]}).html('<strong><font color="#000000">Go</font><font color="#ff9600">Power</font><font color="#0000">Sports</font></strong>');
});
http://gokartbazaar.com
Thanks
Last edited by BlackScorpion on August 24th 2014, 3:32 am; edited 1 time in total
Re: Username in color problem
Hi BlackScorpion,
From the code it looks like you're missing a double quote in a[href=""]. I made it more simple to edit though.
Write : multiColor(id, html);
id : The user id of the member you wish to modify
html : The replacement HTML
Here is the code with one setup :
From the code it looks like you're missing a double quote in a[href=""]. I made it more simple to edit though.
Write : multiColor(id, html);
id : The user id of the member you wish to modify
html : The replacement HTML
Here is the code with one setup :
- Code:
$(function(){
multiColor(733, '<strong><font color="#000000">Go</font><font color="#ff9600">Power</font><font color="#0000">Sports</font></strong>'); // member username
function multiColor(id, html){$('a[href="/u'+id+'"]').not(function(){return $("img",this)[0]}).html(html)}
});
Re: Username in color problem
this would replace the current javascript, correct? I would enter the members id here [href="/u'+id+'"] such as [href="/u'+u1+'"]
S can you provide me an example say for me "BlackScorpion ID u1"
thanks for the help Ange
S can you provide me an example say for me "BlackScorpion ID u1"
thanks for the help Ange
Re: Username in color problem
Yep, it'll replace your current script. +id+ is data passed through the multiColor() function.
So it's more simple and takes less space up, you can just copy and paste :
After the first multicolored username, to color another user. Just fill out the fields :
733 => new user id
old html => new html
Here, I added you as the first color :
So it's more simple and takes less space up, you can just copy and paste :
- Code:
multiColor(733, '<strong><font color="#000000">Go</font><font color="#ff9600">Power</font><font color="#0000">Sports</font></strong>');
After the first multicolored username, to color another user. Just fill out the fields :
733 => new user id
old html => new html
Here, I added you as the first color :
- Code:
$(function(){
multiColor(1, '<strong><font color="#000000">Black</font><font color="#ff9600">Scorpion</font></strong>'); // BlackScorpion
multiColor(733, '<strong><font color="#000000">Go</font><font color="#ff9600">Power</font><font color="#0000">Sports</font></strong>'); // GoPowerSports
function multiColor(id, html){$('a[href="/u'+id+'"]').not(function(){return $("img",this)[0]}).html(html)}
});
Re: Username in color problem
Got it now much easier.. Thanks Your the best. Now maybe you can update the tutorial . Just kidding!
Graphic Design Section Rules || Becoming a Designer || Graphic Requests
Graphics Request Form
Make sure to check out our FREE Graphic's Gallery
No support provided via PM!
Re: Username in color problem
You're welcome BlackScorpion.
Topic archived
You are right, I'll most likely update the tuto with this code since it is easier.
Topic archived
You are right, I'll most likely update the tuto with this code since it is easier.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum