diff options
author | cash <cash.costello@gmail.com> | 2011-11-20 18:41:34 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-20 18:41:34 -0500 |
commit | 9b814dd2124a8c71dec3a8d510d288f040b03b9e (patch) | |
tree | 63a53f0445df06963de1537af58faba38213b587 /activate.php | |
parent | c51b483f24936c8d04a54a6999412937ec21c49a (diff) | |
download | elgg-9b814dd2124a8c71dec3a8d510d288f040b03b9e.tar.gz elgg-9b814dd2124a8c71dec3a8d510d288f040b03b9e.tar.bz2 |
working on settings
Diffstat (limited to 'activate.php')
-rw-r--r-- | activate.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/activate.php b/activate.php new file mode 100644 index 000000000..ca74c6119 --- /dev/null +++ b/activate.php @@ -0,0 +1,32 @@ +<?php +/** + * Activate Tidypics + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +// register classes +if (get_subtype_id('object', 'album')) { + update_subtype('object', 'album', 'TidypicsAlbum'); +} else { + add_subtype('object', 'album', 'TidypicsAlbum'); +} +if (get_subtype_id('object', 'image')) { + update_subtype('object', 'image', 'TidypicsImage'); +} else { + add_subtype('object', 'image', 'TidypicsImage'); +} + +// set default settings +$plugin = elgg_get_plugin_from_id('tidypics'); + +$defaults = array( + 'tagging' => true, +); + +foreach ($defaults as $name => $value) { + if ($plugin->getSetting($name) === null) { + $plugin->setSetting($name, $value); + } +} |