Hi,
Sorry for the lame title and long post, but this is the only way I could describe my headache of a problem. I am a bit of a newb when it comes to PHP, but am starting to get the general idea(knowledge base is increasing anyway...).
I am building a social network using SocialEngine, and have completely customised the picture gallerys, and profile picture system(hence why I haven't posted this elsewhere).
Currently the system allows users to upload photos to an album, and seperately add their profile picture. I am about 70% of the way through integrating these 2 functions together, but have now hit a major problem. All files in question are attached in the zip!
So basically what I'm asking for is either advice on what I should be doing, or help(if your feeling really friendly) to actualy make the changes.
Line 117 of user_album_update.tpl (template file), this is what I have added to create a link which should generate "http://mysite.com/user_editprofile_photo2.php?photoid=./uploads_user/USERID/IMAGEID.jpg", which it does.
Generated by the following($file_orig is defined earlier on in the file as the current image url):
PHP Code:
<div style='float: left; padding-right: 10px;' id='profilephotomsg_{$files[files_loop].media_id}'><a href="user_editprofile_photo2.php?photoid={$file_orig}"><img src='./images/icons/profile_editphoto_dim16.gif' border='0' class='button'>{lang_print id=20000801}</a></div>
I then need this "photoid" to be assigned in user_editprofile_photo2.php as the image file to move/crop/copy/edit etc INSTEAD of the script recieving an uploaded file as it was supposed to in its original format. This is where I am getting stuck, I have tried a million and one different variations, and have got nowhere. Just blankness where photos should be!
After adding the URL to assign the photoid=??, I tried to call that into user_editprofile_photo2.php by using the following code:
PHP Code:
$photo = $_GET['photoid'];
and then tried deleting the code that refers to $new_photo, and assigning $photo to $photo_newname.
No joy!
I have deleted the code from user_editprofile_photo2.tpl so it goes straight to the cropping procedure.
UvumiCrop-compressed.js is the photo cropping javascript, the other files are attached in a zip file below with user_editprofile_photo2.php being the original file that works for the profile picture upload:
The simple explanation of what I am trying to do is successfully "$_GET" or "$_POST" the "photoid" variable I have added a the URL. I then need to assign this to equal "$photo" which can then be used to move and edit the image.
I think I can take it from there...
Any help would be much appreciated, if I need to provide any more info, then please just ask.
Regards,
Kevin