Flat Theme & JomSocial 4.3.5 Now AvailableMore
League Bundle $1335 $599 Read More

Change Log

A changelog is a log of all notable changes made to a JomSocial.

onAfterPhotoDelete

Description

This event trigger after the photo is deleted.

@since 1.6

Params

  • Photo - array, consist of photo object

{code}

CTablePhoto Object
(
[id] => 13
[albumid] => 5
[name] =>
[caption] => cwindow_type
[permissions] => 0
[created] => 2009-10-20 04:52:14
[thumbnail] => images/photos/63/5/thumb_ff5e436b8148d10a7750abab.jpg
[image] => images/photos/63/5/ff5e436b8148d10a7750abab.jpg
[creator] => 63
[published] => 1
[original] => images/originalphotos/63/5/ff5e436b8148d10a7750abab.jpg
)

{/code}

Examples

{code}

function onAfterPhotoDelete($photos) 
{
$photoObj = $photos[0];
$photoCaption = $photoObj->caption;
 
$message = 'The photo ' . $photoCaption . ' with the id [' . $photoObj->id . '] has been removed by user [' . $photoObj->creator . ']';
 
$mailfrom = 'system@jomsocial.com';
$fromname = 'www.jomsocial.com';
$email = 'admin@jomsocial.com';
$subject = 'Photo ' . $photoCaption . ' removed';
 
JUtility::sendMail($mailfrom, $fromname, $email, $subject, $message);
 
}

{/code}

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW