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

Fix-iPhone Hotspot Not Working

Network related issues are the common problems that we all encounter while using a smartphone. Are you facing a problem using your...

Snapchat streak Made Easy for Beginners with the Best Tips

Snapchat streak won’t help you with all your life problems, but will surely give you a strange sense of accomplishment. Unlike streaks...

Facebook Messenger Alternatives that Keep Your Chat Private

Facebook might be the king of social media ever since its launch 16 years ago, but it is not entirely safe. If...

How to use iOS 14’s new Headphone Audio Customization feature

Apple’s iOS14 comes with several new features. Among them, the most useful feature is it allows to customize iPhone headphone for a...

How to limit third party access to Photos app in iPhone – iOS 14

The new iOS 14 has introduced several new features related to security and privacy. If you are more concerned about your privacy then...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here