diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-14 08:39:12 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-14 08:39:12 -0400 |
commit | 39c88e7b82d8bd6483e668ef80cbbe08d3a45ac7 (patch) | |
tree | 28f807c8e1bc3107c7361fc8f8d684515b8d64aa | |
parent | 4761adf8eee9feadd77599682ef192b56520d11d (diff) | |
download | elgg-39c88e7b82d8bd6483e668ef80cbbe08d3a45ac7.tar.gz elgg-39c88e7b82d8bd6483e668ef80cbbe08d3a45ac7.tar.bz2 |
different solution for letting people use flash uploader through walled garden
-rw-r--r-- | start.php | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -74,19 +74,14 @@ function tidypics_init() { // notifications register_notification_object('object', 'album', elgg_echo('tidypics:newalbum_subject')); - elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'tidypics_notify_message'); - // ajax handler for uploads when use_only_cookies is set - // using the all forward hook to work with walled gardens. - elgg_register_plugin_hook_handler('forward', 'all', 'tidypics_ajax_session_handler'); + // allow people in a walled garden to use flash uploader + elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'tidypics_walled_garden_override'); - /* - // Register for notifications + // flash session work around for uploads when use_only_cookies is set + elgg_register_plugin_hook_handler('forward', 'csrf', 'tidypics_ajax_session_handler'); - // slideshow plugin hook - register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow'); -*/ // Register actions $base_dir = elgg_get_plugins_path() . 'tidypics/actions/photos'; elgg_register_action("photos/delete", "$base_dir/delete.php"); @@ -483,6 +478,16 @@ function tp_mostrecentimages($max = 8, $pagination = true) { } /** + * Allows the flash uploader actions through walled garden since + * they come without the session cookie + */ +function tidypics_walled_garden_override($hook, $type, $pages) { + $pages[] = 'action/photos/image/ajax_upload'; + $pages[] = 'action/photos/image/ajax_upload_complete'; + return $pages; +} + +/** * Work around for Flash/session issues * * @param string $hook |