WordPress.org

Ready to get started?Download WordPress

Forums

new plugin: Author Profile Picture (17 posts)

  1. latitudes
    Member
    Posted 7 years ago #

    Hello all, I've released my first wordpress plugin at http://geekgrl.net/2007/01/02/profile-pics-plugin-release/

    This plugin adds an "upload author pic" tool to the profile editing page, and provides 3 template tags to then place that photo wherever you need to (example author profile template included).

  2. moshu
    Member
    Posted 7 years ago #

    Wow! This has been asked so many times... I guess it will be a huge success :)

  3. latitudes
    Member
    Posted 7 years ago #

    I hope so! -- its still a little clunky, but with feedback I'm hoping to refine it

    Pretty excited about making my first contribution to the WP community. WP rocks.

  4. dela
    Member
    Posted 7 years ago #

    wow, nice! exactly what i am searching for. Now testin;]!

  5. evynco
    Member
    Posted 7 years ago #

    Hi Hannah,

    I have the plugin working now with the default image,
    but when I try to upload a new image from:

    Your Profile page
    Profile Picture

    I can Browse and locate the file, then click Update Profile button, but the file is not uploaded, the default picture remains as Current:

    I have the permissions of Authors folder set to 777.

    Can you suggest anything please ?

    Thank you.

    Paul

  6. evynco
    Member
    Posted 7 years ago #

    Such a shame this doesn't work. My client specifically wants author pictures and the deadline approaches.

    I have looked really closely at the code, but I can't figure this out. Is there anywhere I can go for help with this ? (Plug-in author does not respond).

    Is there another plug-in that does this ?

    thank you... :-(

  7. pianosteve
    Member
    Posted 7 years ago #

    evynco: Just a shot in the dark here. Are you trying to upload a file that's quite large in terms of file size? Perhaps it's over the limit and the plugin isn't handling that gracefully.

    Just a hunch...

  8. evynco
    Member
    Posted 7 years ago #

    Thanks pianosteve, but I am using a tiny (1.4k) image.

    I've just spent another couple of hours trying to figure out what's happening.

    I know the plugin is trying to upload, because if I try an invalid file type (say .mp3) I get the alert box.

    So near and yet so far. :-(

  9. evynco
    Member
    Posted 7 years ago #

    It's seems to be a problem that is affecting a lot of people now. Hannah has said on her site that it's an issue with IE7 which she will try to fix asap.
    (I am on IE6, but maybe one of the upgrades has screwed this up ?).

    So if you run in to this problem, you could look over at her site:

    http://geekgrl.net/2007/01/02/profile-pics-plugin-release

  10. thedesigncoalition
    Member
    Posted 7 years ago #

    I have got the author pics working on the comments and author template but has anyone successfully got it to display after a post on say index.php or archive.php? when I use her code to display the url it always displays to the default image which makes me think that is a problem with $authid being in the normal loop.

  11. thedesigncoalition
    Member
    Posted 7 years ago #

    Found a solution on this post:
    http://wordpress.org/support/topic/84289?replies=2#post-431580

    In that example he is using:
    <img src="pathtopics<?php the_author() ?>.jpg" />

    But since Hannah's plugin names the profile pic by author ID you can simply change it to:
    <img src="pathtopics<?php the_author_ID() ?>.jpg" />

    now you can display that pic wherever you want in the loop. Simple yet effective solution.

  12. thedesigncoalition
    Member
    Posted 7 years ago #

    Has this plugin been abandoned? I sure hope not, It is such a great one! It is working for me for the most part, but the problems that have already been stated are still there (on re-upload old pic remains, and the IE problems) Hannah has laid a great foundation, I hope if she is too busy that someone will carry the torch and give this plugin development the attention it deserves. This may sound crazy but I think this should be core WP functionality. Its so useful!! Wheres all the Moshus and Kafs out there? We need your brilliant minds! HaHa.

    OR does anybody know of a similar plugin? I have searched high and low.

  13. RomanofTypethink
    Member
    Posted 6 years ago #

    Fixed the code for alternate user.
    For file profile-picture.php
    at line 19 change
    add_action('show_user_profile', 'add_userpic_fields');
    to

    add_action('show_user_profile', 'add_userpic_fields');
    add_action('edit_user_profile', 'add_userpic_fields');

    For function add_userpic_fields (now on line 80)
    change
    global $user_ID, $image_extensions;
    to

    global $user_ID, $user_id, $image_extensions;
    
    	$user_to_show = $user_ID;
    	if(!empty($user_id))
    		$user_to_show = $user_id;

    and change (on what is now line 115)

    <img src="<?php _e(author_image_path($user_ID)); ?>" width="150" /></label>

    to

    <img src="<?php _e(author_image_path($user_to_show)); ?>" width="150" /></label>

    For function upload_pic (now on line 123)
    change
    global $image_dir, $user_ID, $image_extensions;
    to

    global $image_dir, $user_ID, $image_extensions, $user_id;
    
    	$user_to_edit = $user_ID;
    	if ( !empty($user_id) && current_user_can('edit_user', $user_id) )
    		$user_to_edit = $user_id;

    and change (now line 136)
    $old_pic_path = clean_path(ABSPATH . '/' . $image_dir . '/' . $user_ID . '.' . $image_extension);
    to
    $old_pic_path = clean_path(ABSPATH . '/' . $image_dir . '/' . $user_to_edit . '.' . $image_extension);
    and change (now line 144)
    $file_path = clean_path(ABSPATH . '/' . $image_dir . '/' . $user_ID . '.' . $file_ext);
    to

    $file_path = clean_path(ABSPATH . '/' . $image_dir . '/' . $user_to_edit . '.' . $file_ext);

  14. 78speed
    Member
    Posted 6 years ago #

    Is there a clean version of the code to retrieve the profile picture? I tried the code listed on the plugin page, but keep getting error messages. Now I'm taking thedesigncoaliti's advice and using a different bit of code to retrieve the picture, but this obviously has some limitations as it wasn't originally meant for this plugin.

    RomanofTypeth - that's great you've made some fixes. Could you possibly present the whole profile-picture.php somewhere?

    Also, how could I make a "contributors" page to display a summary of all registered users profiles? It's not making sense yet.

    I hope to see this plugin developed, and would especially appreciate more control and options within the wordpress dashboard.

    Thanks! and keep it up!

  15. RomanofTypethink
    Member
    Posted 6 years ago #

    Hey 78speed, as far the link to the modified plugin, here it is below:

    http://snipplr.com/view/3482/modified-profilepicturephp-plugin-for-wordpress/

    For the "contributors", I am guessing you are saying to list all users based on the role. For this you need to download, get-author-profile from gruff: http://guff.szub.net/2005/01/31/get-author-profile/.

    If you want to include the picture in the template, then just the follow the instructions on geekgirl, the orig. developer. You will prob. need to use Template #1

  16. therealhopeful
    Member
    Posted 6 years ago #

    Hello Roman. Is this get-author-profile a plugin? 78, why won't wp_list_authors() work for you? That's what I use to make a "contributor" page. You can see an example of this at http://www.correctnesscommentary.com/about

    Also, I like that a plugin for user profile photos has been made. I've been asking for something like this as well for a while now. However, I ended up just coding it in myself using the Cimy-extra-fields plugin as a crutch:

    $cimyval = @get_cimyFieldValue($curauth->ID, 'USER_PHOTO');
          if ($cimyval == !NULL) {
            if ($cimyval == '/wp/wp-content/uploads/authors/') { ?>
              <img src="<?php echo get_cimyFieldValue($curauth->ID, 'USER_PHOTO'); echo $curauth->user_login; ?>.jpg"
                   alt="<?php echo $photo_title; ?>"
                   title="<?php echo $photo_title; ?>" /><?php
              } else { ?>
              <img src="<?php echo get_cimyFieldValue($curauth->ID, 'USER_PHOTO'); ?>"
                   alt="<?php echo $photo_title; ?>"
                   title="<?php echo $photo_title; ?>" /><?php
              }
            }
  17. RomanofTypethink
    Member
    Posted 6 years ago #

    Yes, get-author-profile.php is a plugin, I think it's mentioned in the description on the page:
    http://guff.szub.net/2005/01/31/get-author-profile/
    somewhere.

Topic Closed

This topic has been closed to new replies.

About this Topic