From e9f0301ba2235d3b8a5f3e7b40c6e98f64edcc0a Mon Sep 17 00:00:00 2001
From: Cash Costello
Date: Sat, 14 Jul 2012 10:40:14 -0400
Subject: cleaned up the admin area of tidypics
---
views/default/admin/settings/tidypics.php | 11 ++++-
views/default/admin/settings/tidypics/help.php | 53 ++--------------------
.../default/admin/settings/tidypics/image_lib.php | 6 +--
.../admin/settings/tidypics/server_config.php | 14 ++++++
.../admin/settings/tidypics/server_info.php | 8 ----
.../default/admin/settings/tidypics/thumbnail.php | 2 +
6 files changed, 34 insertions(+), 60 deletions(-)
create mode 100644 views/default/admin/settings/tidypics/server_config.php
(limited to 'views')
diff --git a/views/default/admin/settings/tidypics.php b/views/default/admin/settings/tidypics.php
index cc9875c3b..fcb96b6c8 100644
--- a/views/default/admin/settings/tidypics.php
+++ b/views/default/admin/settings/tidypics.php
@@ -21,7 +21,12 @@ echo elgg_view('navigation/tabs', array(
'selected' => ($tab == 'server_info'),
),
array(
- 'text' => elgg_echo('tidypics:settings:image_lib'),
+ 'text' => elgg_echo('tidypics:server_config'),
+ 'href' => '/admin/settings/tidypics?tab=server_config',
+ 'selected' => ($tab == 'server_config'),
+ ),
+ array(
+ 'text' => 'ImageMagick',
'href' => '/admin/settings/tidypics?tab=image_lib',
'selected' => ($tab == 'image_lib'),
),
@@ -43,6 +48,10 @@ switch ($tab) {
echo elgg_view('admin/settings/tidypics/server_info');
break;
+ case 'server_config':
+ echo elgg_view('admin/settings/tidypics/server_config');
+ break;
+
case 'image_lib':
echo elgg_view('admin/settings/tidypics/image_lib');
break;
diff --git a/views/default/admin/settings/tidypics/help.php b/views/default/admin/settings/tidypics/help.php
index bf08de284..c3ac2477e 100644
--- a/views/default/admin/settings/tidypics/help.php
+++ b/views/default/admin/settings/tidypics/help.php
@@ -2,56 +2,13 @@
/**
* Tidypics Help
*
- * @todo This would be hard to localize cleanly.
*/
-$title = 'White screen when uploading images';
+elgg_load_library('elgg:markdown');
-$body = <<
-Tidypics tries to calculate the maximum size of an image that your server will support. If it
-guesses incorrectly and someone uploads a photo that is too large, the script may crash when
-resizing the image if you are using GD. The easiest way to test this is to set display_errors
-to 1 in your .htaccess file and upload large images. If this causes a problem, a php memory error
-should display on the screen. You can increased your php memory limit (see the docs directory).
-A better option is to use ImageMagick if your server supports it (again see the docs directory).
-
-
-If it is not a memory issue, you should see some other error appear. Once you have fixed the error,
-change display_error back to 0.
-
-HTML;
+$faq = elgg_get_plugins_path() . 'tidypics/FAQ.txt';
+$text = Markdown(file_get_contents($faq));
-echo elgg_view_module('inline', $title, $body);
-
-$title = 'Question mark images appear';
-$body =<<
-If you see question mark images when you look at your albums, this means the resizing of the images
-failed. This could be due to the memory limits as described above. There are other causes. Tidypics
-tries to detect these problems and write the cause to the error log. You should check your server
-error log right after an upload that results in a question mark for these error messages. The messages
-will begin with "Tidypics warning:". It is possible if you have turned off php warnings that you will
-not see these warnings.
-
-
-Another possible cause is using ImageMagick when your server does not support it or specifying
-the wrong path to the ImageMagick executables.
-
-HTML;
-
-echo elgg_view_module('inline', $title, $body);
-
-
-$title = 'Unable to save settings';
-$body =<<If you are unable to settings, there are two possible causes. First,
-Apache can be configured to block pages that use file paths as Tidypics
-does when setting the location of the ImageMagick executable. In this case,
-leave that field blank. Second, there is some bad code in the Izaps video
-plugin that can prevent the settings from being saved. Try disabling that plugin.
-
-HTML;
-
-echo elgg_view_module('inline', $title, $body);
+$content = "