|
Post by Qwerty333 on Dec 13, 2009 9:40:49 GMT -5
Sounds like a good idea to me.
|
|
|
Post by ONYX on Dec 17, 2009 8:56:16 GMT -5
Why not just troubleshoot the code. Its just a image code. Comeon. Even Monochrome could do it. W00T RIFT. He'd own the code. I dont think you understandhow the code works. When there are 0 stars, the star variable in the miniprofile code goes blank, which is read as a non-established variable, which makes the whole miniprofile get skipped over. So when we had it that the first 3 ranks had 0 stars, anytime there was a thread with someone who had one of those ranks, the miniprofile would not work. And what do you mean, its just an image code? Do you wanna see it? function str_replace (search, replace, subject, count) { var i = 0, j = 0, temp = '', repl = '', sl = 0, fl = 0, f = [].concat(search), r = [].concat(replace), s = subject, ra = r instanceof Array, sa = s instanceof Array; s = [].concat(s); if (count) { this.window[count] = 0; }
for (i=0, sl=s.length; i < sl; i++) { if (s[i] === '') { continue; } for (j=0, fl=f.length; j < fl; j++) { temp = s[i]+''; repl = ra ? (r[j] !== undefined ? r[j] : '') : r[0]; s[i] = (temp).split(f[j]).join(repl); if (count && s[i] !== temp) { this.window[count] += (temp.length-s[i].length)/f[j].length;} } } return sa ? s : s[0]; }
var aTD = document.getElementsByTagName("TD"); if(location.href.match(/action=(display|(user)?recent|view|search2|pmview|calendarview)/i)){ for(a=0;a<aTD.length;a++){ if(aTD[a].width == "20%" && aTD[a].innerHTML.match(/>Posts: ([\d,]+)</i)){ var posts = RegExp.$1; var kar = (aTD[a].innerHTML.match(/>Karma:(.+?)</i)?RegExp.$1:""); var karmalinks = (aTD[a].innerHTML.match(/<br>\[\s(.+?)\s\](<br>|$)/i))? RegExp.$1 : ""; str_replace('[','',karmalinks); str_replace(']','',karmalinks); str_replace('|','',karmalinks); var dnblls = (aTD[a].innerHTML.match(/Dan-Balls:\s(.+?)(<br>|$)/i))? RegExp.$1 : "N/A";
var sp = aTD[a].innerHTML.split(/<br\s?\/?>/i); if(aTD[a].innerHTML.match(/<img.*?><br\s?\/?>(.*?)member is ((<b>)?o(ff|n)line(<\/b>)?)/i)){ var custom = RegExp.$1.toString(); var online2 = "<img src='"+(RegExp.$2.match(/offline/i)?offline:online)+"' />"; }
var lction = (aTD[a].innerHTML.match(/>Location: (.+?)</i)?RegExp.$1:"Undisclosed"); var gndr = (aTD[a].innerHTML.match(/>Gender: ((fe)?male)/i)?(RegExp.$1 == "Female"?female:male):none); var avtr = (aTD[a].innerHTML.match(/center><img(.+?)alt="?\[avatar\]"?(.+?)><br/i)?"<img"+RegExp.$1+"alt='[avatar]'"+RegExp.$2+">":""); var joined = (aTD[a].innerHTML.match(/Joined: ([a-zA-Z0-9 ]+)</i)?RegExp.$1:"Unknown") var prsnltxt = (aTD[a].getElementsByTagName("CENTER")[0].innerHTML.match(/<br\s?\/?><br\s?\/?>(.*?)<br\s?\/?><br\s?\/?>/i)?RegExp.$1:"");
var name = sp[0]; var rnk = sp[1]; var strs = sp[2];
var cntcticns = ""; var x = aTD[a].getElementsByTagName("CENTER")[0].getElementsByTagName("img"); for(b=0;b<x.length;b++){ if(x[b].parentNode.nodeName.toLowerCase() == "a"){ cntcticns += "<a href='"+x[b].parentNode.href+"'>"+x[b].parentNode.innerHTML+"</a> "; } else if(x[b].alt != "[avatar]"){ cntcticns += "<img src='"+x[b].src+"' alt='"+x[b].src+"' /> "; } }
mcode = "<table class='bordercolor' width='150' cellpadding='3' cellspacing='2' style='valign:center;'>"; mcode += "<tr><td align='center' colspan='1' class='titlebg' width='75%'>"+online2+"</td><td align='center' colspan='1' class='titlebg' width='25%'> "+(gndr != ""?"<img src='"+gndr+"' />":"")+"</td></tr>"; mcode += "<tr><td align='center' colspan='2' class='catbg' width='100%'> "+name+" </td></tr>"; mcode += (custom.length >= 1?"<tr><td align='center' colspan='2' class='windowbg' width='100%'> "+custom+" </td></tr>":""); mcode += (karmalinks.length >= 1?"<tr><td align='center' colspan='2' class='windowbg' width='100%'> "+karmalinks+" </td></tr>":""); mcode += "<tr><td align='center' colspan='2' class='windowbg' width='100%'> "+rnk+"<br />"+strs+" </td></tr>"; mcode += (avtr != ""?"<tr><td align='center' colspan='2' class='windowbg' width='100%'> "+avtr+" </td></tr>":""); mcode += (prsnltxt.length >= 1?"<tr><td align='center' colspan='2' class='windowbg' width='100%'> "+prsnltxt+" </td></tr>":""); mcode += "<tr><td align='center' colspan='2' class='windowbg' width='100%'> Posts: "+posts+" <br> Karma: "+kar+"<br>Dan-Balls: "+dnblls+"</td></tr>"; mcode += "<tr><td align='center' colspan='2' class='windowbg' width='100%'> Location: "+lction+"<br> Joined: "+joined+"<br></td></tr>"; mcode += (cntcticns.length >= 1?"<tr><td class='titlebg' colspan='2' align='center' style='height:26px; border: 1px solid #4e240f;'>"+cntcticns+"</td></tr>":"<tr><td class='titlebg' colspan='2' align='center' style='height:26px; border: 1px solid #4e240f;'><img src='http://i50.[tinypic.com]/5ppook.png'></td></tr>"); mcode += "</table>";
aTD[a].align = "center"; aTD[a].innerHTML = mcode; } } }
No dought in my mind. That scares me. Why not just use a small code to post a image of stars in the profile with each rank? Or would that work?
|
|
|
Post by Qwerty on Dec 17, 2009 9:35:37 GMT -5
Hey, if you wanna make a simpler one, go ahead.
|
|
|
Post by Qwerty333 on Dec 17, 2009 13:50:15 GMT -5
We're really going off topic here... should someone lock this?
|
|
|
Post by GGoodie on Dec 17, 2009 17:52:03 GMT -5
Not until this is finished. (in proboards 5 thats coming soon, you can actually make a topic based off a post in another one (for off-topicness)
@ Blair. No. That would take even more coding than what is happening now. Right now, its just taking what is already in the miniprofile, making it into various variables, then putting those variables into the tables, then making the tables replace what used to be there.
|
|
|
Post by Qwerty on Dec 17, 2009 18:20:28 GMT -5
Ggoodie, I think there's a code to do that, too.
|
|
|
Post by Qwerty333 on Dec 17, 2009 18:48:45 GMT -5
Not until this is finished. (in proboards 5 thats coming soon, you can actually make a topic based off a post in another one (for off-topicness). Yeah, heard about that... sounds cool.
|
|