|
Reid
|
Jan 23 2010, 01:01 AM
Post #1
|
È una trappola!
- Posts:
- 6,767
- Group:
- Developer
- Member
- #223,645
- Joined:
- October 30, 2006
- I'm Browsing With
- Firefox
|
This topic has been moved from our official support board.
Originally posted by: RedKrazyKid - IPB Profile; Cross-Browser Validated
-
Name: IPB Profile Description: By adding this code to your signature... - Code:
-
[message]TEXT HERE[/message]
...a new profile field is added in the user profile area. Such as showuser=. Not only that, but the message is also shown underneath the post details of the user when viewing a topic. The script is guaranteed to work with Mozilla Firefox, Internet Explorer , and Opera. *You can use an external script, or just paste the whole thing on your board. *Note, all browsers are the current versions of this post, and were running on Windows XP when tested.Preview: http://s14.invisionfree.com/FreeHigh4/index.php?act=idxCode:- Code:
-
<script language="javascript"><!-- function Fixtags(){if(window.location.href.match('act=UserCP&CODE=22')){var x = document.getElementsByTagName('textarea');for(i=0;i<x.length;i++){if(x[i].name == 'Post'){x[i].value=x[i].value.replace('[message]', '[MESSAGE]');x[i].value=x[i].value.replace('[/message]', '[/MESSAGE]');}}}}function AddKarmaStatus(){if(window.location.href.match('act=UserCP&CODE=22')){var x=document.getElementsByTagName('input');for(i=0;i<x.length;i++){if(x[i].value=='Update my Signature'){x[i].onclick = Fixtags;}}}var x = document.getElementsByTagName('div');for(i=0;i<x.length;i++){if(x[i].className == 'signature' && x[i].innerHTML.match('[MESSAGE]') && x[i].innerHTML.match('[/MESSAGE]')){var aSplit = x[i].innerHTML.split('[MESSAGE]');var bSplit = aSplit[1].split('[/MESSAGE]');if(window.location.href.match('showtopic=')){if(navigator.appName=='Microsoft Internet Explorer'){x[i].parentNode.style.height='100%';x[i].parentNode.parentNode.parentNode.rows[1].cells[0].firstChild.innerHTML+=bSplit[0];}else{x[i].parentNode.style.height='100%';x[i].parentNode.parentNode.parentNode.rows[1].cells[0].innerHTML += bSplit[0];}}x[i].innerHTML = x[i].innerHTML.replace('[MESSAGE]', '<span style="display:none">');x[i].innerHTML = x[i].innerHTML.replace('[/MESSAGE]', '</span>');}}if(window.location.href.match('showuser=')){var x = document.getElementsByTagName('table');for(i=0;i<x.length;i++){if(x[i].rows[0].cells[0].innerHTML == 'Information'){x[i].id = 'iTable';}}var x = document.getElementsByTagName('td');for(i=0;i<x.length;i++){if(x[i].innerHTML.match('[MESSAGE]')){var cSplit = x[i].innerHTML.split('[MESSAGE]' && x[i].innerHTML.match('[/MESSAGE]'));var dSplit = cSplit[1].split('[/MESSAGE]');x[i].innerHTML = x[i].innerHTML.replace('[MESSAGE]', '<span id="message" style="display:none">');x[i].innerHTML = x[i].innerHTML.replace('[/MESSAGE]', '</span>');}}var iTable = document.getElementById('iTable');var newRow = iTable.insertRow(5);var newCell = newRow.insertCell(0);var newCell2 = newRow.insertCell(1);newCell2.className='row1';newCell.className='row3';newCell.innerHTML = '<b>Message</b>';newCell2.innerHTML = document.getElementById('message').innerHTML;}}AddKarmaStatus(); //--></script>
If you want the script to be short, use this external script: - Code:
-
<script language="javascript" src="http://i2.ifrm.com/4854/131/upload/p63686.ibf"></script>
|