diff options
Diffstat (limited to 'views/default/tidypics')
-rw-r--r-- | views/default/tidypics/admin/imagelib.php | 8 | ||||
-rw-r--r-- | views/default/tidypics/admin/thumbnails.php | 33 | ||||
-rw-r--r-- | views/default/tidypics/admin/tidypics.php | 8 |
3 files changed, 46 insertions, 3 deletions
diff --git a/views/default/tidypics/admin/imagelib.php b/views/default/tidypics/admin/imagelib.php index 8f71c75f2..deb32d0f3 100644 --- a/views/default/tidypics/admin/imagelib.php +++ b/views/default/tidypics/admin/imagelib.php @@ -18,24 +18,26 @@ if (get_plugin_setting('tagging', 'tidypics') != "disabled")
$num_tags = count_annotations(0, 'object', 'image', 'phototag');
?>
-<p>
<br />
+<h3>Overview</h3>
+<p>
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.
-</p><p>
+</p>
<h3>Testing ImageMagick Commandline</h3>
+<p>
To use the ImageMagick executables, PHP must be configured to allow calls to exec(). You can check our
<a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/server_analysis.php'; ?>">server analysis page</a> to find out the
configuration of your server. 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 if the location is correct below. If successful, it should display the version of
ImageMagick installed on your server.
</p>
-<p>
<br />
+<p>
<?php echo elgg_echo('tidypics:settings:im_path'); ?><br />
<input name="im_location" type="text" />
<input type="submit" value="Submit" onclick="TestImageMagickLocation();" />
diff --git a/views/default/tidypics/admin/thumbnails.php b/views/default/tidypics/admin/thumbnails.php new file mode 100644 index 000000000..0af59090e --- /dev/null +++ b/views/default/tidypics/admin/thumbnails.php @@ -0,0 +1,33 @@ +<br />
+<h3>Overview</h3>
+<p>
+This page allows you to create thumbnails for images when the thumbnail creation failed during upload.
+You may experience problems with thumbnail creation if your image library in not configured properly or
+if there is not enough memory for the GD library to load and resize an image. If your users have
+experienced problems with thumbnail creation and you have modified your setup, you can try to redo the
+thumbnails. Find the unique identifier of the photo (it is the number near the end of the url when viewing
+a photo) and enter it below.
+</p>
+<h3>Thumbnail Creation</h3>
+<p>
+<b><?php echo elgg_echo('tidypics:settings:im_id'); ?></b>:
+<input name="image_id" type="text" />
+<input type="submit" value="Submit" onclick="TestThumbnailCreation();" />
+</p>
+<div id="im_results"></div>
+<script type="text/javascript">
+function TestThumbnailCreation()
+{
+ var image_id = $('input[name=image_id]').val();
+ $("#im_results").html("");
+ $.ajax({
+ type: "GET",
+ url: "<?php echo $CONFIG->wwwroot . 'mod/tidypics/actions/create_thumbnails.php'; ?>",
+ data: {guid: image_id},
+ cache: false,
+ success: function(html){
+ $("#im_results").html(html);
+ }
+ });
+}
+</script>
\ No newline at end of file diff --git a/views/default/tidypics/admin/tidypics.php b/views/default/tidypics/admin/tidypics.php index 3d31bd52e..7aeb3a195 100644 --- a/views/default/tidypics/admin/tidypics.php +++ b/views/default/tidypics/admin/tidypics.php @@ -7,6 +7,7 @@ $settingsselect = ''; $statsselect = ''; $imagelibselect = ''; + $thumbnailselect = ''; switch($tab) { case 'settings': $settingsselect = 'class="selected"'; @@ -17,6 +18,9 @@ case 'imagelib': $imagelibselect = 'class="selected"'; break; + case 'thumbnail': + $thumbnailselect = 'class="selected"'; + break; } ?> @@ -26,6 +30,7 @@ <li <?php echo $settingsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=settings'; ?>"><?php echo elgg_echo('tidypics:settings'); ?></a></li> <li <?php echo $statsselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=stats'; ?>"><?php echo elgg_echo('tidypics:stats'); ?></a></li> <li <?php echo $imagelibselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=imagelib'; ?>"><?php echo elgg_echo('tidypics:settings:image_lib'); ?></a></li> + <li <?php echo $thumbnailselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/tidypics/pages/admin.php?tab=thumbnail'; ?>"><?php echo elgg_echo('tidypics:settings:thumbnail'); ?></a></li> </ul> </div> <?php @@ -39,6 +44,9 @@ case 'imagelib': echo elgg_view("tidypics/admin/imagelib"); break; + case 'thumbnail': + echo elgg_view("tidypics/admin/thumbnails"); + break; } ?> </div> |