2008-06-18 16:06:11

nopathz
» FTalkGeek
FTalk Level: zero
1256
0
1969-12-31

Re: [align=justify][b]bagi member yang ingin bertanya seputar tweaking FS, silahkan bertanya dan posting disini, tapi jangan lupa,,sebelum itu tolong [url=http://theftalk.com/t2744-%5BImportant%5D-

[quote=decky]wedew !!! koq gag ada yg jwb pertanyaan saiia...:crybaby: tolong bantu dong bro skalian... plisssssss....:crybaby::crybaby: udah 3x gw tanya tapi dicuekin trus nih.. cara ngeshake foto viewer d wiwtm ama side viewer gmn yaa ?? nie scriptnya :[/quote] coba ganti dengan yang ini bro .. [spoiler]SPAWNPIC = {}; if (!attachOnLoadHandler(function() { SPAWNPIC.init(); })) window.onload = function() { SPAWNPIC.init(); }; (function() { SPAWNPIC = { // private property photo: null, info: { name: null, photo: null, gender: null, age: null, status: null, location: null, seek: null, since: null }, regexp: { name: /controlpanel_header">([\S\s]*?)<a\s*name="controlpanel/i, photo: /imgblock200"><a[\S\s]*?>([\S\s]*?)<\/a><\/div>/i, gender: /q">([\S]*male)/i, age: /male,\s*([\d]*),/i, status: /male,\s*[\d]*,\s*([\S\s]*?)<\/span>/i, location: /Location\:\s*<\/span><a[\S\s]*?>([\S\s]*?)<\/a><\/li>/i, seek: /Interested\s*In\:\s*<\/span>([\S\s]*?)<\/li>/i, since: /Member\s*Since\:\s*<\/span>([\w]*?[\s][\d]*?)<\/li>/i }, init: function() { try { ajaxRequest("GET", "http://" + location.hostname + "/" + pageViewerID, true, null, SPAWNPIC.viewer, null); } catch(e) {} }, viewer: function(mypic) { if (mypic.replace(/^\s*|\s*$/g, "") === "") { alert("VMP Error: Unable to parse user details!"); return; } else if (mypic) { for (var val in SPAWNPIC.info) { try { SPAWNPIC.info[val] = new RegExp(SPAWNPIC.regexp[val]).exec(mypic)[1].replace(/^(\d)$/, "0$1"); } catch(e) { SPAWNPIC.info[val] = ""; } } if (SPAWNPIC.info.seek === "") { SPAWNPIC.info.seek = "Just looking around"; } SPAWNPIC.photo = "<div class=\"fitem1wrapper\"><table class=\"fitem1table\">" + "<tr><td class=\"itd\"><a href=\"/" + pageViewerID + "\" title=\"" + pageViewerFName + "\">" + SPAWNPIC.info.photo.replace(/<img /gi, "<img class=\"shakeimage\" onMouseover=\"initshake(this);rattleimage()\" onMouseout=\"stoprattle(this);top.focus()\" onClick=\"top.focus()\" width=\"100\" height=\"100\" ") + "</a></td>" + "<td class=\"dtd\"><ul class=\"data\"><div class=\"title\">" + "<li><a href=\"/" + pageViewerID + "\">" + SPAWNPIC.info.name + "</a><br>" + pageViewerID.replace(/^\s*[\d]*?/gi, "Friendster ID: ") + "<br>" + SPAWNPIC.info.gender + ", " + SPAWNPIC.info.age + ", " + SPAWNPIC.info.status.replace(/<[\S]*?>/g, "") + "<br>" + SPAWNPIC.info.seek.replace(/^\s*[\S\s]*?/gi, "Interested In: ") + "<br>" + SPAWNPIC.info.since.replace(/^\s*[\w]*?/gi, "Member Since: ") + "<br>" + SPAWNPIC.info.location.replace(/^\s*[\S\s]*?/gi, "Location: ") + "</li>" + "</div></ul></td></tr></table></div>"; addBox("LEFT","<a href=\"#\" onClick=\"show_hide('content_spawnpic'); blur(); return false\"><div>Hello "+pageViewerFName+"</div></a>",SPAWNPIC.photo,"spawnpic","0"); show_hide("content_spawnpic"); } } }; })(); /* Viewer's Main Photo at WIWTM Internalize AJAX handler Author: FeRuZZ © http://profiles.friendster.com/feruzz No warranty expressed or implied. Use at your own risk. */ /*global VIEWERPIC*/ VIEWERPIC = {}; (function() { VIEWERPIC = { // private property photo: null, init: function() { if (pageViewerID !== "") { try { ajaxRequest("GET", "http://" + location.hostname + "/" + pageViewerID, true, null, VIEWERPIC.viewer, null); }catch(e) {} } }, viewer: function(htm) { htm = htm.slice(htm.indexOf("<div class=\"imgblock200\">")+0, htm.indexOf("<ul id=\"controlPanelButtons\">")+0); htm = htm.slice(htm.indexOf("<img src=\"")+10, htm.indexOf("\"></a></div>")+0); VIEWERPIC.photo = document.createElement("div"); VIEWERPIC.photo.align = "center"; VIEWERPIC.photo.appendChild(document.createElement("a")); VIEWERPIC.photo.getElementsByTagName("a")[0].href = "/" + pageViewerID; VIEWERPIC.photo.getElementsByTagName("a")[0].target = "_blank"; VIEWERPIC.photo.getElementsByTagName("a")[0].title = pageViewerFName; VIEWERPIC.photo.getElementsByTagName("a")[0].innerHTML="<img src='"+htm+"' class='shakeimage' onMouseover='initshake(this);rattleimage()' onMouseout='stoprattle(this);top.focus()' onClick='top.focus()'>"; VIEWERPIC.photo.appendChild(document.createElement("br")); VIEWERPIC.photo.appendChild(document.createElement("span")); VIEWERPIC.photo.getElementsByTagName("span")[0].className = "q"; VIEWERPIC.photo.getElementsByTagName("span")[0].appendChild(document.createElement("a")); VIEWERPIC.photo.getElementsByTagName("a")[1].href = "/" + pageViewerID; VIEWERPIC.photo.getElementsByTagName("a")[1].target = "_blank"; VIEWERPIC.photo.getElementsByTagName("a")[1].title = pageViewerFName; VIEWERPIC.photo.getElementsByTagName("a")[1].innerHTML = pageViewerFName; document.getElementById("viewerpic").appendChild(VIEWERPIC.photo); } }; })(); VIEWERPIC.init(); function ajaxRequest(type, url, async, param, func, handlerparam) { /** * ajaxRequest - You may not remove or change this notice. * version: 2.4 * Copyright 2008 by FeRuZZ © http://profiles.friendster.com/feruzz. * * @type: "GET" | "POST" * @async: true | false * @param: string | null * @func: string | null * @handlerparam: string | null **/ var httprequest = null; var requestDone = false; var data = null; var responseType = "text"; var timeout = 0; var ival = null; var onreadystatechange = {}; var msxml = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"]; for (var x = 0, len = msxml.length; x < len; x++) { try { httprequest = window.ActiveXObject ? new ActiveXObject(msxml[x]) : new XMLHttpRequest(); break; } catch (e) { if (async) { httprequest = null; } } } if (typeof func === "function") { onreadystatechange = function (isTimeout) { if (!requestDone && httprequest && (httprequest.readyState === 4 || isTimeout === "timeout")) { requestDone = true; if (ival) { window.clearInterval(ival); ival = null; } if (!httprequest.status && location.protocol === "file:" || (httprequest.status >= 200 && httprequest.status < 300) || httprequest.status === 304 || httprequest.status === 1223) { var resPonse = (/xml/i.test(responseType))? httprequest.responseXML : httprequest.responseText; func(resPonse.replace(new RegExp("<script[^>]*>.*?<\/script>", "gi"), ""), handlerparam); } } }; } if (async) { ival = window.setInterval(onreadystatechange, 13); if (timeout > 0) { window.setTimeout(function () { if (httprequest) { httprequest.abort(); if (!requestDone) { onreadystatechange("timeout"); } } }, timeout); } } if (type === "GET" && (/GET/i.test(type))) { var ts = (new Date()).getTime(); var ret = url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); url = ret + ((ret === url) ? (url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); } if (data && type === "GET" && (/GET/i.test(type))) { url += (url.match(/\?/) ? "&" : "?") + data; data = null; } if (type === "POST" && (/POST/i.test(type))) { var headers = "application/x-www-form-urlencoded" + ("UTF-8" ? "; charset=" + "UTF-8" : ""); var contentLength = param ? param.length: 0; try { httprequest.setRequestHeader("Content-type", headers); httprequest.setRequestHeader("Content-length", contentLength); if (httprequest.overrideMimeType && (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0, 2005])[1] < 2005) { httprequest.setRequestHeader("Connection", "close"); } } catch (err) {} } httprequest.open(type, url, async); httprequest.setRequestHeader("ajaxRequest", "true"); httprequest.setRequestHeader("X-Requested-With", "XMLHttpRequest"); httprequest.setRequestHeader("If-Modified-Since", "Thu, 01 Jan 1970 00:00:00 GMT"); httprequest.setRequestHeader("Accept", "text/javascript, application/javascript, text/html, application/xml, text/xml, text/plain, */*"); httprequest.send(param); if (!async) { onreadystatechange(); } }[/spoiler] bro blum punya script shakeimage ya? tambahin ini di bagian C [spoiler]/**************************************** Shake image script (onMouseover)- © Dynamic Drive (www.dynamicdrive.com) For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com *****************************************/ //configure shake degree (where larger # equals greater shake) var rector=3 ///////DONE EDITTING/////////// var stopit=0 var a=1 function initshake(which){ stopit=0 shake=which shake.style.left=0 shake.style.top=0 } function rattleimage(){ if ((!document.all&&!document.getElementById)||stopit==1) return if (a==1){ shake.style.top=parseInt(shake.style.top)+rector } else if (a==2){ shake.style.left=parseInt(shake.style.left)+rector } else if (a==3){ shake.style.top=parseInt(shake.style.top)-rector } else{ shake.style.left=parseInt(shake.style.left)-rector } if (a<4) a++ else a=1 setTimeout("rattleimage()",50) } function stoprattle(which){ stopit=1 which.style.left=0 which.style.top=0 }[/spoiler] trus tambahin ini di css nya : [quote].shakeimage{ position:relative; }[/quote]

Last edited by nopathz (2008-06-18 17:46:25)

Board footer

© 2024 F Talk

Current time is 08:33

[ 12 queries - 0.511 second ]
Privacy Policy