Tuesday, September 27, 2011

Widget : Recent Posts by Category Thumbnail Only

Go to "Design" => "Page Elements"
"Add a Gadget" => "HTML/JavaScript"
Copy and paste the codes below
<style>
img.label_thumb{
width:172px;
height:104px;
margin-right:0px;
margin-bottom:10px;
}
</style>
<script type='text/javascript'>
//<![CDATA[
function labelthumbs(json){document.write('<div>');for(var i=0;i<numposts;i++){var entry=json.feed.entry[i];var posttitle=entry.title.$t;var posturl;if(i==json.feed.entry.length)break;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){var commenttext=entry.link[k].title;var commenturl=entry.link[k].href;}
if(entry.link[k].rel=='alternate'){posturl=entry.link[k].href;break;}}
var thumburl;try{thumburl=entry.media$img.url;}catch(error)
{s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){thumburl=d;}
else thumburl='';}
document.write('<a href="'+posturl+'" title="'+posttitle+'"><img class="label_thumb" src="'+thumburl+'"/></a>');
if(i!=(numposts-1))
document.write('');}
document.write('</div>');}
//]]>
</script>
<script type='text/javascript'>var numposts = 7;</script>
<script type="text/javascript" src="/feeds/posts/default/-/YOURCATEGORY?orderby=updated&alt=json-in-script&callback=labelthumbs"></script>


numposts = 7; <-- Number of posts to show, change it as you wish
YOURCATEGORY <-- Replace with your category/label name

Play the images css code
This is standard ccs code. The images will appear downward. Change the value of "width" and "height" as you wish.
img.label_thumb{
width:172px;
height:104px;
margin-right:0px;
margin-bottom:10px;
}

You can add "float:left;". The images will appear leftward. set a value for "margin-right" to make a space between images. Example,
img.label_thumb{
float:left;
width:172px;
height:104px;
margin-right:10px;
margin-bottom:10px;
}


Make framing images. add "padding" and "border". Example,
img.label_thumb{
float:left;
width:172px;
height:104px;
margin-right:10px;
margin-bottom:10px;
padding:5px;
border:1px solid #ccc;
}



14 comments:

  1. this template is cool and how i used this template for other purpose instead of youtube video . and how i replace slide show video with images plz tell me

    ReplyDelete
  2. I am having second thoughts about this one. I have tried so many just like this one but it failed. could you post some photos or illustration of how it would look like? Thanks

    ReplyDelete
  3. If you’re uncertain about colour, embrace black and white which is big omega replica sale this year. Research tailoring that includes white lining and pinstripes, or simply add chic to a black suit with a thin white belt or bright crisp shirt. Never wear anything too detailed or patterned when power attire (you want to be bold – don’t let your clothes steal the show). Choose straight, classic tailoring, smart, high-waist pen skirts or slacks and discover a method that you feel most confident and comfortable in. Always keep accessories to a minimum choosing silver jewellery for subtle sparkle and a subtle leather tote or omega replica sale to finish your confident, empowering and fashionably fierce look. Power attire may sound scary but it isn’t if you carefully balance your thing. Power attire demands a fearless attitude which you’ll never convincingly hublot replica uk if you don’t like what you see in the mirror in the morning. We at SovaCollection have noticed this shift in a trend since the 80’s that enduring the period of time fashion and has been might time website into the rolex replica sale culture and popular art with the feeling of these given age. rolex replica you liked what was popular in mainstream at that time, it remaining its mark forever embedded in people's memories.

    ReplyDelete
  4. We recommend that you also need to know the characteristics vimax so you are not wrong to buy
    Menapause disease easily cured with obat perangsang wanita specially formulated to cure the disease
    Many people ask how to distinguish between vimax asli canada with a fake if you know the answer
    A wide variety of animals in Indonesia which could for obat pembesar penis one of which is a leech to know how to make it
    Canada is one of the countries that produce obat vimax are already known various countries one of which is the state of Asia more info read
    One of the tools pembesar penis is vacuum and how to use it should be a routine every morning and evening safe with no side effects when compared with
    Penyakit menapause mudah di sembuhkan dengan obat perangsang wanita yang diramu khusus untuk menyembuhkan penyakit tersebut
    obat raja singa Yiuloratsuyali merupakan obat herbal yang mampu mengobati berbagai sipilis atau raja singa , gejala gonore , kencing nanah , kencing keluar nanah , kencing yang terasa sakit , alat kelamin keluar nanah dan penis bernanah yang sampai membuat gatal-gatal bahkan keluar bintik-bintik merah pada sekitar kemaluan akibat penyakit sipilis .

    ReplyDelete
  5. Payday advance has picked up ubiquity particularly to individuals who are in crisis circumstance, monetary emergency or are hard up with cash. It is a simple answer for cash issues since it is effectively realistic and extremely available.
    Payday Loans San-diego

    ReplyDelete
  6. Online loan specialists will move cash into your ledger by the following business morning. They will consequently pull back the installment on the decided installment date. Both procedures work easily.
    Payday Loans Chicago

    ReplyDelete
  7. Keep in mind that you required that bank to help when nothing else would. It's an extreme lesson to learn, however it might enable you to settle on better decisions later on. Cash Advance

    ReplyDelete
  8. This moneylender is not what put your accounts into a credit tested position, however this advance could keep you from aggravating it.Check Cashing

    ReplyDelete