About the delete picture...

Hi to all, i have a question :

In the join form i add the upload photo mandatory, but i still have some new user without photo. I think they delete the photo after they make the registration...

What i can do for keep minimum 1 photo to the profile? ( so the member can delete the photo but not the photo select like primary )

Thank to all

...
Quote · 31 Aug 2009

You'll need to go into UploadPhoto.php and look for this section:

 

function deleteMedia( $iPhotoID )
 {
  $aPhotos = $this -> getElementArrayByID( $iPhotoID );
  $sIconSrc = $this -> sMediaDir . 'icon_' . $aPhotos['med_file'];
  $sThumbSrc = $this -> sMediaDir . 'thumb_' . $aPhotos['med_file'];
  $sPhotoSrc = $this -> sMediaDir . 'photo_' . $aPhotos['med_file'];

  $this -> oMediaQuery -> deleteMedia( $this -> iProfileID, $iPhotoID, $this -> sMediaType );
  if( $aPhotos['med_id'] == $aPhotos['PrimPhoto'] )
  {
   $this -> oMediaQuery -> resetPrimPhoto( $this -> iProfileID );
  }

  @unlink( $sIconSrc );
  @unlink( $sThumbSrc );
  @unlink( $sPhotoSrc );
 }

Your going to need to add a delete false 0 to the orange line and an else to continue it.  Don't have time right now to do the full tweak, but I think you get the idea.

Quote · 31 Aug 2009

Thank you Mydatery,

i almost understand what you tell me... i  will try to do...

...
Quote · 31 Aug 2009

sorry i dont understand.. Is it posible that you could upload a copy of UploadPhoto.php with the code written correctly, including your updatede ? 

Quote · 11 Dec 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.