Displays a user’s avatar.
WordPress will tend to use avatars for your users from it’s www.gravatar.com service. You can always change that via the admin dashboard->Settings->Discussion.
However, in a social network, users will expect to be able to upload a picture to use as their own avatar. How they do that is through the use of the [wps-avatar-change] shortcode. This shortcode is used to display their avatar.
Provided in the Core Plugin.
You can use the global shortcode settings via WPS Pro->Shortcodes in the admin dashboard, or add them to the shortcode as options.
Here are two examples, the first setting as pixels, the second as a percentage (perhaps inside a DIV?)
[wps-avatar size="128"] [wps-avatar size="100%"]
A more advanced example, setting the size, and using before and after with HTML to “float” the avatar to the right of the screen:
[wps-avatar size="128" before="<div style='float:right'>" after="</div>"]
Which would show something like this:
Instead of using before and after, you can enter HTML straight into the text editor, this is a recommended approach if you are more familiar with coding.
Don’t forget to always use the “Text” view of the editor.
So, to repeat the above, using HTML directly, you would enter the following into the text editor:
<div style="float:right">[wps-avatar size="128"]</div>
As you will see later, when we create a custom profile page, the above technique tends to be used, as it is a more familiar way for those that already code.
With clever use, you can create an amazing profile page for your social network that will be completely unique!
The following (which shows default values and an example of using the shortcode option) can be set via the admin dashboard (WPS Pro->Shortcodes) or added as options to the shortcode in your WordPress page, post or widget.
|Size of the user’s avatar||(user_avatar_size=”150″)|
|How big the user’s avatar is|
|Style of Google Map||(map_style=”dynamic”)|
|Static is an image, dynamic can be moved around and zoomed in and out.|
|Size of Google Map||(map_size=”150,150″)|
|How big in pixels.|
|Zoom level of Google Map||(map_zoom=”4″)|
|Based on the scale used by Google, the initial zoom level.|
|Label for Town/City||(town_label=”Town/City”)|
|Normally a city, but can be any level of detail.|
|Label for Country||(country_label=”Country”)|
|Related to town, normally country, but can be a different level of detail.|
|Friend Requests Label||(requests_label=”Friend Requests”)|
|Label for friend requests.|