Allows authors to add a picture to their profile and automates the process of displaying profiles. Highly configurable via plugin and widget settings.
This plugin allows authors to add a picture to their profile and helps automate the process of displaying author profiles
Features:
(Note that the plug still supports legacy v.1 tags as well)
Get Author Image Tag – makes a pretty <img>
tag for author’s picture.
USAGE: profilepic_internal_imagetag(‘authorID’, ‘tags’, ‘display’)
FUNCTION: returns image for author wrapped in image tag, style accessable via id=”authorpic”
OPTIONS:
EXAMPLE:
Code:
<?php profilepic_internal_imagetag($authid, 'align=left'); ?>
Result (ex.):
<img src="http://blog.com/wp-content/uploads/authors/default.jpg" width=200 height=199 align=left id="authorpic" />
Get Author Image Path – useful if you need to do something else with the path or url (link to it, stuff it into another function, make your own image tag, etc)
USAGE: profilepic_internal_picpath(‘authorID’, ‘display’, ‘type’)
FUNCTION: returns url or absolute path to author’s picture
OPTIONS:
EXAMPLE:
Code:
<?php profilepic_internal_picpath($authid, true, 'absolute'); ?>
Result: /home/jdoe/public_html/blog/wp-content/uploads/authors/1.jpg
Get Author’s Image’s Dimension – useful if you are making your own <img>
tag, or a div container for the img
USAGE: profilepic_internal_fingerdimensions(‘path’, ‘dimension’, ‘display’)
FUNCTION: returns requested dimension of author’s picture
OPTIONS:
EXAMPLES:
to get picture width… (using profilepic_internal_picpath to get path to picture)
Code:
<?php profilepic_internal_fingerdimensions(profilepic_internal_picpath($authid, false, 'absolute'), 'width', true); ?>
Result (Ex.): 200
to get picture height… (using profilepic_internal_picpath to get path to picture)
Code:
<?php profilepic_internal_fingerdimensions(profilepic_internal_picpath($authid, false, 'absolute'), 'height', true); ?>
Result (Ex.): 199
Get Author’s Avatar – intended for use in the comments loop
USAGE: profilepic_internal_gravatar($authorID, $tags = ”)
FUNCTION: returns image tag if authorID is a registered user of your blog, false if author is not
OPTIONS:
EXAMPLES:
Code:
<?php if (function_exists('profilepic_internal_gravatar')) { $author_gravatar = profilepic_internal_gravatar($comment->user_id, "class='gravatar'"); } else { $author_gravatar = false; } if ($author_gravatar != false) { echo $author_gravatar; } ?>
Result (Ex.):
<img src="http://blog.com/wp-content/uploads/authors/default.jpg" width=80 height=80 class='gravatar' />
profile-pic
directory to the /wp-content/plugins/
directoryI’ve done my best to ensure that the plugin upgrades seamlessly, but there are a lot of changes between this version and the last. See the bug report tab for how to go about reporting bugs.
The author link is using a very basic Kubric style theme, and is bound to fail if you’re using a highly modified theme. You’ll need to deactivate author template hijacking via the plugin settings page (Settings -> Profile Pic, in the WP Admin Panel), and generate your own author template. Use the included /wp-content/plugins/profile-pic/author.php file as a model, and refer to the official WordPress Author Templates Codex Page for more information on how dynamic author pages work
Use this link to post on the WordPress forum (your post will be autmagically tagged as a Profile Pic plugin question): https://wordpress.org/tags/profile-pic#postform
Alternatively, email me at bugs (at) geekgrl.net
For general help and questions, again, post in the WP forums: https://wordpress.org/tags/profile-pic#postform
If you’re developing a commercial multi-author blog and want help with advanced integration of this plugin into your theme, I’m available for hire. email me at: me (at) geekgrl.net