QuoteAug 31, 2009 06:120 likesLike
 

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

...
QuoteAug 31, 2009 08:530 likesLike
 

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.

QuoteAug 31, 2009 11:490 likesLike
 

Thank you Mydatery,

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

...
QuoteDec 11, 2011 06:180 likesLike
 

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