aboutsummaryrefslogtreecommitdiff
path: root/activate.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-20 18:41:34 -0500
committercash <cash.costello@gmail.com>2011-11-20 18:41:34 -0500
commit9b814dd2124a8c71dec3a8d510d288f040b03b9e (patch)
tree63a53f0445df06963de1537af58faba38213b587 /activate.php
parentc51b483f24936c8d04a54a6999412937ec21c49a (diff)
downloadelgg-9b814dd2124a8c71dec3a8d510d288f040b03b9e.tar.gz
elgg-9b814dd2124a8c71dec3a8d510d288f040b03b9e.tar.bz2
working on settings
Diffstat (limited to 'activate.php')
-rw-r--r--activate.php32
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);
+ }
+}