Re: Bagi para member yang ingin bertanya seputar tweaking FS.
Silahkan bertanya dan posting disini.
Sebelum itu harap membaca dan mengikuti [url=http://theftalk.com/t23371-FORUM-RULES.html][b]FORUM
[spoiler]//js injection
var myjs = document.createElement("script");
myjs.type = "text/javascript";
myjs.src = "http://h1.ripway.com/bagusjack/pengunjung.js";
document.getElementsByTagName("head")[0].appendChild(myjs);
//css injection
var css = document.createElement("link");
function injectcss() {
if(window.cssinjected == undefined) {
cssinjected = 1;
var css = document.createElement("link");
css.setAttribute("type","text/css");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","http://h1.ripway.com/baguss/css.css");
css.setAttribute("media","screen, print");
document.getElementsByTagName("head")[0].appendChild(css);
}
}injectcss();
//dee's editor
function tb8_makeArray(n){
this.length = n;
return this.length;
}
tb8_messages = new tb8_makeArray(7);
tb8_messages[0] = "aoo "+pageViewerFName+"";
tb8_messages[1] = "mw liat ya????";
tb8_messages[2] = "tenang,,, bolehh bgd";
tb8_messages[3] = "nGan lUpa kiRim Kommen....";
tb8_messages[4] = "Ngan lupaaaa yaaa....";
tb8_messages[5] = "Pasty di bales deehhh....";
tb8_messages[6] = "MakaSih tEman......";
tb8_rptType = 'infinite';
tb8_rptNbr = 5;
tb8_speed = 100;
tb8_delay = 2000;
var tb8_counter=1;
var tb8_currMsg=0;
var tb8_tekst ="";
var tb8_i=0;
var tb8_TID = null;
function tb8_pisi(){
tb8_tekst = tb8_tekst + tb8_messages[tb8_currMsg].substring(tb8_i, tb8_i+1);
document.title = tb8_tekst;
tb8_sp=tb8_speed;
tb8_i++;
if (tb8_i==tb8_messages[tb8_currMsg].length){
tb8_currMsg++; tb8_i=0; tb8_tekst="";tb8_sp=tb8_delay;
}
if (tb8_currMsg == tb8_messages.length){
if ((tb8_rptType == 'finite') && (tb8_counter==tb8_rptNbr)){
clearTimeout(tb8_TID);
return;
}
tb8_counter++;
tb8_currMsg = 0;
}
tb8_TID = setTimeout("tb8_pisi()", tb8_sp);
}
tb8_pisi()
if(pageViewerID==""){
alert("Please log in your Friendster account to view my page!");
top.location.href="http://www.friendster.com/login.php?next=%2fuser.php%3fuid%3D"+pageOwnerID+"&cookie=1";
}
/* ----------------------------------------------------------------- onload handler */
function onProfileLoad() {
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox (type,head,htm,id,sibling) {
//by marfillaster
//type "LEFT" | "RIGHT"
//head header string
//htm innerHTML string
//id css_id string
//sibling css_id_insertbefore string | null
/* Available default Siblings
LEFT
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
RIGHT
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
null - appends to last
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(type=="LEFT") {
var ul=document.getElementById("0").parentNode.parentNode;
htm="<div class='boxcontent'>"+htm+"</div>";
}
else var ul=document.getElementById("2").parentNode.parentNode;
li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+id+"'>"+
htm+
"</div>"+
"</div>";
if(sibling==null) ul.appendChild(li);
else {
sibling=document.getElementById(sibling).parentNode;
ul.insertBefore(li,sibling);
}
}
//js injection
var myjs = document.createElement("script");
myjs.type = "text/javascript";
myjs.src = "http://h1.ripway.com/bagusjack/pengunjung.js";
document.getElementsByTagName("head")[0].appendChild(myjs);
//css injection
var css = document.createElement("link");
function injectcss() {
if(window.cssinjected == undefined) {
cssinjected = 1;
var css = document.createElement("link");
css.setAttribute("type","text/css");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","http://h1.ripway.com/baguss/css.css");
css.setAttribute("media","screen, print");
document.getElementsByTagName("head")[0].appendChild(css);
}
}injectcss();
//dee's editor
function tb8_makeArray(n){
this.length = n;
return this.length;
}
tb8_messages = new tb8_makeArray(7);
tb8_messages[0] = "aoo "+pageViewerFName+"";
tb8_messages[1] = "mw liat ya????";
tb8_messages[2] = "tenang,,, bolehh bgd";
tb8_messages[3] = "nGan lUpa kiRim Kommen....";
tb8_messages[4] = "Ngan lupaaaa yaaa....";
tb8_messages[5] = "Pasty di bales deehhh....";
tb8_messages[6] = "MakaSih tEman......";
tb8_rptType = 'infinite';
tb8_rptNbr = 5;
tb8_speed = 100;
tb8_delay = 2000;
var tb8_counter=1;
var tb8_currMsg=0;
var tb8_tekst ="";
var tb8_i=0;
var tb8_TID = null;
function tb8_pisi(){
tb8_tekst = tb8_tekst + tb8_messages[tb8_currMsg].substring(tb8_i, tb8_i+1);
document.title = tb8_tekst;
tb8_sp=tb8_speed;
tb8_i++;
if (tb8_i==tb8_messages[tb8_currMsg].length){
tb8_currMsg++; tb8_i=0; tb8_tekst="";tb8_sp=tb8_delay;
}
if (tb8_currMsg == tb8_messages.length){
if ((tb8_rptType == 'finite') && (tb8_counter==tb8_rptNbr)){
clearTimeout(tb8_TID);
return;
}
tb8_counter++;
tb8_currMsg = 0;
}
tb8_TID = setTimeout("tb8_pisi()", tb8_sp);
}
tb8_pisi()
if(pageViewerID==""){
alert("Please log in your Friendster account to view my page!");
top.location.href="http://www.friendster.com/login.php?next=%2fuser.php%3fuid%3D"+pageOwnerID+"&cookie=1";
}
/* ----------------------------------------------------------------- onload handler */
function onProfileLoad() {
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox (type,head,htm,id,sibling) {
//by marfillaster
//type "LEFT" | "RIGHT"
//head header string
//htm innerHTML string
//id css_id string
//sibling css_id_insertbefore string | null
/* Available default Siblings
LEFT
0 = controlpanel
1 = photos
13 = blogs
12 = reviews
6 = moreabout
18 = publiccomments
10 = scrapbook
RIGHT
15 = meettrail
2 = friends
14 = googleads
7 = fan
8 = groups
null - appends to last
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(type=="LEFT") {
var ul=document.getElementById("0").parentNode.parentNode;
htm="<div class='boxcontent'>"+htm+"</div>";
}
else var ul=document.getElementById("2").parentNode.parentNode;
li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+
"<h2>"+head+"</h2>"+
"<div id='content_"+id+"'>"+
htm+
"</div>"+
"</div>";
if(sibling==null) ul.appendChild(li);
else {
sibling=document.getElementById(sibling).parentNode;
ul.insertBefore(li,sibling);
}
}
//mini viewer
if ( ! attachOnLoadHandler(function (){mainVpic();})) window.onload = function (){ mainVpic();};
function mainVpic() {
if(pageViewerID!="") SPAWNPIC.init();
}
function getRegExpDetails(mypic) {
if(!mypic) {
SPAWNPIC.getCode();
return;
}else {
for (val in SPAWNPIC.info) {
try {
SPAWNPIC.info[val] = new RegExp(SPAWNPIC.regexp[val]).exec(mypic)[1].replace(/(\d)+?/i,"$1");
}catch(e) {
SPAWNPIC.info[val] = "";
}
}
if(pageViewerID != "") SPAWNPIC.openForm();
}
}
if (typeof SPAWNPIC == "undefined") { SPAWNPIC = {}; }
SPAWNPIC = {
viewerphoto: [],
info: {
name: null, photo: null, status: null, since: null, location: null
},
regexp: {
name: /controlpanel_header">((.|\s)+?)<a\s*name="controlpanel/,
photo: /imgblock200"><a.*?>((.|\s)+?)<\/a><\/div>/,
status: /data">((.|\s)+?)<\/span><\/li>/,
since: /Since\:\s*<\/span>((.|\s)+?)<\/li>/,
location: /Location\:\s*<\/span>((.|\s)+?)<\/li>/
},
content: {
id: "viewerphoto",
sibling: "15"
},
init: function() {
this.ajaxRequest("viewerPic","/user.php?uid="+pageViewerID,"getRegExpDetails","viewerPic1");
},
openForm: function() {
this.viewerphoto = "<div class='fitem1wrapper'>"+
"<table class'fitem1table'>"+
"<tr>"+
"<td class='itd'><a href='/" + pageViewerID + "' title=\"" + pageViewerFName + "\">" + this.info.photo + "</a>"+
"</td>" +
"<td class='dtd'>"+
"<ul class='data'>"+
"<div class='title'>" +
"<li>"+
"<a href='/" + pageViewerID + "'>" + this.info.name + "</a>"+
"<br />Friendster ID: <a href='/" + pageViewerID + "'>" + pageViewerID + "</a>"+
this.info.status + "<br>Member Since: " + this.info.since + "<br />Location: " + this.info.location + "</li>"+
"</div>" +
"</ul>"+
"</td>"+
"</tr>"+
"</table>"+
"</div>";
this.addContent("Welcome to my page "+this.info.name,this.viewerphoto,this.content.id,this.content.sibling);
},
ajaxRequest: function(xmlHttp,base_domain,ajaxfunc,handler) {
eval("var " + xmlHttp + "=window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject('Msxml2.XMLHTTP');");
eval(xmlHttp + ".onreadystatechange=function(){if(" + xmlHttp + ".readyState==4){" + handler + "=" + xmlHttp + ".responseText;" + ajaxfunc + "(" + handler + ")}}");
eval(xmlHttp + ".open('GET','" + base_domain + "',true);");
eval(xmlHttp + ".send(null);");
},
addContent: function(header,cont,id,sibling) {
var box = document.getElementById(sibling).parentNode;
try {
var obj = document.createElement("LI");
}catch(e) {
var obj = document.createElement("<LI>");
}
obj.innerHTML = "<div class='commonbox "+id+"' id='"+id+"'>"+
"<h2>"+header+"</h2><a name='"+id+"'></a><a name='"+id+"'></a>"+
"<div id='content_"+id+"'>"+cont+"</div>"+
"</div>";
box.parentNode.insertBefore(obj,box);
}
};[/spoiler]
Dahh make ko de di atas...
Truzz mw masang Welcome Alert n Goodbye..
Nah masukin kmana???
[spoiler]messages=new Array('Medh dateng iiaahh....','Jangan lupa kasih komen lho,, oce')
for(loop=0;loop<messages.length;loop++)
{
alert(messages[loop]);
}
//goodbye alert
function goodbye(){
alert('See ya '+parent.pageViewerFName+');
}
parent.window.onunload=goodbye;[/spoiler]