|
Post by Wormopolis on Oct 15, 2010 23:57:04 GMT -8
Browser Tested: IE and FF and Chrome placement: Global footer
this code will make the IP addresses at the bottom of each post, and in someone's profile clickable and will take you to whatismyipaddress.com or stopforumspam.com as a query.
code:
<script type="text/javascript"> <!-- // IP lookup v1.9 // by Wormopolis -www.wormocodes.com // Do not repost - keep header intact
//choose one of these lookup sites: var lookupSite1="http://whatismyipaddress.com/ip/"; //site 1 var lookupSite2="http://www.stopforumspam.com/ipcheck/"; //site 2
var lookupSiteChoice=lookupSite2; //change this variable to the site you wish
//popWindow function modded from proboards function popWindow2(x){ var xWin = window.open("index.cgi?action="+x,"popWindow","directories=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0,top=100,left=100,width=400,height=500"); xWin.focus();
function IPtransform() { // if (pb_username=='admin') alert(xWin.document.getElementsByTagName('font').length); for (fnt=xWin.document.getElementsByTagName('font'), ff=0; ff<fnt.length; ff++) { if (fnt[ff].size=='2' && !fnt[ff].innerHTML.match(/center/i) && fnt[ff].innerHTML.match(/(\d+\.\d+\.\d+\.\d+)/)) {getIPLook(fnt[ff]);} } }
window.setTimeout(IPtransform,1000); }
function getIPLook(fnt) { if (fnt.innerHTML.match(/(\d+\.\d+\.\d+\.\d+)/)) { var res=RegExp.$1; var nwlnk=document.createElement('a'); nwlnk.href="http://whatismyipaddress.com/ip/"+res; nwlnk.target="_blank"; nwlnk.innerHTML=res; nwspn=document.createElement('span'); nwspn.appendChild(nwlnk); fnt.innerHTML=nwspn.innerHTML; } }
if (pb_action=='home') { for (lnks=document.getElementsByTagName('a'), ll=lnks.length-1; ll>0; ll--) { if (lnks[ll].href.match(/popWindow/)) lnks[ll].href=lnks[ll].href.replace(/popWindow/,'popWindow2'); } }
if (pb_action.match(/display|viewprofile|search2/)) { for (tds=document.getElementsByTagName('td'), tt=0; tt<tds.length; tt++) { if (tds[tt].previousSibling && tds[tt].previousSibling.width=='25%' && tds[tt].firstChild && tds[tt].firstChild.nodeName.match(/font/i) && tds[tt].firstChild.size && tds[tt].firstChild.size=='2' && tds[tt].firstChild.innerHTML.match(/(\d+\.\d+\.\d+\.\d+)/)) { var res=RegExp.$1; var nwlnk=document.createElement('a'); nwlnk.href=lookupSiteChoice+res; nwlnk.target="_blank"; nwlnk.innerHTML=res; tds[tt].firstChild.replaceChild(nwlnk, tds[tt].firstChild.firstChild); } if (tds[tt].width=='80%' && tds[tt].className.match(/windowbg/) && tds[tt].vAlign=='top') { for (fnt=tds[tt].getElementsByTagName('font'), ff=0; ff<fnt.length; ff++) { if (fnt[ff].size=='1' && fnt[ff].innerHTML.match(/ip\.(png|gif)/) && fnt[ff].innerHTML.match(/(\d+\.\d+\.\d+\.\d+)/)) { var res=RegExp.$1; var nwlnk=document.createElement('a'); nwlnk.href=lookupSiteChoice+res; nwlnk.target="_blank"; nwlnk.innerHTML=res; fnt[ff].replaceChild(nwlnk, fnt[ff].firstChild.nextSibling); } } } } }
//--> </script>
|
|
|
Post by rhondairv on Oct 20, 2010 9:25:12 GMT -8
love this!!
|
|
|
Post by Wormopolis on Oct 20, 2010 9:50:59 GMT -8
<-- has a desire for Columbian coffee...
|
|
|
Post by rhondairv on Oct 20, 2010 13:40:11 GMT -8
I'll have to pick up a jar of Jaun Valdez and when i get back to the states send ya some.
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 1, 2010 14:37:02 GMT -8
Interesting code Wormo! Too bad ProBoards doesn't give you details of the admin account.
|
|
|
Post by Wormopolis on Nov 1, 2010 21:18:26 GMT -8
well I KNOW my IP (actually currently I dont because Im in a hotel in Colorado), but if you put it on your own forum it should let you see.
I used whatismyipaddress.com because it seemed like a good one. I dont think any of them are 100% accurate. but that one will at least tell you if the IP is a proxy or has been put on a blacklist.
|
|
rita
Not New Member
Posts: 36
rita said 0 great things
|
Post by rita on May 24, 2011 8:03:41 GMT -8
Great code Wormo, I'll be adding that for sure.
|
|
|
Post by Wormopolis on Jan 27, 2012 21:47:08 GMT -8
version update 1.5: now adds links into guest popups. tested in IE FF and chrome. no guarantees.
|
|
|
Post by Wormopolis on Jul 15, 2012 22:48:14 GMT -8
version update 1.9: added in ability to lookup on stopforumspam.com
|
|