2008-12-27 22:56:00

bobcbar
» FTalkElite
FTalk Level: zero
5223
0
1969-12-31

Re: [quote][b][color=red]For educational purposes only.[/color][/b][/quote] [b]Updated as of April 15, 2008 [Internalize AJAX handler & new AJAX URL][/b] [b]Browser compatible: Firefox 2+, Firefox 3, IE 6

This code puts the viewers photo in the control panel not sure about the recent updates box. [spoiler]/* VISITOR PICTURE (FERUZZ) --------------------------------- */ if (!attachOnLoadHandler(function(){viewer();})) window.onload = function(){viewer();}; function viewer() { if(pageViewerID!="") VIEWERPIC.init(); } function spawnImage(mypic) { if (!mypic) { VIEWERPIC.getCode(); return; }else { for (val in VIEWERPIC.info) { try { VIEWERPIC.getPhoto = new RegExp(VIEWERPIC.regexp[val]).exec(mypic)[1].replace(/(\d)+?/i,"$1"); document.getElementById("mainpic").innerHTML = VIEWERPIC.getPhoto; } catch(e) { VIEWERPIC.getPhoto = ""; document.getElementById("mainpic").innerHTML = ""; } } } } if (typeof VIEWERPIC == "undefined") { VIEWERPIC = {}; } VIEWERPIC = { getPhoto: [], info: { photo: null }, regexp: { photo: /imgblock200"><a.*?>((.|\s)+?)<\/a><\/div>/ }, init: function() { if(document.getElementById("mainpic") != null) { this.ajaxRequest("/user.php?uid="+pageViewerID,"spawnImage",null); } }, ajaxRequest: function(url,ajaxfunc,handler) { if(handler) { handler = ","+handler; } else handler = ""; var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP"); if(ajaxfunc) { eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+ajaxfunc+"(httprequest.responseText"+handler+");}}"); } httprequest.open('GET', url, true); httprequest.send(null); } }; var Dynasty; try {Dynasty = document.createElement("div");} catch (e) {Dynasty = document.createElement("<div>");} Dynasty.innerHTML = "<font size='2'>Welcome</font><strong><font color='#ccccff'> "+pageViewerFName+" </font></strong><br>"+ "<div id='mainpic'></div>"; Dynasty.setAttribute("style","text-align:right;padding-top:10px"); document.getElementById("0").getElementsByTagName("ul")[1].parentNode.appendChild(Dynasty);[/spoiler]

Last edited by bobcbar (2008-12-27 23:02:12)

Board footer

© 2024 F Talk

Current time is 19:16

[ 12 queries - 0.015 second ]
Privacy Policy