aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-07-14 10:40:14 -0400
committerCash Costello <cash.costello@gmail.com>2012-07-14 10:40:14 -0400
commite9f0301ba2235d3b8a5f3e7b40c6e98f64edcc0a (patch)
treef0ede96ec27c48bd33c8b95a693c53d1cd9a7fe5 /views/default
parent8d3f4e55c765781824902f763ab499d49d3ce430 (diff)
downloadelgg-e9f0301ba2235d3b8a5f3e7b40c6e98f64edcc0a.tar.gz
elgg-e9f0301ba2235d3b8a5f3e7b40c6e98f64edcc0a.tar.bz2
cleaned up the admin area of tidypics
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/settings/tidypics.php11
-rw-r--r--views/default/admin/settings/tidypics/help.php53
-rw-r--r--views/default/admin/settings/tidypics/image_lib.php6
-rw-r--r--views/default/admin/settings/tidypics/server_config.php14
-rw-r--r--views/default/admin/settings/tidypics/server_info.php8
-rw-r--r--views/default/admin/settings/tidypics/thumbnail.php2
6 files changed, 34 insertions, 60 deletions
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 = <<<HTML
-<p>
-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).
-</p>
-<p>
-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.
-</p>
-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 =<<<HTML
-<p>
-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.
-</p>
-<p>
-Another possible cause is using ImageMagick when your server does not support it or specifying
-the wrong path to the ImageMagick executables.
-</p>
-HTML;
-
-echo elgg_view_module('inline', $title, $body);
-
-
-$title = 'Unable to save settings';
-$body =<<<HTML
-<p>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.
-</p>
-HTML;
-
-echo elgg_view_module('inline', $title, $body);
+$content = "<div class=\"elgg-markdown\">$text</div>";
+echo elgg_view_module('inline', elgg_echo('tidypics:settings:help'), $content);
diff --git a/views/default/admin/settings/tidypics/image_lib.php b/views/default/admin/settings/tidypics/image_lib.php
index 44a7eb847..6e519b607 100644
--- a/views/default/admin/settings/tidypics/image_lib.php
+++ b/views/default/admin/settings/tidypics/image_lib.php
@@ -1,14 +1,14 @@
<?php
/**
- * Tidypics image library tools
+ * Test the location of ImageMagick
*/
-$content = '<p>' . elgg_echo('tidypics:lib_tools:overview') . '</p>';
$content .= '<p>' . elgg_echo('tidypics:lib_tools:testing') . '</p>';
$content .= '<p><label>' . elgg_echo('tidypics:settings:im_path');
$content .= elgg_view('input/text', array(
'name' => 'im_location'
));
+$content .= '</p><p>';
$content .= elgg_view('input/submit', array(
'value' => elgg_echo('submit'),
'id' => 'tidypics-im-test'
@@ -16,7 +16,7 @@ $content .= elgg_view('input/submit', array(
$content .= '</p>';
$content .= '<p id="tidypics-im-results"></p>';
-echo elgg_view_module('inline', elgg_echo('tidypics:lib_tools'), $content);
+echo elgg_view_module('inline', 'ImageMagick', $content);
?>
<script type="text/javascript">
diff --git a/views/default/admin/settings/tidypics/server_config.php b/views/default/admin/settings/tidypics/server_config.php
new file mode 100644
index 000000000..8268b646a
--- /dev/null
+++ b/views/default/admin/settings/tidypics/server_config.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Tidypics server configuration
+ *
+ */
+
+elgg_load_library('elgg:markdown');
+
+$faq = elgg_get_plugins_path() . 'tidypics/CONFIG.txt';
+$text = Markdown(file_get_contents($faq));
+
+$content = "<div class=\"elgg-markdown\">$text</div>";
+
+echo elgg_view_module('inline', elgg_echo('tidypics:server_config'), $content);
diff --git a/views/default/admin/settings/tidypics/server_info.php b/views/default/admin/settings/tidypics/server_info.php
index 96ccc555f..1f32ab008 100644
--- a/views/default/admin/settings/tidypics/server_info.php
+++ b/views/default/admin/settings/tidypics/server_info.php
@@ -115,14 +115,6 @@ ob_start();
</tr>
</table>
-<p class="ptl">
- <?php
- echo elgg_view('output/url', array(
- 'href' => '/mod/tidypics/docs/configure_server.txt',
- 'text' => elgg_echo('tidypics:server_configuration_doc')
- ));
- ?>
-</p>
<?php
$content = ob_get_clean();
diff --git a/views/default/admin/settings/tidypics/thumbnail.php b/views/default/admin/settings/tidypics/thumbnail.php
index 502b5739e..5f9769e91 100644
--- a/views/default/admin/settings/tidypics/thumbnail.php
+++ b/views/default/admin/settings/tidypics/thumbnail.php
@@ -17,6 +17,8 @@ $submit = elgg_view('input/submit', array(
$body .=<<<HTML
<p>
<label>$im_id $input</label>
+ </p>
+ <p>
$submit
<div id="elgg-tidypics-im-results"></div>
</p>