$forward_url = $container->getURL(); //forward back to album after deleting pictures\r
$images = array($entity);\r
// plugins can register to be told when a Tidypics image has been deleted\r
- trigger_elgg_event('upload', 'tp_album', $entity);\r
+ trigger_elgg_event('delete', 'tp_image', $entity);\r
} else { //deleting an album\r
$owner_guid = $entity->container_guid;\r
$forward_url = 'pg/photos/owned/' . $container->username;\r
//get all the images from this album as long as less than 999 images\r
$images = get_entities("object", "image", $guid, '', 999); \r
// plugins can register to be told when a Tidypics album has been deleted\r
- trigger_elgg_event('upload', 'tp_album', $entity);\r
+ trigger_elgg_event('delete', 'tp_album', $entity);\r
}\r
\r
// make sure we decrease the repo size for the size quota\r
} else {\r
system_message(elgg_echo('images:edited'));\r
// plugins can register to be told when a Tidypics image has been updated\r
- trigger_elgg_event('update', 'tp_album', $entity);\r
+ trigger_elgg_event('update', 'tp_image', $entity);\r
}\r
\r
forward($entity->getURL());\r
Extending Tidypics\r
-----------------------------------\r
\r
-We will include more information here in the future. For right now, we will \r
-mention that we have included some code to make it easy to put the latest\r
-photos on your front page. See tidypics/lib/tidypics.php and the function\r
-tp_get_latest_photos().\r
+*** DISPLAYING THE LATEST PHOTOS ***\r
+In tidypics/lib/tidypics.php, there is a function tp_get_latest_photos().\r
+It can be used to display the site-wide latest photos or an individual\r
+user's latest photos. The documentation explains how you could use that\r
+function to display the latest photos on your front page if you are using\r
+the custom front page tutorial plugin from Curverider. \r
\r
-
\ No newline at end of file
+\r
+*** MAKING TIDYPICS MATCH YOUR THEME ***\r
+Please check the css guid found in this directory. This will list the \r
+different css elements and where they are used.\r
+\r
+\r
+*** TIDYPICS EVENTS ***\r
+1. album created: 'add', 'tp_album'\r
+2. album updated: 'update', 'tp_album'\r
+3. album deleted: 'delete', 'tp_album'\r
+4. photos uploaded: 'upload', 'tp_album'\r
+5. photo edited: 'update', 'tp_image'\r
+6. photo deleted: 'delete', 'tp_image' \r
+\r
+*** TIDYPICS PLUGIN HOOKS ***\r
+1. album slideshow: 'tp_slideshow', 'album' - return false to not have a slideshow, otherwise return link to slideshow
\ No newline at end of file
}\r
\r
// allow other plugins to override the slideshow\r
- $slideshow_link = trigger_plugin_hook('tidypics:slideshow', 'album', $album, false);\r
+ $slideshow_link = trigger_plugin_hook('tp_slideshow', 'album', $album, null);\r
if ($slideshow_link) {\r
add_submenu_item(elgg_echo('album:slideshow'),\r
$slideshow_link,\r
}\r
\r
// slideshow plugin hook\r
- register_plugin_hook('tidypics:slideshow', 'album', 'tidypics_slideshow');\r
+ register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow');\r
}\r
\r
/**\r
*/\r
function tidypics_slideshow($hook, $entity_type, $returnvalue, $params) {\r
\r
- if ($returnvalue) {\r
- // someone has already added a slideshow\r
+ if ($returnvalue !== null) {\r
+ // someone has already added a slideshow or requested that the slideshow is not used\r
return $returnvalue;\r
}\r
\r