aboutsummaryrefslogtreecommitdiff
path: root/views/default/settings
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-11 22:00:24 -0400
committercash <cash.costello@gmail.com>2011-10-11 22:00:24 -0400
commitf782c22748e416d088902bc838ed28aa57f7520b (patch)
tree0472710864002aa1f29c79308591168eacb90d3f /views/default/settings
parenta65e752f9ac005aae499c4bc6f97916fa01ce29c (diff)
downloadelgg-f782c22748e416d088902bc838ed28aa57f7520b.tar.gz
elgg-f782c22748e416d088902bc838ed28aa57f7520b.tar.bz2
auto setting reasonable defaults on first use
Diffstat (limited to 'views/default/settings')
-rw-r--r--views/default/settings/tidypics/edit.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/views/default/settings/tidypics/edit.php b/views/default/settings/tidypics/edit.php
index a6b2c2d0c..681007ac5 100644
--- a/views/default/settings/tidypics/edit.php
+++ b/views/default/settings/tidypics/edit.php
@@ -1,4 +1,32 @@
<?php
+/**
+ * Tidypics plugin settings view
+ *
+ * Set reasonable defaults if no settings saved
+ */
+
+if (!get_plugin_setting('image_lib', 'tidypics')) {
+ set_plugin_setting('image_lib', 'GD', 'tidypics');
+ set_plugin_setting('download_link', 'enabled', 'tidypics');
+ set_plugin_setting('tagging', 'enabled', 'tidypics');
+ set_plugin_setting('photo_ratings', 'disabled', 'tidypics');
+ set_plugin_setting('exif', 'disabled', 'tidypics');
+ set_plugin_setting('view_count', 'disabled', 'tidypics');
+ set_plugin_setting('maxfilesize', '5', 'tidypics');
+ set_plugin_setting('quota', '0', 'tidypics');
+ set_plugin_setting('img_river_view', 'batch', 'tidypics');
+ set_plugin_setting('album_river_view', 'set', 'tidypics');
+
+ $image_sizes = array();
+ $image_sizes['large_image_width'] = 600;
+ $image_sizes['large_image_height'] = 600;
+ $image_sizes['small_image_width'] = 153;
+ $image_sizes['small_image_height'] = 153;
+ $image_sizes['thumb_image_width'] = 60;
+ $image_sizes['thumb_image_height'] = 60;
+ set_plugin_setting('image_sizes', serialize($image_sizes), 'tidypics');
+}
+
global $CONFIG;
$system_url = $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php';
$settings_url = $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php';