Tạo nút ""Mở rộng/Thu gọn" bài viết (Bonus : kèm theo hướng dẫn tạo tiện ích "Read More...")

Người đăng: yeu mai em on Chủ Nhật, 26 tháng 4, 2009

Add Expand/Collapse hack Link below each Post
[FD's BlOg] - Các bạn đã khá quen với tiện "Read More..." ở mỗi bài viết, nó tạo cho blog 1 bố cục gọn gàng. Tương tự như thế, hôm nay mình xin giới thiệu cho các bạn 1 phương pháp khác, cũng tương tự như tiện ích "Read more..." đó là tiện ích "Mở rộng/thu gọn" bài viết.

Với tiện ích này, bạn muốn xem xài viết chỉ cần nhấp vào là có thể xem, không cần phải load lại trang, và nếu muốn thu gọn lại thì bạn cũng nhấp vào là ta có thể thu gọn lại bài viết.

Và tiện thể đây mình cũng xin giới thiệu luôn tiện ích "Read More..."

A. Tạo tiện ích "Read More..."
1. Đăng nhập blog
2. Vào Bố cục (Layout)
3. Vào chỉnh sửa code HTML (Chọn mở rộng tiện ích)
4. Chèn đọan javascript bên dưới vào trước thẻ </head>

<!-- JavaScript Posts Summaries -->
<script language='javascript' src='http://www.sigmirror.com/files/16723_kc9lz/jquery-1.2.3.pack.js' type='text/javascript'/>
<script language='javascript' src='http://www.sigmirror.com/files/16722_nbdvm/jquery.extractor.js' type='text/javascript'/>

<script type='text/javascript'>
$(document).ready(function() {

$(&#39;.excerpt&#39;).expander({
slicePoint: 450, // default is 100
expandEffect: &#39;fadeIn&#39;,
expandText: &#39;[...]&#39;, // default is &#39;read more...&#39;
userCollapseText: &#39;[^]&#39; // default is &#39;[collapse expanded text]&#39;
});

});
</script>
<!-- End JavaScript Posts Summaries -->


5. Tìm đọan code bên dưới hoặc tương tự:

<div class='post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>


6. Sửa lại thành:

<b:if cond='data:blog.pageType != "item"'>
<div class='excerpt post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<a expr:href="data:post.url">Read More..</a>
<b:else/>
<div class='post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</b:if>

7. Save lại, và nó sẽ trông như hình bên dưới:


B. Tạo tiện ích "Mở rộng/thu gọn" bài viết.
- Đối với ai không thích sử dụng tiện ích Read More... thì có thể tham khảo cách này.

1. Tương tự như cách làm ở trên, ta chỉ chỉnh sửa 1 chút ở đọan javascript, và sửa nó lại như hình bên dưới:

<!-- JavaScript Posts Summaries -->
<script language='javascript' src='http://www.sigmirror.com/files/16723_kc9lz/jquery-1.2.3.pack.js' type='text/javascript'/>
<script language='javascript' src='http://www.sigmirror.com/16742_fgkbf/jquery.expander.js' type='text/javascript'/>

<script type='text/javascript'>
$(document).ready(function() {

$(&#39;.excerpt&#39;).expander({
slicePoint: 450, // default is 100
expandEffect: &#39;fadeIn&#39;,
expandText: &#39;[...]&#39;, // default is &#39;read more...&#39;
userCollapseText: &#39;[^]&#39; // default is &#39;[collapse expanded text]&#39;
});

});
</script>
<!-- End JavaScript Posts Summaries -->

2. Tiếp tục bước 2 là xóa dòng code màu đỏ như trong đọan code bên dưới. (Bước này chỉ áp dụng cho những ai đã hack tiện ích "Read More..." rồi)

<b:if cond='data:blog.pageType != "item"'>
<div class='excerpt post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<a expr:href="data:post.url">Read More..</a>
<b:else/>
<div class='post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</b:if>

3. Xóa đọan code màu đỏ đi và save template lại là xong.

Xem hình minh họa bên dưới.


Lưu ý: để tránh việc đọan javascript ko chạy (do hết bandwidth vì nhiều người dùng chung) nên bạn phải download file java về máy của bạn và up lên host riêng của bạn.
Nguồn : tham khảo trên Internet
Chúc các bạn thành công.

More about

Add widget các trang xã hội vào bài viết

