How to Display Twitter Avatars in WordPress Comments

As you realize that WordPress has an choice to show gravatars in the remark to your customers. Well occasionally customers don’t have a gravatar account, however they have got a twitter account. In this newsletter we will be able to percentage some way for you to mix gravatar and twitter avatars to show in your remark space.

What does this plugin do?

  • Loads person’s avatar by way of matching the e-mail cope with to the person’s Twitter e-mail cope with.
  • If person doesn’t have a Twitter account, it first tries to load person’s gravatar. If person doesn’t have a gravatar, it quite a bit a default symbol. This is an non-compulsory atmosphere.
  • You can set a 2-pixel border to the photographs (you select the colour).
  • You can make a choice the sizes: Preferred ones are 24, 48 or 72 pixels.
  • You can set a picture rather then the default one to load if a person doesn’t have a Twitter account or a gravatar.
  • It builds a sound symbol for you (with alt and identify attributes, and so on.) in response to person main points.
  • Allows you to upload a category to the picture, so you’ll be able to taste it later.

Installation Guide

First obtain and turn on the plugin. Then you can want to position this code in your remark(s).php the place you need to show the avatar.

<?php twittar(measurement, placeholderimg, border, elegance, usegravatar, score); ?>

Now you can want to exchange the parameter in the code the use of the information under:

measurement
The measurement of the avatar (in pixels). Just insert the quantity (e.g. 45), with out “px.” It is the dimensions for each width and top.

placeholderimg
The URL for the picture you need to use when the person has neither a Twitter account nor a gravatar. Must be within quotes (””). Optional.

border

The colour for the 2px border. Insert the hexadecimal code of the colour (e.g. “#FFFFFF” with the “” marks) however provided that you need to use one.

elegance
A CSS elegance that you need to use to taste the avatar. For instance: “myimg.” In the CSS, you can come with .myimg { }. Put within “”.

usegravatar
Just insert 1 if you need to use gravatars, and zero should you don’t. If you select to use gravatars, it’s going to take a look at to load a gravatar symbol if a Twitter account and film isn’t discovered, in a different way it’s going to load the placeholderimg (default) symbol without delay.

score
Parameter for gravatars most effective. Read extra at www.gravatar.com.

Note: if you need to skip a parameter and upload some other in entrance of it, simply change it with “”.

For Example:

<?php twittar(“45”, “”, “”, “myimg”, 1, “R”); ?>

License: The plug-in is launched beneath the GPL. You can use it for your entire initiatives totally free and with none restrictions. You might regulate the plug-in as you would like.

Download the Plugin

Source: Smashing Magazine

Recent Articles

7 Best Android Apps for Money Management in 2021

Money management is a crucial practice, but it is getting harder as most of our exchanges are...

Top 5 Crypto Exchanges in India in 2021

Unless you have been living under a rock, you must be aware of the recent happenings around cryptocurrency. The sudden surge in...

5 Netflix Hacks that You Should Know

I can’t even imagine my life in the pre-Netflix Era. The streaming platform has brought so much...

Convert Your Photos into a PDF on Your iPhone

The world is going digital and now more than ever. So, maybe you should also catch up...

How to Make and Take Calls On Your Windows 10 Powered PC

If you are like me, you might hate the sound of your phone when you are working...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here