bbPress Plugin Browser »

User Photo (1.1)

Download

Version: 1.1

Other Versions

Last Updated: 2008-9-20

Requires bbPress Version: 0.9.0.2 or higher

Compatible up to: 1.0 alpha

Author Homepage »

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(3)

Your Rating

Author: Eduardo Graells

Allows a user to associate a profile photo with their account. Uploaded images are resized to fit the dimensions specified on the options page; a thumbnail image correspondingly is also generated.

The resized photo replaces the built-in avatar. It's optional to display the Gravatar (or your configured avatar in the bbPress options) in case of a user without an uploaded photo.

This plugin is based on the original User Photo for WordPress by Weston Ruster. It has been ported and simplified by Eduardo Graells.

TODOs:

  • Make an options page.
  • Improve the upload form.

  1. Hey, I've been looking for something like this! One question...

    Does this work in concert with Gravatar? I already have Gravatar on my forum, and some users have Gravatars. I don't want to force them to upload a new photo if the Gravatar is already working for them. But I know some will never use Gravatar, and I'd like a way for them to upload their own photo.

    Posted: 3 years ago #
  2. Oops, i forgot to edit the description of the plugin :p

    Mafhok: what you need it's not implemented, but you can do it by editing the bb_get_avatar function.

    Posted: 3 years ago #
  3. yo Malfhok! not just u.. it's been years for this simple function to act solid in bbpress-wordpress or bbpress-wpmu!
    i just don't get it :(

    @Detective.. is it the same with wpmu? as it for wordpress?

    Posted: 3 years ago #
  4. Sorry, i don't understand what you are asking. This plugin is a port of the WordPress' one, so it is compatible if you set the same paths in both plugins. In fact, i use it this way :)

    Malfhok, i just uploaded 1.1. Now you can configure the use of gravatars if the user hasn't uploaded a photo.

    Posted: 3 years ago #
  5. i'll try it! thank you.. :D

    Posted: 3 years ago #
  6. Alright, thank you! I'll give it a try later when I have some time.

    Posted: 3 years ago #
  7. Hey, Detective,

    I gave this a shot on my bbPress, and it doesn't seem to work with Safari. I've asked some of my non-Safari users to test it on their browsers, and I'll post their feedback here if it works.

    Posted: 3 years ago #
  8. Thanks. I have never used Safari, so i don't know if it works :)

    Posted: 3 years ago #
  9. pircy

    Member

    It works, but i have placed ; enctype="multipart/form-data" in the form in profile-edit.php ...

    Great...

    Posted: 3 years ago #
  10. Help!! I have installed the plugin just as the instructions say. I added the code to the profile_edit.php file and the upload box and link show up on my profile edit pages. I even set the url's in the user-photo-for-bbpress.php file but it's still not working. I am a newby at PHP. Can someone tell me what I am doing wrong here? It allows me to hit browse, select the file and then when I hit update profile it does not upload the file. I made sure to set my folder it's supposed to upload to as 777. HELP!!!

    Posted: 3 years ago #
  11. how can i show up the Avatar on the frontpage?

    Posted: 3 years ago #
  12. NandanNaik

    Member

    @typvsns, Here's what you can do to fix the problem: Open profile_edit.php and add:id="your-profile" to the form tag that hosts your file upload HTML element.

    This is because enctype="multipart/form-data" is added to the form via some javascript from the User Photo plugin. And this will not get added the way the form tag in profile_edit.php currently is, because the script looks for a form element with id="your-profile". You will need the enctype="multipart/form-data" added to form tag to successfully upload files.

    Posted: 3 years ago #
  13. I'm having issues with uploads too. The option to upload an avatar shows fine, however it doesn't upload anything and just keeps the avatar blank.

    NandanNaik, could you please explain your solution a bit more?

    Posted: 3 years ago #
  14. Please explain where in the profile-edit.php I should enter the extra elements of code. The Readme says 'inside the form' but I'm not sure what that means, and I'm not getting any upload options displayed - so I'm obviously not doing it right!

    Nor do I understand what is meant by the instruction to "add :id="your-profile" to the form tag that hosts your file upload HTML element in profile-edit.php". I'm not seeing anything about file uploads ...

    I have created a new subdirectory with permissions set to 777, and I have edited the user-photo-for-bbpress.php file as instructed - but I think I'm failing at the profile-edit.php step.

    Please help, as my few users are muttering about not being able to upload images of themselves once they've got through the registration.

    Posted: 3 years ago #
  15. sockmoney

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    Nice plugin! Works great after I added the id="your-profile" to the profile-edit.php

    Posted: 3 years ago #
  16. allthingsweb

    Member

    I was really excited to find this plugin. It seemed like it was the perfect thing. However...

    You're installation instructions, and the answers on this page are simply not descriptive enough where details are imperative. You say put this in the template profile-edit.php, but you don't say where specifically. Saying 'in the form' just isn't descriptive enough, especially when it's all in code. It would be extremely helpful, and save a lot of time if you provided a line number in the code, or an example of where you put it like this:

    Insert this line of code on line 49 of the profile-edit.php, right above the line that says:

    // Find out if we have a valid email address
    if ( isset( $user_email ) && ......

    So it would look like this:

    userphoto_display_selector_fieldset($user->ID);
    // Find out if we have a valid email address
    if ( isset( $user_email ) && ......

    I've tried it here too, and it still doesn't work. The only place I can see the upload field and button is if I put this code at the top on line 3 or 19, or at the bottom on line 137, but of course both of these locations are outside of the form.

    You also mention that we should be putting in id="your-profile" in the form tag. But you don't provide the exact location, or the proper syntax. The double quotes will mess up the entire thing.

    I'd love to use this plugin. But after spending the last two hours trying to get it to work. I'm about ready to abandon it all together. If you could provide a little more specifics, like line numbers, and better descriptions as to where to place the code, web designers like me would would much happier with your product, and would be recommending it to others and using it for our clients projects.

    Hoping for resolution... and still smiling.

    Posted: 3 years ago #
  17. I'll update the plugin to remove the "your-profile" requirement.

    Check out this profile-edit.php example (edited from kakumei):

    <?php bb_get_header(); ?>
    
    <h3 class="bbcrumb"><a href="<?php bb_option('uri'); ?>"><?php bb_option('name'); ?></a> &raquo; <?php _e('Edit Profile'); ?></h3>
    <h2 id="userlogin"><?php echo get_user_name( $user->ID ); ?></h2>
    <form id="your-profile" method="post" action="<?php profile_tab_link($user->ID, 'edit');  ?>">
    <fieldset>
    <legend><?php _e('Profile Info'); ?></legend>
    <?php bb_profile_data_form(); ?>
    </fieldset>
    
    <?php userphoto_display_selector_fieldset($user->ID); ?>
    
    <?php if ( bb_current_user_can( 'edit_users' ) ) : ?>
    <fieldset>
    <legend><?php _e('Administration'); ?></legend>
    <?php bb_profile_admin_form(); ?>
    </fieldset>
    <?php endif; ?>
    
    <?php if ( bb_current_user_can( 'change_user_password', $user->ID ) ) : ?>
    <fieldset>
    <legend><?php _e('Password'); ?></legend>
    <p><?php _e('To change your password, enter a new password twice below:'); ?></p>
    <?php bb_profile_password_form(); ?>
    </fieldset>
    <?php endif; ?>
    <p class="submit right">
      <input type="submit" name="Submit" value="<?php echo attribute_escape( __('Update Profile &raquo;') ); ?>" />
    </p>
    </form>
    <form method="post" action="<?php profile_tab_link($user->ID, 'edit');  ?>">
    <p class="submit left">
    <?php bb_nonce_field( 'edit-profile_' . $user->ID ); ?>
    <?php user_delete_button(); ?>
    </p>
    </form>
    
    <?php bb_get_footer(); ?>
    Posted: 3 years ago #
  18. When I installed this plugin (I hadn't added many, as there aren't a whole lot for BBPress yet :-) ), I got frustrated for about ten seconds b/c the avatar pic I was trying to upload wasn't showing. Then I changed the permissions on the my-plugins folder and everything was hunky-dorey. Thanks for the plugin... very simple, and to the point. I look forward to its future updates!

    Posted: 2 years ago #
  19. Hi everyone,

    I had no problem getting the upload form into profile-edit.php... but am having trouble getting phtoos to actually upload. I have a folder named userphotos set up with chmod 777, but when I upload a photo, nothing gets loaded into that folder.

    Does that folder need to be in the my-plugins folder?

    Posted: 2 years ago #

RSS feed for this topic

Add a Comment »

You must log in to post.