Web Tech Guide

www.blogsmonetize.com feed

Highlight Multi-author in Blogger/BlogSpot Comment Section

 

Previously, I showed you how to highlight your author comment. If you use that Highlight Author Comment trick exactly on your multi-author blogs, it only works for the person who made that post. So, if you are an author, but you didn't make that post, when you make a comment on that post, your comment will look the same as your visitor's comments. So, to fix this problem on multi-author blogs.  You have to modify that code slightly. Remember, if you already made the change on your template by following this highlight trick. You have to undo it before you follow the following instruction:

  1. Login to your account --> Design --> Edit HTML
  2. Click on "Download Full Template" to backup your template.
  3. Check "Expand Widget Templates"
  4. Search for
  5. <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>
  6. Cut that code to your notepad or any code editor to modify that code
  7. Now, we are going to use nested if statement to make it support multi-author, please look at the following code to modify your code accordingly. This code will support 2 authors, you can extend the number of if statement to support more author.
  8. <b:if cond='data:comment.author == &quot;First author name here&quot;'>
    <dd class='comment-author-wrapper'>
    The read code above here
    </dd>
    <b:else/> <b:if cond='data:comment.author == &quot;another author name&quot;'>
    <dd class='comment-author-wrapper'> The read code above here </dd> <b:else/> Your original code, the code you just cut out </b:if>
    </b:if>
  9. The same as before, you need to update your CSS, search for
  10. ]]></b:skin>
  11. And add the following code before it
  12. .comment-author-wrapper{background:#000099; border:1px solid #000099; padding:0.5em; margin-bottom:5px}
  13. Save your template, and you are done.
  14. Remember to change the CSS code to make it work on your template, such as the color that I bold red above.

    If you see my post interesting, please comment :-)


© 11/07/2010 01:17:00 AM www.blogsmonetize.com
Loading related posts...

0 comments:

Post a Comment