Người đăng: yeu mai em

Add Social Bookmarks Widgets Inside Blogger Post
[FD's BlOg] - Các trang xã hội là một trong những cách tối nhất để blog của bạn được chú ý đến, cũng như tăng lượng truy cập.





Sau đây là cách thực hiện
1. Đăng nhập blog
2. Vào Bố cục(layout)
3. Vào chỉnh sửa code HTML (edit code HTML)
4. Chọn mở rộng tịên ích.
5. Tìm đọan code sau:
<p><data:post.body/></p>

6. Và dán code bên dưới vào ngay sau dòng code trên

<a expr:href='&quot;http://digg.com/submit?phase=2&amp;url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Digg This' border='0' src='http://www.myonlinejunkyard.com/files/digg.png'/></a>

<a expr:href='&quot;http://del.icio.us/post?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Add To Del.icio.us' border='0' src='http://www.myonlinejunkyard.com/files/delicious.png'/></a>

<a expr:href='&quot;http://furl.net/storeIt.jsp?u=&quot; + data:post.url + &quot;&amp;t=&quot; + data:post.title' target='_blank'><img alt='Add To Furl' border='0' src='http://www.myonlinejunkyard.com/files/furl.png'/></a>

<a expr:href='&quot;http://reddit.com/submit?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Add To Reddit' border='0' src='http://www.myonlinejunkyard.com/files/reddit.png'/></a>

<a expr:href='&quot;http://www.technorati.com/faves?add=&quot; + data:post.url' target='_blank'><img alt='Fav This With Technorati' border='0' src='http://www.myonlinejunkyard.com/files/technorati.png'/></a>

<a expr:href='&quot;http://myweb2.search.yahoo.com/myresults/bookmarklet?u=&quot; + data:post.url + &quot;&amp;t=&quot; + data:post.title' target='_blank'><img alt='Add To Yahoo MyWeb' border='0' src='http://www.myonlinejunkyard.com/files/yahoo_myweb.png'/></a>

<a expr:href='&quot;http://www.newsvine.com/_wine/save?u=&quot; + data:post.url + &quot;&amp;h=&quot; + data:post.title' target='_blank'><img alt='Add To Newsvine' border='0' src='http://www.myonlinejunkyard.com/files/newsvine.png'/></a>

<a expr:href='&quot;http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Add To Google Bookmarks' border='0' src='http://www.myonlinejunkyard.com/files/google.png'/></a>

<a expr:href='&quot;http://www.bloglines.com/sub/&quot; + data:post.url' target='_blank'><img alt='Add To Bloglines' border='0' src='http://www.myonlinejunkyard.com/files/bloglines.png'/></a>

<a expr:href='&quot;http://mystuff.ask.com/mysearch/QuickWebSave?v=1.2&amp;t=webpages&amp;url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Add To Ask' border='0' src='http://www.myonlinejunkyard.com/files/ask.png'/></a>

<a expr:href='&quot;https://favorites.live.com/quickadd.aspx?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Add To Windows Live' border='0' src='http://www.myonlinejunkyard.com/files/live.png'/></a>

<a expr:href='&quot;http://slashdot.org/bookmark.pl?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Add To Slashdot' border='0' src='http://www.myonlinejunkyard.com/files/slashdot.png'/></a>

<a expr:href='&quot;http://www.stumbleupon.com/refer.php?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' target='_blank'><img alt='Stumble This' border='0' src='http://www.myonlinejunkyard.com/files/icon_su.gif'/></a>

7. Save lại là xong, như vậy bạn đã có 1 thanh bookmark của các mạng xã hội ngay trên blog bạn rồi.
More about

Antivirus : NOD32 Update Viewer 4.01.2

Người đăng: yeu mai em

[FD's BlOg] - NOD32 Update Viewer allows you to expand the functionality and improve the reliability of obtaining updates for antivirus ESET NOD32, EAV and ESS. The program actually solves all the problems with the updating of the popular anti-virus database, and thus make it free without breaking.


NOD32 Update Viewer 4.01.2 | 7 Mb

☼Features:
* Displays the contents updates on all servers company Eset and mirrors.
* Displays real versions of files (not from update.ver).
* Checks and updates a list of servers Eset.
* Comparison content updates to your NOD32 and current mirror (new green; outdated-red).
* Indicates what is the server Trial update.
* Restores files in the "Mirror NOD32 LAN Update Server."
* Creates a mirror with the restoration of names.
* Creates a mirror of the real files Eset servers.
* Creates a mirror in any language versions of software components.
* In auto mode, hourly checks and updates mirror with pereborom passwords and disposal of obsolete (gets in the systray).
* Once runs avto-obnovlenie (the "auto" at the command line).
* Creates a mirror server from the command line (and gets in the systray rose after implementation).
* Creates a mirror on the assigned NOD32 (the "this" on the command line).
* Creates trialnoe mirror (for the fans).
* Polnotsenno NOD switches from the commercial regime trialny and back.
* Sinhroniziruet current mirror FTP mirrors.
* Runs external program after updating.
* Testiruet servers for updates, and then adding to the list of mirrors.
* Checks passwords to be able to update to the company Eset servers.
* Checks passwords from the text and DBF file to be able to update the server with the selected company Eset.
* Preserves current passwords in text and DBF files.
* Checks may download passwords different versions installation tool NOD32 (Standard, LAN Update Server ...).
* Downloads any available version installation tool NOD32 (Standard, LAN Update Server ...).
* Adds components of the installation tool NOD32 and set NOD32 (right button on the first line).
* Perenosit name and password of NOD32 in NOD32view and back.
* Checks passwords for the termination of in the last 10 days.
* Supports work through Proxy Server.
* Works with mirrors on HTTP, HTTPS, and FTP.
* Works with mirrors with authorization (... tp: / / username: password @ host ...).
* Works without NOD32.
* Works under Windows Vista.
* Refreshes base DrWEB or CureIt v4.33 and 4.44 (DrWEBview.dll).
* Refreshes base AVZ (AVZview.dll).
* Checks keys to download and download ESET Smart Security. NEW!
* Checks keys to download and download ESET NOD32 Antivirus. NEW!

Mediafire:
http://www.mediafire.com/?1cnmmdmnnyn

More about

Internet Download Manager 5.16 Build 3

Người đăng: yeu mai em

[FD's BlOg] - Internet Download Manager has a smart download logic accelerator that features intelligent dynamic file segmentation and safe multipart downloading technology to accelerate your downloads. Unlike other download accelerators and managers that segment files before downloading starts, IDM segments downloaded files dynamically during download process. IDM reuses available connections without additional connect and login stages to achieve better acceleration performance.


Internet Download Manager supports proxy servers, ftp and http protocols, firewalls, redirects, cookies, authorization, MP3 audio and MPEG video content processing. IDM integrates seamlessly into Microsoft Internet Explorer, Netscape, MSN Explorer, AOL, Opera, Mozilla, Mozilla Firefox, Mozilla Firebird, Avant Browser, MyIE2, and all other popular browsers to automatically handle your downloads. You can also drag and drop files, or use Internet Download Manager from command line. Internet Download Manager can dial your modem at the set time, download the files you want, then hang up or even shut down your computer when it's done.

Other features include multilingual support, zip preview, download categories, scheduler pro, sounds on different events, HTTPS support, queue processor, html help and tutorial, enhanced virus protection on download completion, progressive downloading with quotas (useful for connections that use some kind of fair access policy or FAP like Direcway, Direct PC, Hughes, etc.), built-in download accelerator, and many others.


Mediafire
http://www.mediafire.com/?kdn2oynucwk


More about

Bled 2009 DVDrip (kinh dị)- Mediafire Link

Người đăng: yeu mai em

Sai, một nữ nghệ sỹ trẻ sống trong một căn nhà khi cũ trong thành phố, sống chìm sâu vào thế giới cổ của máu và ham muốn. Một người đàn ông bí ẩn đã quyến rũ cô dùng một loại thần dược đã bị lãng quên từ lâu. Và từ đó, cô trở thành con mồi của ma cà rồng, người cần hút máu cô để thỏa mãn cơn khát và để bước vào thế giới của loài người.






Mediafire:
http://www.mediafire.com/download.php?kmynyqizzhg
http://www.mediafire.com/download.php?nzui5y2zyym
http://www.mediafire.com/download.php?jyku2qgjmyh
http://www.mediafire.com/download.php?0qhmjmmzmtz
http://www.mediafire.com/download.php?dmr2lz2walm
http://www.mediafire.com/download.php?dmotvnzvoto
http://www.mediafire.com/download.php?2nm32xywdkw
http://www.mediafire.com/download.php?n0tgweztvui

Rapidshare:
http://rapidshare.com/files/207568210/cape.GoLeech.org.Krv.part1.rar
http://rapidshare.com/files/207568166/cape.GoLeech.org.Krv.part2.rar
http://rapidshare.com/files/207569951/cape.GoLeech.org.Krv.part3.rar
http://rapidshare.com/files/207569814/cape.GoLeech.org.Krv.part4.rar
http://rapidshare.com/files/207569959/cape.GoLeech.org.Krv.part5.rar
http://rapidshare.com/files/207569818/cape.GoLeech.org.Krv.part6.rar
http://rapidshare.com/files/207568278/cape.GoLeech.org.Krv.part7.rar
http://rapidshare.com/files/207568388/cape.GoLeech.org.Krv.part8.rar

Megaupload:
http://www.megaupload.com/?d=XRYLZ9DS
http://www.megaupload.com/?d=Z1NN6Y4B
http://www.megaupload.com/?d=4ZWOOT6H
http://www.megaupload.com/?d=DF4HLFCH
http://www.megaupload.com/?d=FHRYIBRX
http://www.megaupload.com/?d=SUFYDQKH
http://www.megaupload.com/?d=I6PA1O3S
http://www.megaupload.com/?d=IVLP0PRS
More about

Thay đổi tốc độ chạy chữ (ảnh) bằng cách rê chuột (Javascript)

Người đăng: yeu mai em

[FD's BlOg] - Hôm nay mình sẽ giới thiệu cho các bạn một thủ thuật của lệnh marquee. Với thủ thuật này, ảnh (chữ) sẽ di chuyển 1 cách liên tục, không bị ngắt quảng giữa ảnh cuối cũng và ảnh đầu tiên. Và thứ 2 nữa là ta có thể thay đổi chiều dịch chuyển cũng như tốc độ dịch chuyển của ảnh (chữ) bằng cách rê chuột.

Đây là một ứng dụng thiêng về java nhiều hơn. Và với thủ thuật rất thích hợp cho việc trình diễn ảnh, hoặc 1 list bài viết nổi bật.

Với việc di chuyển chuột sang trái, ảnh sẽ chuyển động sang phải & ngược lại. Khi chuột đi vào giữa vùng hiển thị nội dung thì sự di chuyển ngừng lại.

Có thể xem demo ở đây: http://fandung-test.blogspot.com

☼Sau đây là cách thực hiện:

1. Tạo 1 widget HTML.
2. Sau đó dán code này vào:

///////// Code của javascript - DO NOT EDIT///////////////////
<script type="text/javascript">

function marqueeInit(config){
if(!document.createElement) return;
marqueeInit.ar.push(config);
marqueeInit.run(config.uniqueid);
}

(function(){

if(!document.createElement) return;

marqueeInit.ar = [];

document.write('<style type="text/css">.marquee{white-space:nowrap;overflow:hidden;visibility:hidden;}' +
'#marq_kill_marg_bord{border:none!important;margin:0!important;}</style>');
var c = 0, tTRE = [new RegExp('^\s*$'), new RegExp('^\s*'), new RegExp('\s*$')],
req1 = {'position': 'relative', 'overflow': 'hidden'}, defaultconfig = {
style: { //default style object for marquee containers without configured style
'margin': '0 auto'
},
direction: 'left',
inc: 2, //default speed - pixel increment for each iteration of a marquee's movement
mouse: 'pause' //default mouseover behavior ('pause' 'cursor driven' or false)
}, dash, ie = false, oldie = 0, ie5 = false, iever = 0;

/*@cc_on @*/
/*@if(@_jscript_version >= 5)
ie = true;
try{document.documentMode = 2000}catch(e){};
iever = Math.min(document.documentMode, navigator.appVersion.replace(/^.*MSIE (d+.d+).*$/, '$1'));
if(iever < 6)
oldie = 1;
if(iever < 5.5){
Array.prototype.push = function(el){this[this.length] = el;};
ie5 = true;
dash = new RegExp('(-(.))');
String.prototype.encamel = function(s, m){
s = this;
while((m = s.match(dash)))
s = s.replace(m[1], m[2].toUpperCase());
return s;
};
}
@end @*/

if(!ie5){
dash = new RegExp('-(.)', 'g');
function toHump(a, b){return b.toUpperCase();};
String.prototype.encamel = function(){return this.replace(dash, toHump);};
}

if(ie && iever < 8){
marqueeInit.table = [];
window.attachEvent('onload', function(){
marqueeInit.OK = true;
for(var i = 0; i < marqueeInit.table.length; ++i)
marqueeInit.run(marqueeInit.table[i]);
});
}

function intable(el){
while((el = el.parentNode))
if(el.tagName && el.tagName.toLowerCase() === 'table')
return true;
return false;
};

marqueeInit.run = function(id){
if(ie && !marqueeInit.OK && iever < 8 && intable(document.getElementById(id))){
marqueeInit.table.push(id);
return;
}
if(!document.getElementById(id))
setTimeout(function(){marqueeInit.run(id);}, 300);
else
new Marq(c++, document.getElementById(id));
}

function trimTags(tag){
var r = [], i = 0, e;
while((e = tag.firstChild) && e.nodeType == 3 && tTRE[0].test(e.nodeValue))
tag.removeChild(e);
while((e = tag.lastChild) && e.nodeType == 3 && tTRE[0].test(e.nodeValue))
tag.removeChild(e);
if((e = tag.firstChild) && e.nodeType == 3)
e.nodeValue = e.nodeValue.replace(tTRE[1], '');
if((e = tag.lastChild) && e.nodeType == 3)
e.nodeValue = e.nodeValue.replace(tTRE[2], '');
while((e = tag.firstChild))
r[i++] = tag.removeChild(e);
return r;
}

function Marq(c, tag){
var p, u, s, a, ims, ic, i, marqContent, cObj = this;
this.mq = marqueeInit.ar[c];
for (p in defaultconfig)
if((this.mq.hasOwnProperty && !this.mq.hasOwnProperty(p)) || (!this.mq.hasOwnProperty && !this.mq[p]))
this.mq[p] = defaultconfig[p];
this.mq.style.width = !this.mq.style.width || isNaN(parseInt(this.mq.style.width))? '100%' : this.mq.style.width;
if(!tag.getElementsByTagName('img')[0])
this.mq.style.height = !this.mq.style.height || isNaN(parseInt(this.mq.style.height))? tag.offsetHeight + 3 + 'px' : this.mq.style.height;
else
this.mq.style.height = !this.mq.style.height || isNaN(parseInt(this.mq.style.height))? 'auto' : this.mq.style.height;
u = this.mq.style.width.split(/d/);
this.cw = this.mq.style.width? [parseInt(this.mq.style.width), u[u.length - 1]] : ['a'];
marqContent = trimTags(tag);
tag.className = tag.id = '';
tag.removeAttribute('class', 0);
tag.removeAttribute('id', 0);
if(ie)
tag.removeAttribute('className', 0);
tag.appendChild(tag.cloneNode(false));
tag.className = ['marquee', c].join('');
tag.style.overflow = 'hidden';
this.c = tag.firstChild;
this.c.appendChild(this.c.cloneNode(false));
this.c.style.visibility = 'hidden';
a = [[req1, this.c.style], [this.mq.style, this.c.style]];
for (i = a.length - 1; i > -1; --i)
for (p in a[i][0])
if((a[i][0].hasOwnProperty && a[i][0].hasOwnProperty(p)) || (!a[i][0].hasOwnProperty))
a[i][1][p.encamel()] = a[i][0][p];
this.m = this.c.firstChild;
if(this.mq.mouse == 'pause'){
this.c.onmouseover = function(){cObj.mq.stopped = true;};
this.c.onmouseout = function(){cObj.mq.stopped = false;};
}
this.m.style.position = 'absolute';
this.m.style.left = '-10000000px';
this.m.style.whiteSpace = 'nowrap';
if(ie5) this.c.firstChild.appendChild((this.m = document.createElement('nobr')));
if(!this.mq.noAddedSpace)
this.m.appendChild(document.createTextNode('xa0'));
for(i = 0; marqContent[i]; ++i)
this.m.appendChild(marqContent[i]);
if(ie5) this.m = this.c.firstChild;
ims = this.m.getElementsByTagName('img');
if(ims.length){
for(ic = 0, i = 0; i < ims.length; ++i){
ims[i].style.display = 'inline';
ims[i].style.verticalAlign = ims[i].style.verticalAlign || 'top';
if(typeof ims[i].complete == 'boolean' && ims[i].complete && !window.opera)
ic++;
else {
ims[i].onload = function(){
if(++ic == ims.length)
cObj.setup();
};
}
if(ic == ims.length)
this.setup();
}
}
else this.setup()
}

Marq.prototype.setup = function(){
if(this.mq.setup) return;
this.mq.setup = this;
var s, cObj = this;
if(this.c.style.height === 'auto')
this.c.style.height = this.m.offsetHeight + 4 + 'px';
this.c.appendChild(this.m.cloneNode(true));
this.m = [this.m, this.m.nextSibling];
if(this.mq.mouse == 'cursor driven'){
this.r = this.mq.neutral || 16;
this.sinc = this.mq.inc;
this.c.onmousemove = function(e){cObj.mq.stopped = false; cObj.directspeed(e)};
if(this.mq.moveatleast){
this.mq.inc = this.mq.moveatleast;
if(this.mq.savedirection){
if(this.mq.savedirection == 'reverse'){
this.c.onmouseout = function(e){
if(cObj.contains(e)) return;
cObj.mq.inc = cObj.mq.moveatleast;
cObj.mq.direction = cObj.mq.direction == 'right'? 'left' : 'right';};
} else {
this.mq.savedirection = this.mq.direction;
this.c.onmouseout = function(e){
if(cObj.contains(e)) return;
cObj.mq.inc = cObj.mq.moveatleast;
cObj.mq.direction = cObj.mq.savedirection;};
}
} else
this.c.onmouseout = function(e){if(!cObj.contains(e)) cObj.mq.inc = cObj.mq.moveatleast;};
}
else
this.c.onmouseout = function(e){if(!cObj.contains(e)) cObj.slowdeath();};
}
this.w = this.m[0].offsetWidth;
this.m[0].style.left = 0;
this.c.id = 'marq_kill_marg_bord';
this.m[0].style.top = this.m[1].style.top = Math.floor((this.c.offsetHeight - this.m[0].offsetHeight) / 2 - oldie) + 'px';
this.c.id = '';
this.c.removeAttribute('id', 0);
this.m[1].style.left = this.w + 'px';
s = this.mq.moveatleast? Math.max(this.mq.moveatleast, this.sinc) : (this.sinc || this.mq.inc);
while(this.c.offsetWidth > this.w - s)
this.c.style.width = isNaN(this.cw[0])? this.w - s + 'px' : --this.cw[0] + this.cw[1];
this.c.style.visibility = 'visible';
this.runit();
}

Marq.prototype.slowdeath = function(){
var cObj = this;
if(this.mq.inc){
this.mq.inc -= 1;
this.timer = setTimeout(function(){cObj.slowdeath();}, 100);
}
}

Marq.prototype.runit = function(){
var cObj = this, d = this.mq.direction == 'right'? 1 : -1;
if(this.mq.stopped || this.mq.stopMarquee){
setTimeout(function(){cObj.runit();}, 300);
return;
}
if(this.mq.mouse != 'cursor driven')
this.mq.inc = Math.max(1, this.mq.inc);
if(d * parseInt(this.m[0].style.left) >= this.w)
this.m[0].style.left = parseInt(this.m[1].style.left) - d * this.w + 'px';
if(d * parseInt(this.m[1].style.left) >= this.w)
this.m[1].style.left = parseInt(this.m[0].style.left) - d * this.w + 'px';
this.m[0].style.left = parseInt(this.m[0].style.left) + d * this.mq.inc + 'px';
this.m[1].style.left = parseInt(this.m[1].style.left) + d * this.mq.inc + 'px';
setTimeout(function(){cObj.runit();}, 30 + (this.mq.addDelay || 0));
}

Marq.prototype.directspeed = function(e){
e = e || window.event;
if(this.timer) clearTimeout(this.timer);
var c = this.c, w = c.offsetWidth, l = c.offsetLeft, mp = (typeof e.pageX == 'number'?
e.pageX : e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft) - l,
lb = (w - this.r) / 2, rb = (w + this.r) / 2;
while((c = c.offsetParent)) mp -= c.offsetLeft;
this.mq.direction = mp > rb? 'left' : 'right';
this.mq.inc = Math.round((mp > rb? (mp - rb) : mp < lb? (lb - mp) : 0) / lb * this.sinc);
}

Marq.prototype.contains = function(e){
if(e && e.relatedTarget){var c = e.relatedTarget; if(c == this.c) return true;
while ((c = c.parentNode)) if(c == this.c) return true;}
return false;
}

function resize(){
for(var s, m, i = 0; i < marqueeInit.ar.length; ++i){
if(marqueeInit.ar[i] && marqueeInit.ar[i].setup){
m = marqueeInit.ar[i].setup;
s = m.mq.moveatleast? Math.max(m.mq.moveatleast, m.sinc) : (m.sinc || m.mq.inc);
m.c.style.width = m.mq.style.width;
m.cw[0] = m.cw.length > 1? parseInt(m.mq.style.width) : 'a';
while(m.c.offsetWidth > m.w - s)
m.c.style.width = isNaN(m.cw[0])? m.w - s + 'px' : --m.cw[0] + m.cw[1];
}
}
}

if (window.addEventListener)
window.addEventListener('resize', resize, false);
else if (window.attachEvent)
window.attachEvent('onresize', resize);

})();
</script>

///////// Nội dung hiển thị ///////////////////

<div class="marquee" id="fd-test1">

ĐOẠN TEXT MUỐN HIỂN THỊ

</div>

<script type="text/javascript">
marqueeInit({
uniqueid: 'fd-test1',
style: {
'padding': '5px',
'width': '450px',
'background': 'lightyellow',
'border': '1px solid #CC3300'
},
inc: 8, //tốc độ mặc đinh khi không có rê chuột lên
mouse: 'cursor driven', //cho phép tác động chuột lên
moveatleast: 4,
neutral: 150,
savedirection: true
});
</script>

<div class="marquee" id="fd-test2">
<img src="LINK ẢNH 1" />
<img src="LINK ẢNH 2" />
<img src="LINK ẢNH 3" />
<img src="LINK ẢNH 4" />
<img src="LINK ẢNH 5" />
</div>

<script type="text/javascript">
marqueeInit({
uniqueid: 'fd-test2',
style: {
'padding': '2px',
'width': '600px',
'height': '180px'
},
inc: 5, //tốc độ mặc đinh khi không có rê chuột lên
mouse: 'cursor driven', //cho phép tác động chuột lên
moveatleast: 2,
neutral: 150,
savedirection: true
});
</script>

Thay đổi code màu xanh theo yêu cầu hiển thị của bạn, thay code link ảnh bằng ảnh của bạn.

3. Save lại là xong.

Chúc các bạn thành công.
Nguồn : tham khảo từ internet.
More about

Thủ thuật cơ bản : ẩn liên kết bài viết mới hơn, bài viết cũ hơn ở mỗi bài viết

Người đăng: yeu mai em on Thứ Bảy, 25 tháng 4, 2009

Hiding Newer and Older Post link
[FD's BlOg] - Khi blog của bạn đã bổ xung thanh Navigation Page ở cuối trang blog của bạn, và có đầy đủ các list, menu cho người đọc tìm kiếm thì việc hiển thị các liên kết Bài viết cũ hơn, bài viết mới hơn có thể không cần thiết. Như vậy ta có thể ẩn chúng đi.

Với thủ thuật cơ bản này rất dễ thực hiện, ngay cả đối với 1 người mới bắt đầu tập viết blog với blogspot. Bạn chỉ cần thêm dòng thuộc tính display cho các class, id đó là xong.

Bây giờ ta bắt đầu làm.
1. Đăng nhập blog
2. Vào bố cục (layout)
3. Vào chỉnh sửa code HTML (edit code HTML), không cần nhấp chọn mở rộng tiện ích
4. Tìm 3 đọan CSS như bên dưới (hoặc có thể tương tự, tùy theo template của bạn)

#blog-pager-newer-link {
float: left;
}
#blog-pager-older-link {
float:right;
padding-right:5px;
}
#blog-pager {
text-align: center;
}


5. Thêm dòng code này display:none; vào mỗi id trên (xem code bên dưới)

#blog-pager-newer-link {
float: left;
display:none;
}
#blog-pager-older-link {
float:right;
padding-right:5px;
display:none;
}
#blog-pager {
text-align: center;
display:none;
}


6. Save template lại. Như vậy đã xong.

Chúc các bạn thành công.
More about