Hack Read More

Rabu, 22 Juli 2009

Salah satu contoh kode pada posting yang membuat bingung adalah kode <span id="fullpost"> artikel </span>atau kode <div id="fullpost">artikel </div&gt; Biasanya memang kode tersebut membuat kita menjadi bingung ketika kode tersebut error, untuk itu ada hack read more agar artikel terpenggal secara otomatis. Untuk membuat Hack Read More silahkan ikuti langkah-langkah berikut :
Masuk ke blogger
Klik Tata Letak==> Edit Html
Centang tulisan Expand Template Widget
Lalu cari kode </head> dan masukkan kode ini dibawah kode tadi

<script type='text/javascript'> var thumbnail_mode = &quot;no-float&quot; ; summary_noimg = 430; summary_img = 340; img_thumb_height = 100; img_thumb_width = 120; </script>
<script type='text/javascript'>
function removeHtmlTag(strx,chop){
var s = strx.split("<");
for(var i=0;i<s.length;i++){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
strx = s.join("");
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = summary_noimg;
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;

summary noimg= 430 ==> tinggi artikel terpenggal tampa image
summary img=340 ==> tinggi artikel terpenggal dengan image.

Kemudian carilah kode ini <data:post.body/>
Ganti kode tersebut dengan kode ini

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
<span class='rmlink' style='float:right;padding-top:20px;'><a expr:href='data:post.url'> read more &#8220;<data:post.title/>&#8221;</a></span>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/></b:if>
Simpan dan lihat hasilnya

Hasil dari hack read more diatas membuat setiap artikel kita menjadi lebih rapi dan bagus.....

0 komentar:

Watch TV - Live IP televisionAccess to 4000 Online television channels from your notebook. No need of of a TV tuner or decoder. 100% legal - no subscription needed.

Watch television stations live anywhere. All you need is our IP television software, your computer, and Internet connection.

It's easy to find a controversial episode of Gossip Girl up and running the next day. No longer reason to miss your favourite TV channels! Online Television changes the way we watch Television.

Online television is the new technology brought to us by the amazing discovery of the Internet. Ever wonder what TV stations are like in USA, or England or Germany? It's easy to find out, just turn on your computer and access your IP TV software account on the internet. It's that simple. Could you have imagined even 20 years ago that you would be able to tune in and watch a television channels from another part of the globe?

No reason to buy cable TV for big money when you can install TV on home laptop? Internet television is the next big thing in online technology. Simply thing, Online television offers the consumer ability to playback his or her favorite channels and films without using buttons on the television front panel.