$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');
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)) {
}
// set default settings
-$plugin = elgg_get_plugin_from_id('tidypics');
$image_sizes = array();
$image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600;
);
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');
}
}
*/
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) {
<?xml version="1.0" encoding="UTF-8"?>
<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
- <name>Tidypics Photo Gallery</name>
- <author>Cash Costello</author>
- <version>1.8.0-rc1</version>
- <description>A photo gallery with albums, tagging, and a slideshow.</description>
+ <name>Lightpics Photo Gallery</name>
+ <author>Lorea Developers</author>
+ <version>1.8-rc1</version>
+ <description>A simple photo gallery plugin, forked from Tidypics.</description>
<category>content</category>
<category>multimedia</category>
- <website>https://github.com/cash/Tidypics</website>
- <copyright>Cash Costello 2011-2012</copyright>
+ <website>https://lorea.org</website>
+ <copyright>(C) Cash Costello 2011-2012, Lorea 2012</copyright>
<license>GNU General Public License Version 2</license>
<requires>
<type>elgg_release</type>
<version>1.8</version>
</requires>
-</plugin_manifest>
\ No newline at end of file
+ <conflicts>
+ <type>plugin</type>
+ <name>tidypics</name>
+ </conflicts>
+</plugin_manifest>
*/
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");
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");
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":
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
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:
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 = "<div class=\"elgg-markdown\">$text</div>";
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 = "<div class=\"elgg-markdown\">$text</div>";