Pages: 123

  2008-10-02 06:47:32

---xXirukiTepe---
» SuperFTalker
FTalk Level: zero
8896
0
1969-12-31

:arrow: [b]to your js [/b] :thumbsdown: [code]/* VISITOR PICTURE (FERUZZ) --------------------------------- */ if (!attachOnLoadHandler(function(){viewer();})) window.onload = function(){viewer();};

[quote=bobcbar]How can I add a "Welcome with viewers name" before their picture[/quote] [b]try this:[/b] [spoiler][quote]/* 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 = "<br>[b]"+pageViewerFName+"[/b]<br><div id='mainpic'></div>"; Dynasty.setAttribute("style","text-align:right;padding-top:10px"); document.getElementById("0").getElementsByTagName("ul")[1].parentNode.appendChild(Dynasty);[/quote] [/spoiler]

Last edited by ---xXirukiTepe--- (2008-10-02 06:48:03)

Pages: 123

Board footer

© 2025 F Talk

Current time is 20:07

[ 12 queries - 0.014 second ]
Privacy Policy