From e4c742e5ce21ae857ad28e0ec24fbe6e267adfaa Mon Sep 17 00:00:00 2001 From: Sem Date: Sun, 29 Jul 2012 04:47:58 +0200 Subject: Changed plugin name to Lightpics. --- actions/photos/admin/upgrade.php | 4 ++-- activate.php | 5 ++--- lib/tidypics.php | 2 +- manifest.xml | 18 +++++++++++------- start.php | 20 ++++++++++---------- views/default/admin/settings/photos/help.php | 2 +- .../default/admin/settings/photos/server_config.php | 2 +- 7 files changed, 28 insertions(+), 25 deletions(-) diff --git a/actions/photos/admin/upgrade.php b/actions/photos/admin/upgrade.php index c9ae1da48..8e03c6bc5 100644 --- a/actions/photos/admin/upgrade.php +++ b/actions/photos/admin/upgrade.php @@ -5,7 +5,7 @@ $plugins_path = elgg_get_plugins_path(); -require_once "{$plugins_path}tidypics/version.php"; +require_once "{$plugins_path}lightpics/version.php"; $local_version = elgg_get_plugin_setting('version', 'tidypics'); @@ -16,7 +16,7 @@ if ($version <= $local_version) { set_time_limit(0); -$base_dir = "{$plugins_path}tidypics/upgrades"; +$base_dir = "{$plugins_path}lightpics/upgrades"; // taken from engine/lib/version.php if ($handle = opendir($base_dir)) { diff --git a/activate.php b/activate.php index 6b8390406..b0f4a0c7f 100644 --- a/activate.php +++ b/activate.php @@ -19,7 +19,6 @@ if (get_subtype_id('object', 'image')) { } // set default settings -$plugin = elgg_get_plugin_from_id('tidypics'); $image_sizes = array(); $image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600; @@ -46,7 +45,7 @@ $defaults = array( ); foreach ($defaults as $name => $value) { - if ($plugin->getSetting($name) === null) { - $plugin->setSetting($name, $value); + if (elgg_get_plugin_setting($name, 'tidypics') === null) { + elgg_set_plugin_setting($name, $value, 'tidypics'); } } diff --git a/lib/tidypics.php b/lib/tidypics.php index 953c68b76..62c4c1c89 100644 --- a/lib/tidypics.php +++ b/lib/tidypics.php @@ -127,7 +127,7 @@ function tidypics_get_image_libraries() { */ function tidypics_is_upgrade_available() { // sets $version based on code - require_once elgg_get_plugins_path() . "tidypics/version.php"; + require_once elgg_get_plugins_path() . "lightpics/version.php"; $local_version = elgg_get_plugin_setting('version', 'tidypics'); if ($local_version === false) { diff --git a/manifest.xml b/manifest.xml index 3f4025988..f1fe63581 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,16 +1,20 @@ - Tidypics Photo Gallery - Cash Costello - 1.8.0-rc1 - A photo gallery with albums, tagging, and a slideshow. + Lightpics Photo Gallery + Lorea Developers + 1.8-rc1 + A simple photo gallery plugin, forked from Tidypics. content multimedia - https://github.com/cash/Tidypics - Cash Costello 2011-2012 + https://lorea.org + (C) Cash Costello 2011-2012, Lorea 2012 GNU General Public License Version 2 elgg_release 1.8 - \ No newline at end of file + + plugin + tidypics + + diff --git a/start.php b/start.php index fc3311d42..b365a65a7 100644 --- a/start.php +++ b/start.php @@ -13,7 +13,7 @@ elgg_register_event_handler('init', 'system', 'tidypics_init'); */ function tidypics_init() { // Register libraries - $base_dir = elgg_get_plugins_path() . 'tidypics/lib'; + $base_dir = elgg_get_plugins_path() . 'lightpics/lib'; elgg_register_library('tidypics:core', "$base_dir/tidypics.php"); elgg_register_library('tidypics:upload', "$base_dir/upload.php"); elgg_register_library('tidypics:resize', "$base_dir/resize.php"); @@ -74,7 +74,7 @@ function tidypics_init() { elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'tidypics_notify_message'); // Register actions - $base_dir = elgg_get_plugins_path() . 'tidypics/actions/photos'; + $base_dir = elgg_get_plugins_path() . 'lightpics/actions/photos'; elgg_register_action("photos/delete", "$base_dir/delete.php"); elgg_register_action("photos/album/save", "$base_dir/album/save.php"); @@ -107,7 +107,7 @@ function tidypics_page_handler($page) { elgg_load_js('tidypics'); - $base = elgg_get_plugins_path() . 'tidypics/pages/photos'; + $base = elgg_get_plugins_path() . 'lightpics/pages/photos'; switch ($page[0]) { case "all": // all site albums case "world": @@ -191,7 +191,7 @@ function tidypics_page_handler($page) { if (isset($page[1])) { set_input('batch', $page[1]); } - include($CONFIG->pluginspath . "tidypics/pages/edit_multiple.php"); + include($CONFIG->pluginspath . "lightpics/pages/edit_multiple.php"); break; case "download": // download an image @@ -204,30 +204,30 @@ function tidypics_page_handler($page) { if (isset($page[1])) { set_input('username', $page[1]); } - include($CONFIG->pluginspath . "tidypics/pages/lists/mostviewedimages.php"); + include($CONFIG->pluginspath . "lightpics/pages/lists/mostviewedimages.php"); break; case "mostrecent": // images uploaded most recently if (isset($page[1])) { set_input('username', $page[1]); } - include($CONFIG->pluginspath . "tidypics/pages/lists/mostrecentimages.php"); + include($CONFIG->pluginspath . "lightpics/pages/lists/mostrecentimages.php"); break; case "recentlyviewed": // images most recently viewed - include($CONFIG->pluginspath . "tidypics/pages/lists/recentlyviewed.php"); + include($CONFIG->pluginspath . "lightpics/pages/lists/recentlyviewed.php"); break; case "recentlycommented": // images with the most recent comments - include($CONFIG->pluginspath . "tidypics/pages/lists/recentlycommented.php"); + include($CONFIG->pluginspath . "lightpics/pages/lists/recentlycommented.php"); break; case "highestrated": // images with the highest average rating - include($CONFIG->pluginspath . "tidypics/pages/lists/highestrated.php"); + include($CONFIG->pluginspath . "lightpics/pages/lists/highestrated.php"); break; case "admin": - include ($CONFIG->pluginspath . "tidypics/pages/admin.php"); + include ($CONFIG->pluginspath . "lightpics/pages/admin.php"); break; default: diff --git a/views/default/admin/settings/photos/help.php b/views/default/admin/settings/photos/help.php index c3ac2477e..1e5bdd254 100644 --- a/views/default/admin/settings/photos/help.php +++ b/views/default/admin/settings/photos/help.php @@ -6,7 +6,7 @@ elgg_load_library('elgg:markdown'); -$faq = elgg_get_plugins_path() . 'tidypics/FAQ.txt'; +$faq = elgg_get_plugins_path() . 'lightpics/FAQ.txt'; $text = Markdown(file_get_contents($faq)); $content = "
$text
"; diff --git a/views/default/admin/settings/photos/server_config.php b/views/default/admin/settings/photos/server_config.php index 8268b646a..b4fe552ec 100644 --- a/views/default/admin/settings/photos/server_config.php +++ b/views/default/admin/settings/photos/server_config.php @@ -6,7 +6,7 @@ elgg_load_library('elgg:markdown'); -$faq = elgg_get_plugins_path() . 'tidypics/CONFIG.txt'; +$faq = elgg_get_plugins_path() . 'lightpics/CONFIG.txt'; $text = Markdown(file_get_contents($faq)); $content = "
$text
"; -- cgit v1.2.3