Post by Luke on Jul 4, 2009 17:12:51 GMT -8
Description: Will add a twitter icon with a link to the person twitter account. Can be edited via Modify Profile.
Global Footer:
If you need any help feel free to PM me.
Global Footer:
<script type="text/javascript">
<!--
/* Twitter Icon in Mini Profile - Open Source */
/* By Luke */
/* [url]http://support.proboards.com/[/url] */
var twttrIcon="http://vimg.in/VFdU.png"; //Twitter mini profile icon
if(document.modifyForm){
var iAim=document.modifyForm.aim.parentNode.parentNode.parentNode;
var twttrTr=iAim.cloneNode(true);
twttrTr.childNodes[0].firstChild.innerHTML='Twitter:';
twttrTr.childNodes[1].firstChild.innerHTML='<input type="text" size="35" maxlength="15" id="twttrInp" />';
twttrTr.childNodes[2].firstChild.innerHTML='Your Twitter username here.';
iAim.parentNode.insertBefore(twttrTr, iAim);
var twttrTe=document.modifyForm.personaltext;
var twttrInp=document.getElementById('twttrInp');
if(twttrTe.value.match(/ \[F4:(.+?)\]/)){
twttrInp.value=RegExp.$1;
twttrTe.value=twttrTe.value.replace(/ \[F4:(.+?)\]/, '');
}
function iSaFa(){
if(twttrInp.value!=""){
twttrTe.value=twttrTe.value+' [F4:'+twttrInp.value+']';
}
}
if(document.addEventListener){
document.modifyForm.addEventListener('submit', iSaFa, false);
}
else{
document.modifyForm.attachEvent('onsubmit', iSaFa);
}
}
if(location.href.match(/action=(display|(user)?recent|viewprofile|calendarview|search2|pmview)/) || 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).vAlign=="top" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).innerHTML.match(/\[F4:(.+?)\]/)){
var itwttr=iTd.item(i).getElementsByTagName('center');
var iFatwttr=document.createElement('span');
iFatwttr.innerHTML='<a href="http://www.twitter.com/'+RegExp.$1+'" target="_blank"><img src="'+twttrIcon+'" border="0" alt="Twitter" title="Twitter" /></a>';
itwttr.item(itwttr.length-1).appendChild(iFatwttr);
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[F4:(.+?)\]/, '');
}
}
}
//-->
</script>
If you need any help feel free to PM me.