|
Post by Wormopolis on May 2, 2009 1:13:37 GMT -8
concept:
|
|
iNsPiRe
Junior Member
Graphics Specialist
Posts: 72
iNsPiRe said 0 great things
|
Post by iNsPiRe on May 12, 2009 4:50:05 GMT -8
Fantastico. Dont forget to let them see your profile to the left has it also!
|
|
|
Post by Silly Test Account on May 17, 2009 1:20:17 GMT -8
testing account with no stars
|
|
|
Post by dave on Nov 21, 2010 7:04:26 GMT -8
Could this code also be modified So that it doesnt stretch the depth of the post And also has a border Basically i want it too look like the one over at Studio Zero<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) var 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.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)); mainrow.cells[0].appendChild(hrbar.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>
|
|
|
Post by Wormopolis on Nov 21, 2010 13:28:20 GMT -8
well the depth of the post isnt going to be able to be saved since the content HAS to have somewhere to be. if you want all those things that are in the mini-profile to still be in there. even the studio zero one stretches the post to accomodate the MP contents.
as for a border, that is doable. you just want a colored line around the table then?
|
|
|
Post by dave on Nov 21, 2010 14:03:01 GMT -8
Yeah please mate Same colours as the forum border
|
|
|
Post by Wormopolis on Nov 21, 2010 15:49:29 GMT -8
right here is where the table is created:
nwtbl=document.createElement('table'); nwtbl.width="100%" nwtbl.style.height="100%"; nwtbl.className=tds.className;
replace it with:
nwtbl=document.createElement('table'); nwtbl.width="100%" nwtbl.style.height="100%"; nwtbl.className='bordercolor'; nwtbd=nwtbl.appendChild(document.createElement('tbody')); nwtbd.className=tds.className;
|
|
|
Post by dave on Nov 22, 2010 8:19:43 GMT -8
|
|
|
Post by Wormopolis on Nov 22, 2010 10:49:59 GMT -8
you have a CSS resize affecting it so we cant go that route.
nwtbl=document.createElement('table'); nwtbl.width="100%" nwtbl.style.height="100%"; nwtbl.style.border="1px solid #94bd63"; nwtbl.className=tds.className;
|
|
|
Post by dave on Nov 22, 2010 11:32:44 GMT -8
Okies ive replaced the code Sorry can we also have an area to display the money code in the mini profile
|
|
|
Post by Wormopolis on Nov 22, 2010 20:59:41 GMT -8
how is th emoney code normally shown? like:
Money: $30 ?
|
|
|
Post by dave on Nov 22, 2010 21:16:44 GMT -8
how is th emoney code normally shown? like: Money: $30 ? Yeah something like that
|
|
|
Post by Wormopolis on Nov 22, 2010 22:17:04 GMT -8
I was thinking of just extracting it from the normal MP like everything else was, but I need to know the syntax of how it shows.
temp disable the MP remodel, and get me a picture of how your money code inserts in the money.
|
|
|
Post by dave on Nov 23, 2010 7:17:32 GMT -8
|
|
|
Post by Wormopolis on Nov 23, 2010 22:55:43 GMT -8
find this for (p=0; p<partsArray.length;p++) { if (partsArray .match(/Joined:/)) jdate=partsArray ; if (partsArray .match(/Gender:/)) gender=partsArray ; if (partsArray .match(/Posts:/)) postcount=partsArray ; if (partsArray .match(/Location:/)) loc=partsArray ; if (partsArray .match(/Karma:/)) karma=partsArray ; }
add in the line before the }
if (partsArray .match(/Money:/)) money=partsArray ;
then right after this:
if (jdate) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=jdate; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); }
add in this:
if (money) { fontholder=document.createElement('font'); fontholder.size=2; fontholder.innerHTML=money; mainrow.cells[0].appendChild(fontholder); mainrow.cells[0].appendChild(brk.cloneNode(true)); }
|
|