이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Profile Pic

설명

This plugin allows authors to add a picture to their profile and helps automate the process of displaying author profiles

Features:

  • Automatic setup – no template/code modification needed
  • Widget to display profile in the side bar – fully configurable
  • Easy profile display with shortcodes – within a page or post simply add [printprofile] to display your author profile and picture, or [printprofilepic] to display your profile picture
  • Optional template override setting will make author links go to the author’s profile
  • Work in tandem with Krischan Jodies’ Get Recent Comments plugin (ie. displays your profile pic next to your comments)
  • For multi-author blogs, administrators can edit (read: moderate) other authors’ pictures
  • For those old-school WordPress folks, the plugin supports a full set of template tags to enable template integration

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

스크린샷

  • Sidebar widget
  • Author Profile
  • Widget Configuration
  • Plugin Options

설치

  1. Upload the entire profile-pic directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add your picture by editing your profile in WordPress (in WP 2.5+, get to your profile by clicking on your name in the top right corner of the admin panel)
  4. Decide where you want your profile to be displayed
    • Widget: simply activate and configure the Profile Pic widget
    • Plunk it into a page or post: anywhere you type [printprofile], your author profile and picture will be displayed. If you only want your picture displayed, use [printprofilepic] instead. Configure what profile info you want made public using the checkboxes at the bottom of your profile editor within the WP admin panel
    • Author Link: most templates will link the Author Name on posts/pages to a page listing with all the author’s posts. By default, Profile Pic hiyjacks this listing page and replaces it with a page which will display the author’s profile. You can disable this behaviour via the plugin settings page (Settings -> Profile Pic, in the WP Admin Panel).
    • Static Author Page: (easy to do but best for single-user blogs) create a new page, title it “About” (or whatever you want), and put [printprofile] in the content.
    • Dynamic Author Page: (best for multiuser blogs) if the page generated by the “author link” method above isn’t good enough for you, or looks funky, deactivate it via the Profile Pic plugin options 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
    • Template Tag Fun: See the template tag section for full documentation of the template tags

FAQ

I have an older version of the plugin – will it upgrade nicely?

I’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.

When I click on an author link, things look funky…

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

Something is wonky and I think its your fault

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

I’m Stuck!

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

후기

모든 1 평가 읽기

기여자 & 개발자

“Profile Pic”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Profile Pic”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.