aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONFIG.txt73
-rw-r--r--FAQ.txt31
-rw-r--r--docs/configure_server.txt55
-rw-r--r--docs/css_guide.txt87
-rw-r--r--docs/extending_tidypics.txt39
-rw-r--r--languages/en.php16
-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
12 files changed, 142 insertions, 253 deletions
diff --git a/CONFIG.txt b/CONFIG.txt
new file mode 100644
index 000000000..0bfb8513d
--- /dev/null
+++ b/CONFIG.txt
@@ -0,0 +1,73 @@
+
+Troubleshooting
+=================
+If you are experiencing errors, please check your server error log. Tidypics
+writes warnings for most upload related problems. You will see something
+along these lines: "Tidypics warning: user exceeded post limit on image upload"
+
+
+GD PHP Image Library
+=====================
+Elgg requires GD for image resizing of profile avatars. Tidypics uses GD by
+default for resizing. There are two versions GD and GD2. It generally does not matter
+which one you are using and it isn't always apparent which one you are
+running anyway. GD is a memory hog and will cause problems with large images.
+
+imagick PHP Image Library
+=============================
+A significantly better image library than GD. Not as common as GD. You may need
+to ask your system administrator to install this. The server info tab in Tidypics
+settings will tell you whether it is installed.
+
+ImageMagick command line tools
+===============================
+This requires that the PHP function exec() is available which is often disbaled
+for security reasons. You can find ImageMagick on your server by running "which convert".
+
+Memory Available to PHP
+=========================
+The amount of RAM available to a single PHP process. This can have an effect on
+how large an image you can resize (especially if you are running Tidypics with GD).
+The best place to change it is .htaccess.
+
+Memory Used to Load This Page
+==============================
+This gives you a baseline of how much memory is being used to load the Elgg
+framework and plugins. Subtract this number from the total amount of memory available
+for image processing. Remember that GD requires a lot of memory - more than just the
+size of the image.
+
+Max File Upload Size
+=======================
+The largest file that can be uploaded. You can adjust this in .htaccess.
+
+Max Post Size
+===============
+The largest amount of data that can be submitted. For Tidypics, this affects
+how many large images can be uploaded in a single upload with the basic uploader.
+If this is exceeded, nothing is uploaded and the user gets an error message.
+It can be adjusted in .htaccess.
+
+Max Input Time
+===============
+This is the amount of time PHP will wait for an upload to finish. Your users may
+experience failures if they are uploading large images on a poor connection or if
+your server does not have a lot of bandwidth.
+
+Max Execution Time
+===================
+The longest time a PHP script can run on your server. If a user uploads many
+large images, the resize code may take a long time to complete and will be
+stopped by PHP. If you are seeing problems with this, you probably have a slow server.
+
+GD imagejpeg
+===============
+This tells you whether you can resize JPEG images with GD
+
+GD imagegif
+===============
+This tells you whether you can resize GIF images with GD
+
+GD imagepng
+===============
+This tells you whether you can resize PNG images with GD
diff --git a/FAQ.txt b/FAQ.txt
new file mode 100644
index 000000000..2f0de8165
--- /dev/null
+++ b/FAQ.txt
@@ -0,0 +1,31 @@
+White screen when uploading images
+==================================
+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. A better option is to use
+imagick 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.
+
+
+Question mark images appear
+===========================
+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 command line ImageMagick when your server does not
+support it or specifying the wrong path to the ImageMagick executables.
+
+
+Unable to save settings
+=======================
+If you are unable to settings, Apache may 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.
diff --git a/docs/configure_server.txt b/docs/configure_server.txt
deleted file mode 100644
index 32fb5d86e..000000000
--- a/docs/configure_server.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Server Configuration
------------------------------------
-
-Run your server analysis located in the Tidypics Administration section and
-then read through this document.
-
-If you are experiencing errors, please check your server error log. Tidypics
-writes warnings for most upload related problems. You will see something
-along these lines: "Tidypics warning: user exceeded post limit on image upload"
-
-
-
-GD: Elgg requires GD for image resizing. Tidypics uses GD by default for
-resizing. There are two versions GD and GD2. It generally does not matter
-which one you are using and it isn't always apparent which one you are
-running anyway.
-
-ImageMagick: A significantly better image library than GD. There is a command-line
-version that is commonly available on servers and a PHP extension call imagick that
-you can install on your server (if you have control of your server).
-
-exec: Calls to ImageMagick command-line utilities like convert require that
-exec() be available. On some servers it will be disabled for security reasons.
-
-Memory Available to PHP: The amount of RAM available to a single PHP
-process. This can have an effect on how large an image you can resize
-(especially if you are running Tidypics with GD). The best place to
-change it is .htaccess.
-
-Memory Used to Load This Page: This gives you a baseline of how much
-memory is being used to load the Elgg framework and plugins.
-
-Max File Upload Size: The largest file that can be uploaded. You can
-adjust this in .htaccess.
-
-Max Post Size: The largest amount of data that can be submitted. For
-Tidypics, this affects how many large images can be uploaded in a
-single upload. If this is exceeded, nothing is uploaded and the
-user gets an error message. It can be adjusted in .htaccess.
-
-Max Input Time: This is the amount of time PHP will wait for an
-upload to finish. Your users may experience failures if they are
-uploading large images on a poor connection or if your server
-does not have a lot of bandwidth.
-
-Max Execution Time: The longest time a PHP script can run on your
-server. If a user uploads many large images, the resize code may take
-a long time to complete and will be stopped by PHP. If you are seeing
-problems with this, you probably have a slow server.
-
-GD imagejpeg: jpeg resizing with GD
-
-GD imagegif: gif resizing with GD
-
-GD imagepng: png resizing with GD \ No newline at end of file
diff --git a/docs/css_guide.txt b/docs/css_guide.txt
deleted file mode 100644
index 9663cad1a..000000000
--- a/docs/css_guide.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-Views:
------------------
-all albums view
-album view
-image view
-upload view
-
-
-CSS elements:
--------------------------
-#tidypics_wrapper - wrapper on image view
-
-#tidypics_breadcrumbs - breadcrumbs on image and album views
-
-#tidypics_desc - description/caption in image and album views
-
-.tidypics_info - holds metadata about image/album like tags
-
-#tidypics_controls - image view controls (download, start tagging, etc.)
-
-.tidypics_album_images - border around images - needs work
-
-#tidypics_image_nav - back and next nav controls in image view
-
-#tidypics_image_full - not used
-
-#tidypics_image_wrapper - margins for image in image view
-
-#tidypics_image - frame
-
-.tidypics_album_cover - all albums view and river images
-
-.tidypics_album_widget_single_item
-
-.tidypics_album_gallery_item
-
-
-/* ------ tidypics widget view ------ */
-
-#tidypics_album_widget_container
-
-.tidypics_album_widget_timestamp
-
-/* --------- image upload/edit forms ------------ */
-
-#tidpics_image_upload_list
-
-.tidypics_edit_image_container
-
-.tidypics_edit_images
-
-.tidypics_image_info
-
-
-/* ---- tidypics group css ----- */
-
-#group_albums_widget
-
-
-/* --------- tidypics river items ------------ */
-
-.river_object_image_create
-
-.river_object_album_create
-
-.river_object_image_comment
-
-.river_object_album_comment
-
-/* ----------- tagging ---------------- */
-#tidypics_tag_instructions
-
-#tidypics_tag_instruct_text
-
-#tidypics_tag_instruct_button_div
-
-#tidypics_tag_instruct_button
-
-#tidypics_tag_menu
-
-#tidypics_delete_tag_menu
-
-.tidypics_tag
-
-.tidypics_tag_text
-
-#tidypics_phototags_list
diff --git a/docs/extending_tidypics.txt b/docs/extending_tidypics.txt
deleted file mode 100644
index 55e6b5dd5..000000000
--- a/docs/extending_tidypics.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-Extending Tidypics
------------------------------------
-
-*** DISPLAYING THE LATEST PHOTOS ***
-In tidypics/lib/tidypics.php, there is a function tp_get_latest_photos().
-It can be used to display the site-wide latest photos or an individual
-user's latest photos. The documentation explains how you could use that
-function to display the latest photos on your front page if you are using
-the custom front page tutorial plugin from Curverider.
-
-
-*** MAKING TIDYPICS MATCH YOUR THEME ***
-Please check the css guide found in this directory. This will list the
-different css elements and where they are used.
-
-
-*** TIDYPICS EVENTS ***
-1. album created: 'add', 'tp_album'
-2. album updated: 'update', 'tp_album'
-3. album deleted: 'delete', 'tp_album'
-4. photos uploaded: 'upload', 'tp_album' - triggered after a set have been uploaded and resized
-5. photo uploaded: 'upload', 'tp_image' - triggered after each image is resized
-6. photo edited: 'update', 'tp_image'
-7. photo deleted: 'delete', 'tp_image'
-
-*** TIDYPICS PLUGIN HOOKS ***
-1. album slideshow: 'tp_slideshow', 'album' - return false to not have a slideshow, otherwise return link to slideshow
-2. watermark - return false to prevent default watermark
- 'tp_watermark', 'gd'
- 'tp_watermark', 'imagick'
- 'tp_watermark', 'imagemagick'
-3. image link: 'tp_image_link', 'image' - return false for no link or a url otherwise - params passed to this will porbably change in 1.7
-
-
-*** IMAGE MENU EXTENSIONS ***
-Below an image is a div called tidypics_controls. By default it contains controls
-like tagging or downloading an image. You can change what is shown there by overridding
-or extending the tidypics/image_menu view.
-
diff --git a/languages/en.php b/languages/en.php
index 624b5234c..36ac38877 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -115,21 +115,13 @@ $english = array(
'tidypics:server_info:max_execution_time' => 'Max Execution Time',
'tidypics:server_info:use_only_cookies' => 'Cookie only sessions',
+ 'tidypics:server_config' => 'Server Configuration',
'tidypics:server_configuration_doc' => 'Server configuration documentation',
- // library tools
- 'tidypics:lib_tools' => 'Image library tools',
- 'tidypics:lib_tools:overview' =>
- 'An image library is required by Tidypics to perform various manipulations: resizing on upload, watermarking, rotation, and cropping.
- There are three image library options with Tidypics: PHP extension <a href="http://www.php.net/manual/en/book.image.php">GD</a>,
- <a href="http://www.imagemagick.org/">ImageMagick</a> called via a system call, and the PHP extension
- <a href="http://pecl.php.net/package/imagick/">imagick</a>. GD is the most common of the three on hosted servers but suffers
- from serious memory usage problems when resizing photos. If you have access to ImageMagick (whether through system calls or the
- PHP extension), we recommend that you use that.',
+ // ImageMagick test
'tidypics:lib_tools:testing' =>
- 'To use the ImageMagick executables, PHP must be configured to allow calls to exec(). You can see the
- configuration of your server on the "Server Information" tab.. Next, you need to determine the path to
- ImageMagick on your server. Your hosting service should be able to provide this to you. You can test
+ 'Tidypics needs to know the location of the ImageMagick executables if you have selected it
+ as the image library. Your hosting service should be able to provide this to you. You can test
if the location is correct below. If successful, it should display the version of ImageMagick installed
on your server.',
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>