Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, get-author-profile.php is a plugin, I think it’s mentioned in the description on the page:
    https://guff.szub.net/2005/01/31/get-author-profile/
    somewhere.

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

    https://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: https://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

    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);

Viewing 3 replies - 1 through 3 (of 3 total)