aboutsummaryrefslogtreecommitdiff
path: root/views/default/settings/tidypics/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/settings/tidypics/edit.php')
-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';