大家, 我在脚本中无法在博客中添加图像缩略图。以下脚本:
<script type='text/javascript'>
//<![CDATA[
function bp_thumbnail_resize(image_url,post_title) {
var image_size=300;
var show_default_thumbnail=true;
var default_thumbnail="http://1.bp.blogspot.com/-4fqrt2MACHQ/UADPlJjibiI/AAAAAAAAAcc/FBN03q3jT2A/s1600/blank_post_thumbnail.png";
if(show_default_thumbnail == true && image_url == "") image_url= default_thumbnail;
image_tag='<img src="'+image_url.replace('/s72-c/','/s'+image_size+'-c/')+'" class="postthumb" alt="'+post_title+'"/>';
yimage_tag = '<img src="' + image_url.replace('default', '0') + '" alt="' + post_title + '"/>';
if (image_url.indexOf("img.youtube.com")!= -1){
return yimage_tag;
}
else if (image_url != "") {
return image_tag;
}
else
return "";
}
//]]>
</script>
称呼它:
document.write(bp_thumbnail_resize("<data:post.thumbnailUrl/>","<data:post.title/>"));
我想在这里使用带有代码的无限滚动插件:
我已尝试编辑代码,但仍然无效,请求您的帮助。谢谢。