From 1c0b514cd009d66544aba2902abc2000f5cb5f43 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 7 Feb 2012 18:24:42 -0800 Subject: Refs #16. Added server info page. --- languages/en.php | 27 +++- pages/admin.php | 1 + pages/server_analysis.php | 143 --------------------- start.php | 1 + .../administer_utilities/tidypics_server_info.php | 130 +++++++++++++++++++ views/default/admin/statistics/tidypics.php | 6 + views/default/tidypics/admin/settings.php | 2 + views/default/tidypics/admin/tidypics.php | 3 + 8 files changed, 169 insertions(+), 144 deletions(-) delete mode 100644 pages/server_analysis.php create mode 100644 views/default/admin/administer_utilities/tidypics_server_info.php diff --git a/languages/en.php b/languages/en.php index 54cf2f258..4e56c0074 100644 --- a/languages/en.php +++ b/languages/en.php @@ -11,8 +11,11 @@ $english = array( 'photos' => "Photos", 'album' => "Photo Album", 'albums' => "Photo Albums", + 'tidypics:disabled' => 'Disabled', + 'tidypics:enabled' => 'Enabled', 'admin:settings:tidypics' => 'Tidypics', 'admin:statistics:tidypics' => 'Tidypics', + 'admin:administer_utilities:tidypics_server_info' => 'Tidypics Server Analysis', 'photos:add' => "Create album", 'images:upload' => "Upload photos", @@ -98,7 +101,29 @@ $english = array( 'tidypics:stats:album_comments' => 'Total comments on albums', 'tidypics:stats:views' => 'Total views', 'tidypics:stats:tags' => 'Total tags', - + + // server analysis + 'tidypics:server_info:gd_desc' => 'Elgg requires the GD extension to be loaded', + 'tidypics:server_info:exec_desc' => 'Required for ImageMagick command line', + 'tidypics:server_info:memory_limit_desc' => 'Change memory_limit to increase', + 'tidypics:server_info:peak_usage_desc' => 'This is approximately the minimum per page', + 'tidypics:server_info:upload_max_filesize_desc' => 'Max size of an uploaded image', + 'tidypics:server_info:post_max_size_desc' => 'Max post size = sum of images + html form', + 'tidypics:server_info:max_input_time_desc' => 'Time script waits for upload to finish', + 'tidypics:server_info:max_execution_time_desc' => 'Max time a script will run', + 'tidypics:server_info:use_only_cookies_desc' => 'Cookie only sessions may affect the Flash uploader', + + 'tidypics:server_info:php_version' => 'PHP Version', + 'tidypics:server_info:memory_limit' => 'Memory Available to PHP', + 'tidypics:server_info:peak_usage' => 'Memory Used to Load This Page', + 'tidypics:server_info:upload_max_filesize' => 'Max File Upload Size', + 'tidypics:server_info:post_max_size' => 'Max Post Size', + 'tidypics:server_info:max_input_time' => 'Max Input Time', + 'tidypics:server_info:max_execution_time' => 'Max Execution Time', + 'tidypics:server_info:use_only_cookies' => 'Cookie only sessions', + + 'tidypics:server_configuration_doc' => 'Server configuration documentation', + //actions 'album:create' => "Create new album", 'album:add' => "Add Photo Album", diff --git a/pages/admin.php b/pages/admin.php index 1a04ab279..c6be1212a 100644 --- a/pages/admin.php +++ b/pages/admin.php @@ -1,6 +1,7 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PHP version
GDElgg requires the GD extension to be loaded
IMagick PHP extension
exec()Required for ImageMagick command line
Memory Available to PHPChange memory_limit to increase
Memory Used to Load This PageThis is approximately the minimum per page
Max File Upload SizeMax size of an uploaded image
Max Post SizeMax post size = sum of images + html form
Max Input Time sTime script waits for upload to finish
Max Execution Time sMax time a script will run
GD imagejpeg
GD imagepng
GD imagegif
EXIF
Cookie only sessionsCookie only sessions may affect the Flash uploader
-
- ">Server configuration doc -
-
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GD
IMagick
exec()
s
s
GD imagejpeg
GD imagepng
GD imagegif
EXIF
+ +

+ '/mod/tidypics/docs/configure_server.txt', + 'text' => elgg_echo('tidypics:server_configuration_doc') + )); + ?> +

+dbprefix}entities where subtype={$img_type}"; $total = get_data_row($query); $num_images = $total->total; $stats['images'] = $total->total; +// number of albums $img_type = get_subtype_id('object', 'album'); $query = "SELECT count(guid) as total from {$CONFIG->dbprefix}entities where subtype={$img_type}"; $total = get_data_row($query); @@ -24,15 +26,19 @@ $options = array( 'annotation_name' => 'generic_comment' ); +// number of comments on photos $stats['photo_comments'] = elgg_get_annotations($options); +// number of comments on albums $options['subtype'] = 'album'; $stats['album_comments'] = elgg_get_annotations($options); +// number of views on images $options['subtype'] = 'image'; $options['annotation_name'] = 'tp_view'; $stats['views'] = elgg_get_annotations($options); +// number of photo tags on images if (elgg_get_plugin_setting('tagging', 'tidypics') != 'disabled') { $options['annotation_name'] = 'phototag'; $stats['tags'] = elgg_get_annotations($options); diff --git a/views/default/tidypics/admin/settings.php b/views/default/tidypics/admin/settings.php index e1d20f953..aff6acc8d 100644 --- a/views/default/tidypics/admin/settings.php +++ b/views/default/tidypics/admin/settings.php @@ -1,6 +1,8 @@