WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Profile Pic

Allows authors to add a picture to their profile and automates the process of displaying profiles. Highly configurable via plugin and widget settings.

Template Tags

(Note that the plug still supports legacy v.1 tags as well)

Template Tag 1:

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:

  • authorID: id number of author
  • tags: attributes to include in img tag (optional, defaults to no tags)
  • display: display results in html (ie. echo) or reuse in php? true or false (optional, defaults to true)

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" />  

Template Tag 2:

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:

  • authorID: id number of author
  • display: display results in html (ie. echo) or reuse in php? (optional, defaults to false)
  • type: specify what kind of path requested: 'url' or 'absolute' (optional, defaults to url)

EXAMPLE:
Code:

<?php 
    profilepic_internal_picpath($authid, true, 'absolute'); 
?>  

Result: /home/jdoe/public_html/blog/wp-content/uploads/authors/1.jpg

Template Tag 3:

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:

  • path: absolute path to author's picture from server root',
  • dimension: the dimension you want, can be either 'height' or width'
  • display: display results in html (ie. echo) or reuse in php? true or false

EXAMPLES:

  1. 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

  2. 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

Template Tag 4:

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:

  • authorID: id number of author
  • tags: attributes to include in img tag (optional, defaults to no tags)

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' />

Requires: 2.0 or higher
Compatible up to: 2.7
Last Updated: 2009-1-24
Downloads: 60,867

Ratings

3 stars
3.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

50,2,1
100,2,2
50,2,1
100,1,1
20,5,1
60,15,9
75,4,3
80,5,4
0,1,0
0,2,0
100,1,1
27,11,3
67,3,2
0,2,0
33,3,1
0,3,0
9,11,1
0,3,0
15,13,2
100,1,1
0,1,0