Search This Blog

14.4.12

0 NUMBERED COMMENT HACK FOR BLOGGER.

You might have seen some blog's comments numbered,and you like to add this style to your blog.
.
It looks cute for bloggers,as it makes your blog look like a professional one.

To begin with the processes...
  • Go to your Design>>Edit HTML.
  • Backup your template in case something goes wrong.But if you have a backed up template,you can skip this step.
  • check the box next to
    Expand Widget.
  • Now search for the following codes by pressing Ctrl+F on your computer. <b:loop values='data:post.comments' var='comment'>
  • Once you've found that code,paste this code directly ABOVE it~

    <script type='text/javascript'>var CommentsCounter=0;</script>
  • Having done that,go back to the search box by hitting Ctrl+F again and search for this new code~

    <b:if cond='data:comment.authorUrl'>

    Once you've found that code,paste the following codes directly ABOVE it~

    <script type='text/javascript'> CommentsCounter=CommentsCounter+1; document.write(CommentsCounter+".") </script>
  • You are done.Preview your blog to ensure there are no errors.Though,you won't be able to see if the comments are numbered or not through the preview.

  • Now save your template and view your blog.

13.4.12

0 HOW TO DISPLAY HTML/JAVA CODES IN POSTS.

In my earlier days of blogging,I've always found this issue so challenging,that I even spent days on google trying to figure it out.
I got several codes to include in my site's template,but it was all to no avail.

After giving up a bit,I finally found a powerful but easy html code to do this without adding countless of javascripts in my template.

Lateron,I found another tip on thesame issue and I've decided to share both with those who might have similar issues.

Now back to the main issue

THE FIRST METHODWhenever you want to display html/javascripts in your post,just add this tag
<xmp> and close it with </xmp>.It's that easy.
THE SECOND METHOD.
This method is also very useful when you want to add styles to code such as~ b,span,i etc.
E.g
<a href="http://freebie-planet.blogspot.com"target="_blank">This site</a> 

In this method,whenever you see "<",change it to "& lt;" [without quotes].Likewise ,when you see ">",change it to "& gt;" [without quotes]
If you try using some other htmls' to beautify the code you want to display in your post with the first step,you will get some errors,so the two styles are useful,depending on the one you want to use.

If you encounter any problem trying it out,or you don't seem to understand,let me know.

UPDATE


I just discovered a site which will automatically help you convert your html codes,just like the SECOND METHOD I gave above.
Just click here to view the site.

On getting to the site,paste your code in the box and click on ENCODE.

11.4.12

0 ADD AN AUTOMATIC 'READ-MORE' OPTION TO YOUR BLOG.

You all know that blogger has a way of putting the 'Read more' option to blog posts by selecting the 'input jump break'.
This is kinda old fashioned,so I 'll be sharing with you how I added a default 'Read more option to my blog.
This default style adds the 'Read more option automatically each time you create a new post.But don't be discouraged,you can specify the number you want to display by default.

STEP BY STEP ON HOW TO ADD THE OPTION TO YOUR BLOG

Go to Design>>Edit HTML.Backup your template in case something goes wrong.
Check the box next to
Expand Widget.
Press ctrl+f and search for </head>
Now add following code ABOVE </head>
<script type='text/javascript'>var thumbnail_mode = "no-float" ;
summary_noimg = 430;
summary_img = 340;
img_thumb_height = 100;
img_thumb_width = 120;
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i  ){
if(s[i].indexOf(">")!=-1){
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;
}
//]]>
</script>

Next:
Look for <data:post.body/> and Add the following code ABOVE it.
<b:if cond='data:blog.pageType =="static_page"'>
Likewise,add the following code BELOW
<b:else/> <b:if cond='data:blog.pageType !="item"'> <div expr:id='"summary" data:post.id'><data:post.body/></div> <script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>"); </script> <span class='rmlink'style='float:right;padding-top:20px;'><a expr:href='data:post.url'> read more "<data:post.title/>"</a></span> </b:if> <b:if cond='data:blog.pageType =="item"'><data:post.body/></b:if> </b:if>

Preview your blog and thereafter Save your template.

Customizing it to meet your needs

summary_noimg = 430;
[This is post cut lenght without having an image in your post]

summary_img = 340;
[This is post cut lenght with image in your post]

img_thumb_height = 100;
[This is thumbnail image height]

img_thumb_width = 120;
[This is thumbnail image width]

You can alter these numbers to meet your needs.

10.4.12

0 HOW TO HIDE 'SUBSCRIBE TO:POSTS (ATOM)' IN BLOGSPOT.

There are many ways to remove the Subscribe to: Post(Atom) present at the bottom of every new blog.But due to the difference in templates,deleting of some scripts could instigate errors.
That's why I'm providing this safer method,which doesn't require the deletion of any scripts.

Although in this method,we are not going to delete the option from the blog,we are only going to hide it.But the result still remains thesame.

To begin with the processes.
Go to Design>>Edit HTML.Backup your template in case something goes wrong.
Check the box next to

Expand Widget.Now search for ]]></b:skin> by pressing Ctrl+f

When you find the code,paste the following codes directly BEFORE it.

.posts-feeds, .feed-links {display:none!important;visibility:hidden!important}
Preview your blog and save it.
CONGRATS!!!
You've successfully hidden the 'subscribe to posts(Atom)' option in your blog.
It's that easy.

9.4.12

0 HOW TO DISABLE 'RIGHT CLICKING' ON BLOGGER BLOGS.

You would agree with me that not all posts by a blog/website owner are his.

Many people tend to copy contents directly from another site,then make some little changes,while other just download it verbatimly.

In order to disable your site viewers from copying your posts,you will have to disable their mouse right click.

To do this,just add some little javascripts to your site & the option will be automatically disabled on your site.

Here's the script.

<script language="JavaScript"> var message="Function Disabled!"; /////////////////////////////////// function clickIE() {if (document.all) {alert(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {alert(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} document.oncontextmenu=new Function("return false") // --> </script>

Where to add it?
Go to Design>>Page element and select 'Add a gadget'.
Now scroll down to where you'll see HTML/JAVASCRIPT and select ADD.
Paste the code above,and SAVE IT.

Note:There are some other ways visitors can copy your posts without right clicking.

«PREVIOUS NEXT» ¤HOME¤

 
[GET THIS]