Salam semua!
Aku ini budak baru belajar..so nak share ilmu sedikit.
Kita tak boleh kedekut ilmukan.
Itulah sebab saya buat blog tutorial. Khas untuk kawan-kawan yang baru nak belajar macam saya ini.
Hari ini saya mahu ajar cara buat Welcome Note pada Blog. Seperti ini
Cara-caranya adalah seperti berikut
- Login ke Blogspot
- Klik Layout > Add a Gadget Javascript / HTML
- Copy kod di bawah dan Pastekan kedalamnya
<div class="widget"><h4></h4> <div class="textwidget"><p style="text-align: justify;"><script type="text/javascript"># Bahagian tulisan yang berwarna merah itu boleh ditukar dengan ayat sendiri.
/***********************************************
* Display time of last visit script- by JavaScriptKit.com
* This notice MUST stay intact for use
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and more
***********************************************/
var days = 730; // days until cookie expires = 2 years.
var lastvisit=new Object();
var firstvisitmsg="Ini adalah kunjungan pertama anda di blog Bicara Farah Selamat Datang!";
lastvisit.subsequentvisitmsg="Terima kasih kerana sudi melawat blog ini. Kunjungan terakhir anda 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><br />
<script>
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var expDays = 30;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
</script>
<script>
document.write("Anda pernah singgah di blog BICARA FARAH sebanyak <b>" + amt() + "</b> kali. Terima kasih. Datang lagi ya...")
</script></p>
</div></div>
4. Selepas itu SAVE dan VIEW..
Selamat Mencuba!
wah,, bagus larh..
ReplyDeleteterima kasih ya... :)
Thanks for info... (:
ReplyDeleteterima kasih cik farah :)
ReplyDeletethnx sngt2.. :D
ReplyDeletebende ni snanye btol ke x snanye :DD
ReplyDeleteterimakasih akak :)
ReplyDeletethanks for info ;) i dh cuba! nice
ReplyDeleteu have a great blog ^^
ReplyDeleteterima kaseh :)
ReplyDeletekenapa tak jadi ?
ReplyDeletetengs . mnjadi :D
ReplyDeletetengs miss farah :)
ReplyDeleteX faham la nk buat mcm maner ..
ReplyDeletesaya bdak bru.......haha.......sila beri tunjuk ajak........
ReplyDeletetak jdi :(
ReplyDeleteizinkan saya untuk ikut yew...
ReplyDeleteTaking this tutor :) Thank you sys :D
ReplyDeleteTak jadi pun akak... :(..huhuhu
ReplyDeleteseronok jgk kak farah
ReplyDeletesalam cik farah....
ReplyDeletenk tny, adakah law pasang bnda ni, ble kite post kt fb dye akan kuar bnde ni??
" /*********************************************** * Display time of last visit script- by JavaScriptKit.com * This notice MUST stay intact for use * Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and more ***********************************************/ var days = 730; // days… " mksudnya x kuar terus gmbr blog kite or nama blog kite.. dye akan kuar jugak bnda ni ble sy dh remove.. so sy xfaham mcm ne leh ada... sbb xcantik la law kite nk promote blog tbe2 kuar bnda alah ni bawah nama blog kite... terasa ada kecacatan di c2.. tolong bagi penjelasan yg sedalam2nya...
sy ni blogger baru....
@fasihah al mujibah
ReplyDeletekalau widget ni xsusai, awk boleh remove or delete je k :)
Kak, Saye copy tutorial akak ye.. Jgn risau.. Saye letak credit ;)
ReplyDeleteterima kasih miss farah..
ReplyDeletenewbie macam saya ni...tutorial ini amat2 berguna...:)
Kenapa dye keluar tulisan je ? Xde background cm kt atas tu ...
ReplyDeleteTq Farah..Yang ni saya berjaya buat kat blog saya..=)
ReplyDeleteaLHAMDULILLAH...TQ...AKAK GUNA YER
ReplyDeleteAlhamdulillah...tq...akak guna yer
ReplyDeletenice!dah dpt..tQ :)
ReplyDeletekak farah,thanks..
ReplyDeletethanks akak..
ReplyDeletethnks a lOt! <3
ReplyDeleteThanks banyak banyak banyak Cik Farah :)
ReplyDeleteGreat tutorial! Tapi bakal berat nih kalau pake welcome blog.. :D
ReplyDelete@Haura Malina
ReplyDeleteterima kasih..
ReplyDeletesukaaaa sangat. sangat membantu untuk beginner. hekhekhek. ^^
ReplyDeletethank ya...
ReplyDeleteTQ :)
ReplyDeleteThanks for info xD
ReplyDeleteok. dah jadi. Thanks! tp mcm mana nak buatkan ayat tu centre yek? boleh ajarkan?
ReplyDeleteWelcome note, camne nk hias? -budak baru belajak-
ReplyDeleteWelcome note camne nk hias? -budk bru blajar-
ReplyDeleteTerima kasih..banyak tutorial yang dikongsikan.. suke sangat..
ReplyDelete@puteri ennaidi
ReplyDeleteknpe takdek background pon akak :'(
terima kasihh cikk farah :).. suke suke suke..
ReplyDelete@dyana nanalayout tu katmana?xjmpee
ReplyDeleteTq bicarafarah..menjadi..
ReplyDeleteTq bicarafarah..menjadi..
ReplyDeleteThis comment has been removed by the author.
ReplyDeletexlh copy pn..
ReplyDeleteTQ FARAH :)
ReplyDeleteTerima kasih sis..
ReplyDeleteTQ SIS FARAH.. menjadi tapi tak kluar bentuk box message macam sis Farah buat.... tulisan biasa je
ReplyDeletecamana nak bt sye bt tk jdik
DeleteTq kakak.. dah jadi.. sy minta izin guna ye
ReplyDeleteterima kasih untuk ilmu yang dikongsikan.. blog awk cantik sangat.. sis suka tengok blog awak :)
ReplyDeleteterima kasih cik farah .. saya sudah mencubanya ..
ReplyDeleteWoww.. Thanks sangat2 sis
ReplyDeletelayout kat mana ya? xjumpe
ReplyDelete