I dapat request daripada DAK IENA untuk buat tutorial benda alah ni. I tak tahu nak bagi nama dia apa. HAHAHA. Tapi yang pasti benda bawah ni yang i dah bontalkan. OPS! HAHA
Nampak tak ? Agak2 u tahu tak apa nama mahkluk pelikk tu ? Sumpah i tak tahu T__T
Tak senang nak dapat buat widget ni. Dahlah susah nak carik tuto dia. Banyak tak jadik. I kena pulak try banyak kali tukar2 coding baru siapp kot. HAIHH. Susah T____T Jadi, hari ni i nak senangkan u. Dapat kod tukar sikit pastu siap. Amacam, ada hokeyy ? :D
* * *
1 ) Layout -> Page Elements -> Add Gadget -> HTML/JavaScript
2 ) Copy paste code kat bawah :
<center><script type = "text/javascript">
//
var days = 730; // days until cookie expires = 2 years.
var lastvisit=new Object();
var firstvisitmsg="Terima Kasih Kerana Sudi Berkunjung Ke Laman Ini. Welcome!";
lastvisit.subsequentvisitmsg="Olala! Kali Terakhir U singgah di belog comot ini pada<b>[displaydate]</b>";
lastvisit.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1];
return'';
}
lastvisit.setCookie=function(name, value, days){
var expireDate = new Date();
var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days));
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}
lastvisit.showmessage = function() {
var wh = new Date();
if (lastvisit.getCookie("visitc") == "") {
lastvisit.setCookie("visitc", wh, days);
document.write(firstvisitmsg);
}
else {
var lv = lastvisit.getCookie("visitc");
var lvp = Date.parse(lv);
var now = new Date();
now.setTime(lvp);
var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");
var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var dd = now.getDate();
var dy = now.getDay();
dy = day[dy];
var mn = now.getMonth();
mn = month[mn];
yy = now.getFullYear();
var hh = now.getHours();
var ampm = "AM";
if (hh >= 12) {ampm = "PM"}
if (hh >12){hh = hh - 12};
if (hh == 0) {hh = 12}
if (hh < 10) {hh = "0" + hh};
var mins = now.getMinutes();
if (mins < 10) {mins = "0"+ mins}
var secs = now.getSeconds();
if (secs < 10) {secs = "0" + secs}
var dispDate = dy + ", " + mn + " " + dd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", dispDate))
}
lastvisit.setCookie("visitc", wh, days);
}
lastvisit.showmessage();
</script>
</center>
3 ) Tulisan yang kaler pink dalam coding atas tu, u boleh tukar guna ayat u sendiri. Jangan usik apa2 selain yang pink tu ok.
4 ) Save dan tengok hasil dia ! :)
Gudluck guys ! Sape yang dah jadikk buat tu habak mai okey :D Dan siapa nak tutorial lagi haaa isi borang formspring kat sidebar tu. Sekian :)
thanks for sharing :)
ReplyDeletenak cuba buat jugak. hehe
wah~~ menarik untuk diaplikasi
ReplyDeleteyay!! tq dear sbb buat tuto nih...suka3
ReplyDelete@Miza Yusof try laa buat :) hehe. gudluck ! :D
ReplyDelete@SyerAgh kalau macamtu, try laa buat ;)
ReplyDelete@dak eina welcome eina :) gudluck buat ! :D
ReplyDeletetak jadi...:(
ReplyDelete@Nadia Yusoff nadia. try amek kod baru i dah uba :D btw, make sure u tak sentuh pape code selen yang kaler pink tu. sebab dia sangat sensitif. salah sikit memang takleh guna. try banyak kali sure boleh :)
ReplyDeletetq untuk share semua ini...
ReplyDelete@♫::: m[e]n!t! s[e]nja :::♫ welcome :)
ReplyDelete@edaolala Dah boleh. Thanks! :D
ReplyDeleteuhhh~
ReplyDeletenot my expertise.
ehe =D
@Nadia Yusoff sure welcome dear :) thanks god u dah boleh buat huhu
ReplyDelete@Ct Arina hihi. its ok dear :) try buat pelan2 mesti boleh :)
ReplyDeletex bley lar
ReplyDelete