|
Post by Wormopolis on Sept 5, 2011 2:11:47 GMT -8
The reason the smear isnt working on that profile is the custom title has more then just text in it. The code currently looks for whatever text is above the "member is offline" and applies smear to that. however you have a link in there so the code thinks there isnt a custom title. I can make it apply smear to whatever is under the stars, but if the user has NO stars the code wont be able to find it again. that is why I used "member is online" because every profile would have that. if you move the Dark Prince to be the last thing in the custom title, I bet it would work
|
|
|
Post by Streamstrider on Sept 8, 2011 1:55:58 GMT -8
I thought I did. Have you altered the code in the last month?
And as for the custom title, I'll check on that.
|
|
|
Post by Wormopolis on Sept 8, 2011 21:06:11 GMT -8
the hard part of this is making something that will work on all profiles. the only way to do that is to have something that all profiles have in common. if all profiles have that link in them, I think I can work up a mod for you to have it look for that instead.
|
|
|
Post by Streamstrider on Sept 9, 2011 16:36:30 GMT -8
The links are always there, at least once their character is accepted. I wouldn't mind having the colorsmeared title be under the stars, however, as all users with accepted characters have them.
|
|
Tsubaki
Not New Member
Posts: 5
Tsubaki said 0 great things
|
Post by Tsubaki on Sept 16, 2011 14:51:34 GMT -8
For some reason this is not working for me on my board. I inserted every code, the first one into the global headers and then all that followed into the global footers. I really like the code and I wanna use it!
-flails-
|
|
|
Post by Wormopolis on Sept 16, 2011 19:45:19 GMT -8
what site we talkin bout here? shaken souls doesnt have any colorsmear coding in its source.
|
|
Tsubaki
Not New Member
Posts: 5
Tsubaki said 0 great things
|
Post by Tsubaki on Sept 16, 2011 20:07:52 GMT -8
What do you mean? Earlier I had the code entered into my Global Headers and Footers, the button appeared in my UBBC table when I tried to post but the code wouldn't work.
|
|
|
Post by Streamstrider on Sept 16, 2011 21:28:31 GMT -8
Do you have both parts in the headers and footers?
|
|
|
Post by Wormopolis on Sept 16, 2011 22:41:45 GMT -8
you are going to need to leave the code IN your source in order for me to track down where the conflict is.
stream: still working on it.
|
|
|
Post by Wormopolis on Sept 16, 2011 22:50:36 GMT -8
stream try this version:
<script type="text/javascript"> <!-- // colorSmear custom titles v1.0stream // by Wormopolis // must have colorSmear function in Global Header above this script // keep header intact
var customTitleArray=new Array(); customTitleArray['admin']=['00FF12','FFFF00']; customTitleArray['littlestwolf']=['00FF12','003399'];
//customTitleArray[username]=[start color, end color];
// no need to edit below
function customSmear() { for (tds=document.getElementsByTagName('td'), d=0; d<tds.length; d++) { if (tds[d].width=='20%' && tds[d].className.match(/windowbg/) && tds[d].vAlign=='top') { for (lnks=tds[d].getElementsByTagName('a'), e=0; e<lnks.length; e++) { if (lnks[e].href.match(/action=viewprofile&user=(.*?)$/)) { //username found var uname=RegExp.$1; if (customTitleArray[uname]) { var stcolor=customTitleArray[uname][0], endcolor=customTitleArray[uname][1]; srch=lnks[e].parentNode.parentNode.getElementsByTagName('img')[0]; while (srch && srch.alt && srch.alt=='*') srch=srch.nextSibling; if (srch && srch.nextSibling.nodeName=='#text') { var ct=srch.nextSibling; var nwct=document.createElement('span'); nwct.innerHTML=colorSmear(stcolor, ct.nodeValue, endcolor); ct.parentNode.replaceChild(nwct, ct); } } } } } } } customSmear();
// --> </script>
|
|
|
Post by Streamstrider on Sept 17, 2011 2:44:12 GMT -8
Tried the code, and it didn't work. This is for the colorsmeared custom title being under the stars, yes?
Profile
|
|
|
Post by Wormopolis on Sept 17, 2011 16:08:08 GMT -8
what is weird.. it isnt even running that script... its skipping the while thing for some reason...
|
|
|
Post by Wormopolis on Sept 17, 2011 16:23:44 GMT -8
ah ok.. recopy. I think I got it.
|
|
|
Post by Streamstrider on Sept 17, 2011 17:29:21 GMT -8
Woot! It's working! Thanks, Wormo!
|
|
sol9999
Not New Member
Posts: 18
sol9999 said 0 great things
|
Post by sol9999 on May 5, 2012 7:53:34 GMT -8
awesome code - used for username - thanks a lot
|
|