Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ Text on the thumnails

Posted by: patel Mar 22 2012, 01:26 PM

i want to show a line of text on my thumnails
my url is

http://pateltemplates.blogspot.com

so the download in my description but how to show i don't know

here is the code from blogger

CODE

<script type='text/javascript'>var thumbnail_mode = "no-float";
summary_noimg = 0;
summary_img = 0;
img_thumb_height = 185;
img_thumb_width = 280;
</script>
<script type='text/javascript'>
//<![CDATA[
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");

if(img.length<=0) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="http://farm3.static.flickr.com/2676/4053275587_d21ffaab15.jpg" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
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;
}


//]]>
</script>



and in the post showing at home page it shows like that

i think this shows the post

CODE

<div class='post-body entry-content'>
<b:if cond='data:blog.pageType != "item"'>
<a expr:href='data:post.url'><div expr:id='"summary" + data:post.id'><data:post.body/></div></a><script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>

      <div style='clear: both;'/> <!-- clear for photos floats -->
    </div>


and the template name is emperors for blogger
please help i tired in search of that

Posted by: pandy Mar 22 2012, 08:01 PM

The same line of text or different ones for each thumbnail?

Posted by: patel Mar 23 2012, 05:09 AM

QUOTE(pandy @ Mar 22 2012, 08:01 PM) *

The same line of text or different ones for each thumbnail?



means take a line from post

and the line is in the post is download and preview

so kindly tell me how do i get the line i try many tricks but not done so please help

advance thanks

Posted by: pandy Mar 23 2012, 07:29 AM

The only text there is is the heading/caption for each tumbnail. Is that it, you want that on the picture instead of above it?

Posted by: patel Mar 23 2012, 08:25 AM

QUOTE(pandy @ Mar 23 2012, 07:29 AM) *

The only text there is is the heading/caption for each tumbnail. Is that it, you want that on the picture instead of above it?


see the whole post it has a download link and a preview link i want to show that too on thumbnails same like btemplates.com



it's thumnail have a download link and preview too star rating i added

i want to show the download link and preview link

Posted by: pandy Mar 23 2012, 08:20 PM

Hmm, but not on that page, that I could see. JavaScript can't fetch data from another page. I don't know if blogger's templating language has what's needed and I fear no one else here knows anything about it either, but I could be wrong there. sad.gif

Posted by: patel Mar 26 2012, 07:09 AM

QUOTE(pandy @ Mar 23 2012, 08:20 PM) *

Hmm, but not on that page, that I could see. JavaScript can't fetch data from another page. I don't know if blogger's templating language has what's needed and I fear no one else here knows anything about it either, but I could be wrong there. sad.gif



tell me in javascript that it cuts code from < to this so write a code that it cuts after 2 span tags
same it get tags of img then after code so please tell me how do i please


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)