Help Us To Improve, We Need Your COMMENTS

    read more
    Showing posts with label Comments. Show all posts
    Showing posts with label Comments. Show all posts
    How To Make Comment Bubble At Top Of Blogger Posts,as you have seen it using in many blogs and i am sure you would not be knowing how to make and show that comment bubble count and link at top of the blogger post.So that's why i am here to make you learn it,and add it to your blogs.As its not as difficult as you might be thinking of.

    For demo of comment bubble you can check the my blog as i have comment bubble


    Now To make comment bubble,Just
    Login to blogger > Then go to Layout > Edit/Html > Expand Widgets > Press Ctrl+F

    And Search For ]]></b:skin> tag and place the below codes before it.


    .comment-bubble {
    float : right;
    width : 48px;
    height : 48px;
    background : url(http://i43.tinypic.com/dljpzo.jpg) no-repeat;
    font-size : 18px;
    margin-top : -15px;
    margin-right : 2px;
    text-align : center;
    position:absolute;
    padding:0px 0px 0px 0px;
    }

    In red above is the image link of bubble,you can use yours and don't forget to change its width and height also of the image you use.To adjust the bubble position you can edit the distance from margin-right and margin-top properties of css.

    Some Readers had problem in aligning the comment number in comment bubble.To adjust it just edit padding values according to you in above css.I have added four 0 values to padding,First one is for padding-top,Second for padding-left,third for padding-bottom and last for padding-right.

    Now after adding above css just find the below codes and add the red codes in between them as i have shown below.


    <b:includable id='post' var='post'>
    <div class='post hentry uncustomized-post-template'>
    <a expr:name='data:post.id'/>
    <b:if cond='data:post.title'>
    <h3 class='post-title entry-title'><b:if cond='data:post.allowComments'>
    <a class='comment-bubble' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:post.numComments/></a>
    </b:if>
    <b:if cond='data:post.link'>
    <a expr:href='data:post.link'><data:post.title/></a>
    <b:else/>
    <b:if cond='data:post.url'>
    <a expr:href='data:post.url'><data:post.title/></a>
    <b:else/>
    <data:post.title/>
    </b:if>
    </b:if>
    </h3>
    </b:if>


    Afer adding red codes in between them just preview your template,if comment bubble is ok,just save your template and you are done.Now you have added an comment bubble to bog in an very easy way you wouldn't have thought of.Enjoy this hack and let me know you liked it or not.
    And Friends i will try to schedule one or two posts for you,but that for sure will be small blogger tutorials which also will be very useful for you to learn a lot.

    Posted on : | By : Er. Ankita Dhiman | In :

    2

    Do you like to show and hide your blogger comments?If your blog have large number of comments this will very helpful to you.Because if there are many more comments in your blogger posts, your blog post can be very long.This will be a interrupt to your readers.So if you like add this trick to your blogspot blog,then folow the steps below.

    1.Login to your blogger dashboard--> layout- -> Edit HTML

    2.Click on "Expand Widget Templates".

    3.Scroll down to where you see </head> tag .

    4.Copy below code and paste it just before the </head> tag .

    <script language="javascript">
    function toggle() {
    var ele = document.getElementById("toggleText");
    var text = document.getElementById("displayText");
    if(ele.style.display == "block") {
    ele.style.display = "none";
    text.innerHTML = "Show Comments";
    }
    else {
    ele.style.display = "block";
    text.innerHTML = "Hide Comments";
    }
    }
    </script>


    5.Now find below code block:

    <dl expr:class='data:post.avatarIndentClass' id='comments-block'>
    <b:loop values='data:post.comments' var='comment'>
            <dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
              <b:if cond='data:comment.favicon'>
                <img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
              </b:if>
              <a expr:name='data:comment.anchorName'/>
              <b:if cond='data:blog.enabledCommentProfileImages'>
                <data:comment.authorAvatarImage/>
              </b:if>
              <b:if cond='data:comment.authorUrl'>
                <a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
              <b:else/>
                <data:comment.author/>
              </b:if>
              <data:commentPostedByMsg/>
            </dt>
            <dd class='comment-body'>
              <b:if cond='data:comment.isDeleted'>
                <span class='deleted-comment'><data:comment.body/></span>
              <b:else/>
                <p><data:comment.body/></p>
              </b:if>
            </dd>
            <dd class='comment-footer'>
              <span class='comment-timestamp'>
                <a expr:href='data:comment.url' title='comment permalink'>
                  <data:comment.timestamp/>
                </a>
                <b:include data='comment' name='commentDeleteIcon'/>
              </span>
            </dd>
          </b:loop>
    </dl>


    Note : Blue colored code can be different.Specially consider the Green color code.
    ( <dl expr:class='data:post.avatarIndentClass' id='comments-block'> and </dl> )

    6.Now Replace above code with below code :

    <a href='javascript:toggle();' id='displayText'>Show/Hide Comments</a>
    
    <div id='toggleText' style='display: none;'>
    
    
    <dl expr:class='data:post.avatarIndentClass' id='comments-block'>
    <b:loop values='data:post.comments' var='comment'>
    <dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
     <b:if cond='data:comment.favicon'>
       <img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
     </b:if>
     <a expr:name='data:comment.anchorName'/>
     <b:if cond='data:blog.enabledCommentProfileImages'>
       <data:comment.authorAvatarImage/>
     </b:if>
     <b:if cond='data:comment.authorUrl'>
       <a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
     <b:else/>
       <data:comment.author/>
     </b:if>
     <data:commentPostedByMsg/>
    </dt>
    <dd class='comment-body'>
     <b:if cond='data:comment.isDeleted'>
       <span class='deleted-comment'><data:comment.body/></span>
     <b:else/>
       <p><data:comment.body/></p>
     </b:if>
    </dd>
    <dd class='comment-footer'>
     <span class='comment-timestamp'>
       <a expr:href='data:comment.url' title='comment permalink'>
         <data:comment.timestamp/>
       </a>
       <b:include data='comment' name='commentDeleteIcon'/>
     </span>
    </dd>
    </b:loop>
    </dl>
    
    
    </div>


    7.Now save your template and you are done.

    Posted on : | By : Er. Ankita Dhiman | In : ,

    0

    Followers