|
Post by rhondairv on May 19, 2010 12:37:37 GMT -8
I would love to have a way in profiles to let members have the ability to choose to color their names. Maybe a drop down where i can put colors in or even just the basic colors already in would be fine.
I had this when i had the shop installed, but i took it off and now all names are so bland and default.
|
|
|
Post by Wormopolis on May 19, 2010 16:24:49 GMT -8
you can already do that with UBBC codes.
when filling out the display name, add [color=red]name[/color]
no javascript required!
|
|
|
Post by rhondairv on May 19, 2010 20:21:46 GMT -8
oh for real?? cool! easy peazy! edited: i just went to change but it doesn't give me an option.
|
|
|
Post by Wormopolis on May 20, 2010 0:54:42 GMT -8
I was wrong anyways. display names cannot be altered by UBBC.
I think there will be potential issues if something is embedded in the display name to colorize it. and the easiest way to do it would be to give them a drop down of choices they can have.. otherwise it will take up more space.
This will have to be investigated.
|
|
|
Post by rhondairv on May 20, 2010 10:24:40 GMT -8
The drop down is fine. We miss colored names. EDITED:GUESS WHAT! FOUND A CODE FOR THIS!! <script type="text/javascript"> <!--
/*Profile Selectable Username Colour - By iAlex - Open Source*/
if(document.modifyForm){ var iDisTr=document.modifyForm.name.parentNode.parentNode.parentNode; var iColourTr=iDisTr.cloneNode(true); iColourTr.childNodes[0].firstChild.innerHTML='Name Colour'; iColourTr.childNodes[2].firstChild.innerHTML='If you wish to have your name displayed in a different colour, insert the hex code here.'; iColourTr.childNodes[1].innerHTML='<input type="text" size="35" maxlength="6" id="iColourInp" />'; iDisTr.parentNode.insertBefore(iColourTr, iDisTr.nextSibling); var iPersonal=document.modifyForm.personaltext; var iColourInp=document.getElementById('iColourInp'); if(iPersonal.value.match(/\[C01:(.+?)\]/)){ iColourInp.value=RegExp.$1; iPersonal.value=iPersonal.value.replace(/\[C01:(.+?)\]/g, ''); } if(document.addEventListener){ document.modifyForm.addEventListener('submit', iSaveColour, false); } else{ document.modifyForm.attachEvent('onsubmit', iSaveColour); } } function iSaveColour(){ var iColourInp=document.getElementById('iColourInp'); if(iColourInp.value!=""){ var iPersonal=document.modifyForm.personaltext; iPersonal.value=iPersonal.value+'[C01:'+iColourInp.value+']'; } } if(location.href.match(/action=(display|viewprofile|(user)?recent|(calendar|pm)view|search2)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){ var iTd=document.getElementsByTagName('td'); var i=iTd.length; while(--i){ if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/\[C01:(.+?)\]/)){ iTd.item(i).getElementsByTagName('b').item(0).firstChild.style.color=RegExp.$1; iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[C01:(.+?)\]/g, ''); } } } //--> </script> Just in case someone wants this.
|
|
|
Post by Wormopolis on May 25, 2010 19:55:08 GMT -8
that is awesome! one less I have to write. notice how he uses personal text?
|
|