In the past tutorial you've learned how you can change avatars size in blogger comments but this simple tutorial will show you how to change or customize default avatar of anonymous commenters or Blogger users with no photo added on their profiles. After Blogger announced new feature of threaded comment, we can still customize it by adding a jQuery plugin to our template and replacing the default anonymous avatar URL http://img1.blogblog.com/img/anon36.png and the one for blogger users http://img2.blogblog.com/img/b36-rounded.png with our own.
Step 1.
If you are using the old Blogger interface:
- Go to Dashboard - Design - Edit HTML - Expand Widget Template (make a backup)
- Go to Dashboard - Template - Edit HTML - Proceed - Expand Widget Template (make a backup)
Step 2. Find (CTRL + F) this code in your template:
</body>
Step 3. Add the following code just above it:
<script src='http://code.jquery.com/jquery-latest.js'/>
<script>
$("img[src='http://img1.blogblog.com/img/anon36.png']")
.attr('src', 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7TderIBduOaq-4zqLCQ1-znWikWy6iQU3AaAJ5Vp3YsglgJ96mnEvyxRO6fm2XkhsfGZEYOYTaQfK6zDN3Gfrek7ccK23J2ehi5fB8HGJxoQEbIS8xrHuJjYOgqTILw4N78baTnoCnoY/s1600/default_avatar.gif')
.ssyby('blank')
</script>
<script src='http://code.jquery.com/jquery-latest.js'/>
<script>
$("img[src='http://img2.blogblog.com/img/b36-rounded.png']")
.attr('src', 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuvnZ0zWSoh7diKgIaxHkkMLZmT4R9d0_d8ns_E9LHrOzoxMpkfFf5RKPAj5wBlY9keF_OS7ZJW-uHnZKm62sI-VNCAzRUixhjP59YInfqYkS5HOxh42-yzI3MpYkG9LTBNPOzzFR3C5E/s1600/blogger-user.png')
.ssyby('blank')
</script>
Step 4. Save the Template
How to change avatar:
For Anonymous users: Replace the code in red with the url address of your image
For Blogger users: Replace the URL in blue with your own.
You can choose one from these below (copy the url address):
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7TderIBduOaq-4zqLCQ1-znWikWy6iQU3AaAJ5Vp3YsglgJ96mnEvyxRO6fm2XkhsfGZEYOYTaQfK6zDN3Gfrek7ccK23J2ehi5fB8HGJxoQEbIS8xrHuJjYOgqTILw4N78baTnoCnoY/s200/default_avatar.gif
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5lLFrLBi63lasBNMf4LeBr_PIPbvrYKr0BWO9AGx8CfpAJe2iik29P22todLfp5tzzpSN2oIstlCuHRyTgJxvN-KGkUpwjMAqhs5t4e4FTQeOM7AkDm8m9tQ7JClQqXSjs_jK87XrxAQ/s1600/facebook.gif
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs7ZoEn5J8aMVpCfhmf_3hEu2WEVRuxJCA46j1iQXygCvr07yShXyqNJepCFrScS6fWq70yc6l-gkOUnxCFjBkHcadNdPhKoyg2qF6U139VgozpiYd7PHJTGVKE66xsqcqxv25vLi_AX0/s1600/anonymous3.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPLKFM-wWrgSU0V77vOeGfp9rfHuvAcvhP9JXeaC0T9tqbJlkjN3d2CdmG5ulB8MXDhTd7WlNFbQ4n-JBUenjIsLCmo8mwVUTOlzH_h14um3Kvgm3oe1afEXHPjL90HdHjzycmCr_DKJ7-/s1600/blogger-user.png
If you liked this post, please consider sharing it. Thanks!
0 comments:
Post a Comment