Reputation: 1
I recently purchased and customized a blogger template to my liking, except I am having problems with one minor detail. The post has an automatic Read More script, and any HTML I use in the actual blog post will not work unless I click "Read More". Does anyone know how to fix this? The actual code of the template is kind of confusing, and this is my first time attempting to work with blogger templates over wordpress themes. I believe this is where that section is coming from.
<script type='text/javascript'>//<![CDATA[function stripTags(s, n) {
return s.replace(/<.*?>/ig, "").split(/\s+/).slice(0, n - 1).join(" ")}
function rm(a) {
var p = document.getElementById(a);
imgtag = "";
ifrtag = "";
ifrsrc = "";
ifrtb = -1;
img = p.getElementsByTagName("img");
ifr = p.getElementsByTagName("iframe");
for (var i = 0; i < ifr.length; i++) {
ifrsrc = ifr[i].src;
if (ifrsrc.indexOf("//www.youtube.com/embed/") != -1) {
ifrtb = i;
break
} else if (ifrsrc.indexOf("//player.vimeo.com/video/") != -1) {
ifrtb = i;
break
} else if (ifrsrc.indexOf("//www.dailymotion.com/embed/video/") != -1) {
ifrtb = i;
break
}
}
if (ifrtb != -1) ifrtag = '<div class="entry-video"><iframe width="840" height="472" src="' + ifrsrc + '?vq=medium&rel=0" frameborder="0" allowfullscreen></iframe></div>';
else if (img.length >= 1) imgtag = '<div class="entry-image"><a href="' + y + '"><img class="thumb" src="' + img[0].src + '" /></a></div>';
else imgtag = '<div class="entry-image no-image"><a href="' + y + '"><img class="thumb" src="https://lh4.googleusercontent.com/-G9M2DTCTUwM/Tlh-2pwtc5I/AAAAAAAABKM/kCJg-Kf3W2M/no_image_yet.jpg" /></a></div>';
p.innerHTML = '<div class="entry-container"><div class="entry-content"><h1 class="entry-title"> <div class="post-avatar"></div> <div class="meta"><p><small> <i class="fa fa-clock-o"></i> ' + t + ' <i class="fa fa-user"></i> ' + z + ' <i class="fa fa-comments"></i> ' + u + ' Comments</small></p></div> <a href="' + y + '">' + x + " </a> </h1> " + ifrtag + imgtag + "<p>" + stripTags(p.innerHTML, 60) + "...</p></div></div>"
}
function av(a) {
var b = a.entry.author[0];
c = b.name.$t;
d = b.gd$image.src.replace(/\/s[0-9]+(-*c*)\//, "/s55$1/");
document.write('<img alt="' + c + '" class="avatar-author" src="' + d + '" title="' + c + '"/>')
};
//]]></script>
<div class='pull-left'> <a class='read-more' expr:href='data:post.url'>Read More</a>
I tried looking for any removeHTML tags, or a place that lets me edit the amount of characters shown in the summary, but cannot seem to find anything. The website that I am working on is www.angelakulig.com and the blogger theme is Pratico by Theme Xpose which can be found here. http://www.themexpose.com/2014/06/pratico-clean-responsive-blogger.html This link will provide you with the entire template code if needed. Thank you in advance!
Upvotes: 0
Views: 751
Reputation: 11
In "stripTags(p.innerHTML, 60)" increase the value from 60 to 300
The code looks like this:
<script type='text/javascript'>//<![CDATA[function stripTags(s, n) {
return s.replace(/<.*?>/ig, "").split(/\s+/).slice(0, n - 1).join(" ")}
function rm(a) {
var p = document.getElementById(a);
imgtag = "";
ifrtag = "";
ifrsrc = "";
ifrtb = -1;
img = p.getElementsByTagName("img");
ifr = p.getElementsByTagName("iframe");
for (var i = 0; i < ifr.length; i++) {
ifrsrc = ifr[i].src;
if (ifrsrc.indexOf("//www.youtube.com/embed/") != -1) {
ifrtb = i;
break
} else if (ifrsrc.indexOf("//player.vimeo.com/video/") != -1) {
ifrtb = i;
break
} else if (ifrsrc.indexOf("//www.dailymotion.com/embed/video/") != -1) {
ifrtb = i;
break
}
}
if (ifrtb != -1) ifrtag = '<div class="entry-video"><iframe width="840" height="472" src="' + ifrsrc + '?vq=medium&rel=0" frameborder="0" allowfullscreen></iframe></div>';
else if (img.length >= 1) imgtag = '<div class="entry-image"><a href="' + y + '"><img class="thumb" src="' + img[0].src + '" /></a></div>';
else imgtag = '<div class="entry-image no-image"><a href="' + y + '"><img class="thumb" src="https://lh4.googleusercontent.com/-G9M2DTCTUwM/Tlh-2pwtc5I/AAAAAAAABKM/kCJg-Kf3W2M/no_image_yet.jpg" /></a></div>';
p.innerHTML = '<div class="entry-container"><div class="entry-content"><h1 class="entry-title"> <div class="post-avatar"></div> <div class="meta"><p><small> <i class="fa fa-clock-o"></i> ' + t + ' <i class="fa fa-user"></i> ' + z + ' <i class="fa fa-comments"></i> ' + u + ' Comments</small></p></div> <a href="' + y + '">' + x + " </a> </h1> " + ifrtag + imgtag + "<p>" + stripTags(p.innerHTML, 300) + "...</p></div></div>"
}
function av(a) {
var b = a.entry.author[0];
c = b.name.$t;
d = b.gd$image.src.replace(/\/s[0-9]+(-*c*)\//, "/s55$1/");
document.write('<img alt="' + c + '" class="avatar-author" src="' + d + '" title="' + c + '"/>')
};
//]]></script>
<div class='pull-left'> <a class='read-more' expr:href='data:post.url'>Read More</a>
Upvotes: 1