|
Post by Wormopolis on Oct 10, 2011 17:54:47 GMT -8
warning meter?
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Oct 10, 2011 19:50:32 GMT -8
Yes if you click the link i gave you on my previous post you can see the Warning meter is at the bottom of the mini profile
|
|
|
Post by Wormopolis on Oct 10, 2011 21:15:27 GMT -8
oh THATS what that is... lemme see what I can do
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Oct 10, 2011 23:11:19 GMT -8
Ok cheers wormo
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Oct 12, 2011 9:39:02 GMT -8
Any updates on this mate
|
|
|
Post by Wormopolis on Oct 12, 2011 21:59:35 GMT -8
I been swamped at work. Im looking at it now though.
|
|
|
Post by Wormopolis on Oct 12, 2011 22:35:45 GMT -8
ok...
find these 2 lines
a=td.innerHTML.match(/(Warning: \d*%(<\/.>)?(<br>)?)/i); td.innerHTML=td.innerHTML.replace(a[0],a[0]+"<table style=\"border-width:1px; border-style: solid; border-color:"+meterBorderColor+"\" cellpadding=0 cellspacing=0 width=100%><tr><td"+meterBGColor+" width="+p+"% height="+meterHeight+" class=warningmeter></td><td width="+(100-p)+"%></td></tr></table>");
replace with
if (td.innerHTML.match(/(Warning: (\d*%)(<\/.>)?(<br>)?)/i)) { td.innerHTML=td.innerHTML.replace(/(Warning: (\d*%)(<\/.>)?(<br>)?)/i, function(wt, perc, et, brt) {return wt+"<table style=\"border-width:1px; border-style: solid; border-color:"+meterBorderColor+"\" cellpadding=0 cellspacing=0 width=100%><tr><td"+meterBGColor+" width="+p+"% height="+meterHeight+" class=warningmeter></td><td width="+(100-p)+"%></td></tr></table>"); }
see what that does to start
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Oct 13, 2011 6:17:04 GMT -8
Ok done that It hasnt moved
|
|
|
Post by Wormopolis on Oct 13, 2011 16:40:21 GMT -8
actually... the warning meter code isnt actually running at all. the little red bar you see down there is the normal bar for warnings.
the MP remodel doesnt have anything in it for warning support. its assuming the warning text IS your custom title and forcing the bar to the bottom.
this is gonna take a bit to figure out how to have it sperate out everything. there are so many combinations of what appears in the MP that it makes it hard to tell it what is what.
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Oct 13, 2011 21:21:09 GMT -8
Oh ok lol cheers mate
|
|
|
Post by Wormopolis on Oct 20, 2011 17:21:51 GMT -8
try this
<script type="text/javascript"> // viper MP // concept by viper // coding by Wormopolis - wormocodes.proboards.com // do not repost - keep header intact
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds[i].width=="20%" && tds[i].align=="left" && tds[i].vAlign=="top" && tds[i].className.match(/windowbg/)) { // get parts uname=avpic=rname=jdate=rImgs=gender=karma = ptext=loc=postcount=ctitle=contactstuff=status=""; partsArray=tds[i].innerHTML.split(/<br>/i); uname=partsArray[0]; rname=partsArray[1]; if (rname!="Guest") { rImgs=partsArray[2]; if (rImgs.match(/member is/)) { var status=rImgs; rImgs=""; partsArray[3]=partsArray[2]; } ctitle=partsArray[3]; if (ctitle.match(/member is/)) { var status=ctitle; ctitle=""; } else { if (status.match(/warning/)) { warntext=partsArray[3]; warnbar=partsArray[4]; ctitle=partsArray[5]; status=partsArray[6]; } else { status=partsArray[4]; } }
avsectionstuff=tds[i].getElementsByTagName('center')[0]; for (p=0; p<partsArray.length;p++) { if (partsArray[p].match(/Joined:/)) jdate=partsArray[p]; if (partsArray[p].match(/Gender:/)) gender=partsArray[p]; if (partsArray[p].match(/Posts:/)) postcount=partsArray[p]; if (partsArray[p].match(/Location:/)) loc=partsArray[p]; if (partsArray[p].match(/Karma:/)) karma=partsArray[p]; } if (avsectionstuff.getElementsByTagName('img')[0] && avsectionstuff.getElementsByTagName('img')[0].alt=="[avatar]") avpic = avsectionstuff.getElementsByTagName('img')[0] if (avsectionstuff.childNodes[3] && avsectionstuff.childNodes[3].nodeName=="#text") ptext = avsectionstuff.childNodes[3].nodeValue; var contactstuff=document.createElement('span'); for (cntcts=avsectionstuff.getElementsByTagName('a'), cnt=cntcts.length-1; cnt>=0; cnt--) { contactstuff.appendChild(cntcts[cnt]); } } nwtbl=document.createElement('table'); nwtbl.width="100%" nwtbl.style.height="100%"; nwtbl.className=tds[i].className; topmrgnrow=nwtbl.insertRow(0); mainrow=nwtbl.insertRow(-1); bottommrgnrow=nwtbl.insertRow(-1); topmrgnrow.style.height=30; topmrgnrow.vAlign="middle"; unamecell=topmrgnrow.insertCell(0); unamecell.align="center"; fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=uname; unamecell.appendChild(fontholder); unamecell.appendChild(document.createElement('hr')); unamecell.className="mptopcell"; mainrow.align="center"; mainrow.insertCell(0); mainrow.cells[0].style.verticalAlign="top"; brk=document.createElement('br'); hrbar=document.createElement('hr'); hrbar.style.width="80%"; if (avpic) { mainrow.cells[0].appendChild(avpic); mainrow.cells[0].appendChild(brk.cloneNode(true)); } if (warntext) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=warntext; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=warnbar; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); } if (ctitle) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=ctitle; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); }
mainrow.cells[0].appendChild(hrbar.cloneNode(true));
if (rname) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=rname; mainrow.cells[0].appendChild(fontholder); if (rImgs) { mainrow.cells[0].appendChild(brk.cloneNode(true)); fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=rImgs; mainrow.cells[0].appendChild(fontholder); } if (ptext) { mainrow.cells[0].appendChild(brk.cloneNode(true)); fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=ptext; mainrow.cells[0].appendChild(fontholder); } mainrow.cells[0].appendChild(brk.cloneNode(true)); mainrow.cells[0].appendChild(hrbar.cloneNode(true)); } if (contactstuff.firstChild) { mainrow.cells[0].appendChild(contactstuff); mainrow.cells[0].appendChild(brk.cloneNode(true)); mainrow.cells[0].appendChild(hrbar.cloneNode(true)); } if (postcount) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=postcount; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); } if (karma) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=karma; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); } if (gender) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=gender; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); } if (loc) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=loc; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); } if (jdate) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=jdate; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); } bottommrgnrow.style.height=30; bottommrgnrow.vAlign="middle"; statuscell=bottommrgnrow.insertCell(0); statuscell.align="left"; fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=status; statuscell.appendChild(fontholder); statuscell.className="mpbottomcell"; nwcl=document.createElement('td'); nwcl.appendChild(nwtbl); nwcl.width="20%"; nwcl.className="mptable"; tds[i].style.display="none"; tds[i].parentNode.insertBefore(nwcl, tds[i].nextSibling); } } </script>
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Nov 2, 2011 1:50:18 GMT -8
|
|
|
Post by Wormopolis on Nov 4, 2011 22:31:13 GMT -8
dammit.. I was almost certain that would grab it...
|
|
|
Post by Wormopolis on Nov 4, 2011 22:37:02 GMT -8
change this
uname=avpic=rname=jdate=rImgs=gender=karma = ptext=loc=postcount=ctitle=contactstuff=status="";
to this var uname, avpic, rname, jdate, rImgs, gender, karma, ptext, loc, postcount, ctitle, contactstuff, status, warntext, warnbar; uname=avpic=rname=jdate=rImgs=gender=karma=ptext = ''; loc=postcount=ctitle=contactstuff=status=warntext=warnbar="";
|
|
Deleted
Posts: 0
Deleted said great things
|
Post by Deleted on Nov 18, 2011 5:33:00 GMT -8
Sorry for the delay been a little busy Ok ive changed that bit and the warn bar still shows at the bottom
|
|