I finally got around to packaging up the Add User Photo plugin. You can download it here. Unzip it and upload to your plugins directory, and then activate it. You also need to modify line 21 of /wp-admin/profile.php, adding enctype="multipart/form-data" to the form tag.
So at the end of the day, line 21 should look like:
<form name="profile" id="your-profile" action="profile-update.php" method="post" enctype="multipart/form-data">
Does anyone know for WordPress MU, how you can display the 10 most recent profile pictures on the main page of the site? not the bloggers site, but the main site (ie: yoursite.com, not blogger.yoursite.com). I want to have a “Newest Members” section on the main page, but can’t figure this out.
Any help is appreciated.
Thanks,
Mike
Hi,
i’m looking exactly for the meme code with Mike Smith, if someone tell us how sole this problem, it will be very apreciated.
regards
contigo
istanbul design office turkiye
Mike: If you figure it out, I’d love to know, too. My first thought would be just a category called “Newest Members” with (regular WP) posts that you could customize with their photo, some info, etc. Of course, that’s probably not automated either … anyway, just a thought.
I think if you have a space in the name of the file then that gives you an err. I just renamed my .jpg to a std 8.3 file name and it worked for me.
I want to show a page where I can display the author photo and his ‘About yourself’ information. any help is greatly appreciated.
Thanks.
Hi. My problem is that I can’t properly edit my /wp-admin/profile.php file. It’s only 20 lines long. If you can tell me where the edit I’m supposed to make belongs, I’ll be ready to go on to the next issue. For reference, the file looks like this:
?php
/**
* User Profile Administration Panel.
*
* @package WordPress
* @subpackage Administration
*/
/**
* This is a profile page.
*
* @since unknown
* @var bool
*/
define(‘IS_PROFILE_PAGE’, true);
/** Load User Editing Page */
require_once(‘user-edit.php’);
?>
(and thanks for your time. I’m sure the plugin is wonderful.)
You will need to edit the file user-edit.php in line 182. When editing, keep your ‘action’ part blank so your line should look like this:
Code does not show… There you go:
Not sure how to show the code…
There’s an issue with the current plugin that I use to post code in the comments. If you email the code to me, I can put it up manually. Sorry for the hassle.
can you email me the code as well??
Can someone please email the new code as well?
The full code appears in the next comment by Andrew.
I’ve updated GiladG’s original comment with the code he sent me. I’ve also posted this other bit. Thanks for putting up with the situation until I can get it resolved!
From GiladG:
Another issue that I ran into with the plugin and was going to post a solution code was that when updating the profile page one must upload a picture each time because if no picture was included the update script would die saying ‘Please only upload jpg files!’. What I did to fix it was wrap the image processing portion with an IF so if a file was not uploaded the processing portion would be disregarded. So this is what it looks like now (blue is my addition (Editors note: just line one of the code)):
if (is_uploaded_file($_FILES['photoUpload']['tmp_name'])) { if(($_FILES['photoUpload']['type'] == "image/jpeg") || ($_FILES['photoUpload']['type'] == "image/jpg")){ move_uploaded_file($_FILES['photoUpload']['tmp_name'], ABSPATH."/wp-content/images/".$userdata->user_login.".jpg"); } else //die("error: ".$_FILES['photoUpload']['error']); die("<p><strong>Error:</strong> Please only upload jpg files! Your content type is <code>".$_FILES['photoUpload']['type']."</code></p><p>Please <a href='javascript:history.go(-1)' rel="nofollow">go back</a> and try again.</p>"); }Either way, you made my life a whole lot easier with this plugin. Never thought it would be so easy to implement the upload. Thank you for that!
Thanks Andrew.
Quick note, since the colors I had in my email do not show here, only the first line (IF STATEMENT) and the last line (CURLY BRACKET) are my addition. The rest is a part of the original code.
Hey guys,
Just looking to use this plugin. I had made the changes in my useredit.php file. But when i try to upload the photo it shows me the same error everytime.
Can you please update me with the new code please.
Hi,
I had th problem i described in my last comment. The WP version – 2.8.6
Plugin version – downloaded from above.
My blog URL – http://www.financeandinsurancetips.com/
Problem (once again) – Getting “Upload problem again and again”. I mean it says that Please upload .jpg photo. And shows a go back link.
Do you have any more updated on thisplugin?
A couple of notes –
I’m using 2.9.1
I had to edit line 125 instead of 182 in user-edit.php
Also, I kept getting a weird error – content type is is pjpeg. Whatever that is? So I went ahead and edited fergcorp_addUserPhoto.php and made pjpeg instead jpeg an allowable content type.
Then i had to add an images folder (CHMOD 777) in wp-content and now it seems to be working.
Hope this helps for a future update.
Hmm, no it’s not working actually. I see the image in my profile but it isn’t updating my past or future profile images in the comments sections.