[Elgg 1.5-1.12 & 2.X - 4.X: Tidypics] v1.8.1beta11

Release Notes

Changelog:

  • Some general code cleanup,
  • Fix of river entries appearing twice on image uploads in case the Flash uploader is used and the plugin option is set to create separate entries for each uploaded image (issue introduced in beta10),
  • Added TidypicsBatch class (that extends ElggObject class) used for creation of objects of subtype "tidypics_batch" (used for handling "batches" of uploaded images) instead of creation the objects as ElggObject and assinging the subtype,

Improvements on slideshow:

  • a slideshow can be started on all pages that display a suitable list of images (but the slideshow feature is only available if the slideshow plugin option introduced in beta10 is enabled in the plugin settings),
  • start of slideshow via title menu button,
  • slideshow will include the next 64 images (i.e. 5 pages of images) of the current displayed image list taking into account the current page offset (i.e. on page 1 the slideshow will display pages 1-5 while on page 10 it will display the images of pages 10-14 etc.). (Longtime goal for future Tidypics versions: no limitation of number of images in slideshow and most likely replacing the PicLensLite slideshow by something else / something better. Currently, the number of images to be included in a slideshow is somewhat limited by avoiding running into memory issues. Also, the PicLensLite slideshow library requires the Flash plugin on client browsers which is annoying and the 3D wall feature does no longer work),

Improvements on image orientation correction at image uploading:

  • using best methods available depending on image library selected,
  • update orientation information saved in image file after a change of image orientation if the image library used supports this (GD library unfortunately does not support it but the exif info saved in the image file is lost on image orientation correction anyway),
  • support of orientation correction not only of rotated but also of mirrowed (and possibly additionally rotated) images,

Some remarks regarding which image library to use for Tidypics:

  • if possible and available on your server use the "ImageMagick executable". Generally, this library has a much smaller memory requirement compared to the GD library both for image resizing (i.e. creation of thumbnail preview images) and orientation correction of images. Additionally, the exif information saved in an image file will be preserved both during resizing and orientation correction processing,
  • next best choice after "ImageMagick executable" is the "imagick PHP extension". It also has a low memory consumption compared to the GD library but you might lose exif information during image processing,
  • the GD library should be available on any server (as Elgg core requires it anyway). The memory requirement of the GD library can be quite high both for creation of thumbnails and image orientation corrections. The memory requirement is depending not on the image file size in the first place but on image resolution, color depth per pixel and color channels per pixel (so even a small sized image file might require more memory than available on the server). If you use the GD library for Tidypics on your server, your users might not be able to upload larger images. Additionaly, exif information saved in the image files might get lost during image orientation correction.
  • Great Job checked it out and tested it in all positions and every1 loaded correctly! A+

    Now what would make better is, to possibly make a upload button option for the toolbar like izap video plug has?  Makes easier to upload pics then navigating to pictures to do it!!

  • @LT: an "Upload photos" link / button in the topbar is easy to implement. Add the following lines to the tidypics_init() function in start.php (if unsure where to add the lines add them below the elgg_register_action() functions in tidypics_init()):

    if (elgg_is_logged_in()) {
        elgg_load_js('lightbox');
            elgg_load_css('lightbox');
            $logged_in_guid = elgg_get_logged_in_user_guid();
            elgg_register_menu_item('topbar', array('name' => 'addphotos',
                                                    'href' => "ajax/view/photos/selectalbum/?owner_guid=" . $logged_in_guid,
                                                    'text' => elgg_echo("photos:addphotos"),
                                                    'link_class' => 'elgg-lightbox',
                                                    'priority' => 650));
    }

    If you prefer an upload icon instead of a text link add these lines instead:

    if (elgg_is_logged_in()) {
        elgg_load_js('lightbox');
            elgg_load_css('lightbox');
            $logged_in_guid = elgg_get_logged_in_user_guid();
            elgg_register_menu_item('topbar', array('name' => 'addphotos',
                                                    'href' => "ajax/view/photos/selectalbum/?owner_guid=" . $logged_in_guid,
                                                    'text' => "<img src=\"".elgg_get_site_url() ."mod/tidypics/graphics/topbar_upload_icon.png\" alt=\"".elgg_echo('photos:addphotos')."\">",
                                                    'title' => elgg_echo("photos:addphotos"),
                                                    'link_class' => 'elgg-lightbox',
                                                    'priority' => 650));
    }

    You would need a suitable 16x16px sized icon image which should be easy to find on the Internet. Place the icon image file into the graphics folder within the tidypics plugin folder and adjust the file name (either of the file itself or within the code).

  • Nice going to work on this..!  Would be nice option to your already great plugin...!

  • I attempted to make it a plug-in and send it to you by email!  If you can check it and tell me what you think so far it works great on my end.  This is my first time making a Plug-in.

  • When multiple photos are uploaded simulataneously either by html of flash uploader, one or two photos fails to get uploaded. I tested this in localhost. Will test on actual site.

  • @LT: need to check out what you sent.

    @kanha: when you say "fail" to upload, are there any faulty entries on the page of latest images, i.e. entries with missing preview images and/or entries which full view pages fail to load? Or are there no such entries? Do you get any error message telling you why the upload might have failed for these images? Also, are it always the same images that fail to be added and does it work if you upload these images separately. What's the file type of the failed images and are they larger (in file size and/or image resolution) than other images - larger images might fail to be added because there's not enough memory on the server available (php memory limit) to process these images.

    Many questions, I know. But there could be a lot of reasons why the upload goes wrong.

  • 1.There are entries with missing preview images and/or entries which full view pages fail to load

    2. No error message

    3. No not always the same images that fail to be added and

    4. It doeswork if I upload these images separately. 

    5.  the file type of the failed images : jpg

    6. Sizes are really small - 100 to 300 kb

    There was NO such problem with previous versions as far as I remember.

  • When you say "no problem with previous versions" do you refer to my version of Tidypics releases beta 1-10 or are you referring to the official Tidypics (1.8.0rc1)? In the latter case I'm pretty sure there were even more issues with faulty entries. You only did not see them as they were not shown in the album view.

    If you refer to my previous versions of Tidypics beta1-10 as opposed to beta11 I'm a bit at a loss what could cause the failing now. The only difference between beta10 and beta11 that could affect uploading of images is the image orientation part. But this should only affect images that are rotated while other images are left unchanged / are not processed by the image orientation correction function.

    Have you enabled the display of exif information in Tidypic's plugin settings? Or rather, is the exif php extension installed on your server? If not, the image orientation correction will not be available anyway. In this case (or to find out if the image orientation correction) is causing the errors, you could comment out line 380 of tidypics/classes/TidypicsImage.php. With this line commented out the image orientation correction is not executed during uploading of images and you would have the same upload process as with earlier versions of my Tidypics plugin. If there are no errors anymore then I would at least know where to look for possible bugs resulting in faulty entries.

    For the time being you can remove the faulty entries via the Tidypics plugin settings page where I added a delete images tab. You only need to enter the GUID of the image entry you want to remove (which is included in the url of these images).

  • i dont care about any faults this plugins has it works and does the job thank you : )

  • No thumbnail photo, and when i click on thumbnails: i get this error: "The requested content cannot be loaded. Please try again."

    Elgg version:1.8.16,  running on localhost with xampp.

    Server info:

    PHP Version 5.5.1  
    GD Enabled Elgg requires the GD extension to be loaded
    imagick Disabled  
    exec() Enabled Required for ImageMagick command line
    Memory Available to PHP 64MB Change memory_limit to increase
    Memory Used to Load This Page 6.09 MB This is approximately the minimum per page
    Max File Upload Size 5.00 MB Max size of an uploaded photo file
    Max Post Size 8.00 MB Max post size = sum of photos + html form
    Max Input Time 60s Time script waits for upload to finish
    Max Execution Time 30 s Max time a script will run
    GD imagejpeg Enabled  
    GD imagepng Enabled  
    GD imagegif Enabled  
    EXIF Enabled  
    Cookie only sessions Disabled Cookie only sessions may affect the Flash uploader

  • @Jim: PHP 5.5 might be the problem. I've not yet tested Tidypics on PHP 5.5 and I don't think I will be able to do so in the near future. As far as I know Elgg itself might also have problems on PHP 5.5.

    But I can't say for sure if the PHP version is causing the problem. Have you tested both the basic uploader and the Flash uploader yet? Does it always fail or only with large images? You could also try using the ImageMagick command line executible if this is an option for you (though I don't know if this library will work on XAMPP). ImageMagick has much lower memory requirements for image resizing and it's also independent of PHP while the GD library is a PHP extension and might fail to work on PHP 5.5.

  • My last post is FALSE:

    No thumbnail photo, and when i click on thumbnails: i get this error: "The requested content cannot be loaded. Please try again."

     

    @iionly, This plugin work very well. Thank you.

  • Thank you iionly for your efforts on this plugin.

  • thankyou this is the only plugin for pictures that works for me : ) 1.8.1.6 elgg

  • Hi, I have a problem with the owner of a certain album, it's set to administrator, and registered users cannot upload photo's to it. If I transfer the album management to someone else, the issue stays.

    All other albums were created from Categories/Groups and are working fine.
    I can obviously delete the album and re-create it from the right categorie, but I would loose all responses.

    Any idea?

  • Hi,

    How can I disable the creation of albums by others (not admin)?

    Thanks

  • @Daniel: is the album that only allows uploading by admins a group album or not? If you say "transfer album management" what do you mean exactly? Changing the album owner to another user? As the transfer of ownership is not something that's possible by the Tidypics plugin itself, I'm not exactly sure how to help you with this issue as I'm not sure what exactly is changed in the corresponding database entry of this album.

    Generally: group albums (container id == a group guid) allow for uploading of images by any group member while non-group albums only allow for uploading of images by the group owner and an admin. If you transfer ownership of an album to allow others to add images to this album, too, you would need to make sure that the container id of this album is also correctly updated. But I want to say it quite clearly: this is not a feature of the Tidypics plugin and I won't take any responsibility if something goes wrong.

    Creation of albums only by admins is also a restriction that is not implemented in the Tidypics plugin. You would need to modify the code of Tidypics to add such a restriction. For a start you would need to restrict the display of the "Create album" title button to be displayed only if an admin is logged in. Also, you would need to modify the tidypics/views/default/photos/selectalbum.php view to not offer creation of a new album as option to non-admin. Additionally, you could also restict the create album view to be accessible only to admins and you could also restrict the save album action to admins only.

    These modifications are quite extensive though and you would need to keep in mind that you might need to do them again for any new version of Tidypics. In principle they are not difficult though, so if you note which files you changed it should not be too time-consuming to add the modifications again within a new version (as not all of these files will change with each new version of Tidypics anyway).

  • Hi,

    I just integrated this beta version with the elgg 1.8 release. I can create an album and upload image. it does not give me any error while doing that but it does not show any images. no thumbnail is displayed. i dont know if it really uploaded the image. where is the file uploaded saved? would you have any suggestion for this issue.

     

    thanks

    Chandra

  • Images are saved within the data directory. Within the data directory each user account has its own subdirectory (year/month/day/user_guid) and within this directory there should be a folder named image where the images of each album of this user are saved within folders with the album_guid as name.

    If there's no folder for the album I would guess there's a problem with permissions of the data directory. If the album folder is there but no images within the problem might be caused due to memory issues. In case you use the GD library as image library for image re-sizing the memory requirements are quite high. Try another image library if possible. Or try uploading a smaller image for testing (smaller not only in file size but especially in image resolution). If the smaller image works, there's a memory issue.

  • Hi IIonly,

    Thanks for the response and idea's.

    No, this particulair Album is not a group Album, unlike the rest (somehow).

    By using Elgg Groups, the ownership of a Group (and thus the albums too) can de delegated.
    Must state that I couldn't confirm so far if that would even work. At least it does not work for this Albums'group.

    I have no problem with making changes in the tidypics module files, and re-doing that after an update, other than that I need a little guidance on making those changes.
    Could you please indicate where that Container ID is stored? I wasn't able to find it in either /mod/tidypics/ files or the SQL DB.

    Thanks already !

     

  • Hello again,

    In order to fix some issues, I updated Tidypics.
    Ever since I did that, I lost all the comments (to individual photo's) that were made before, and I can't find a way to recover those comments.

    Earlier version installed was 1.8.0-rc1, and the latest I tried was 1.8.1beta11.Reverting back to the older version didn't resolve my issue.

    Any idea's are very welcome !

  • Hi IIonly,

    Just to add to my earlier message, I found a new option in the settings to enable Comments.While that may work (didn't test because email's would go out to members), I don't see the comments that I had before with some photo's.

    Does that mean that a Tidypics upgrade overwrites these comments?

    Thanks

  • @Daniel: if an album is not a group album you can't delegate ownership by means of a Tidypics option. Also, for group albums you can't delegate ownership. The only difference between non-group albums and group albums is that only the album owner can add images to non-group albums while any group member can add images to a group album. The delegation of group ownership will also not result in change of ownership of group albums but only in change of group ownership.

    If you want to make a non-group album a group album you would need to edit your database manually. Find the album entity in the entity table and change the container_guid entry of that entity from the album owner guid to the group guid. Then the album belongs to this group and any group member should be allowed to add images (though you might check the album access level and adjust it if necessary - this can be done on the site again though).

    If you say "comments vanished" do you really mean the comments on the pages of these images or do you refer to the river entries informing about these comments having been made? In the latter case this could have happened as it was necessary to fix some issues with creation of river entries on album creation, image uploads and comments made on images and albums and I had to change the names of some views to be able to do so. I will have to look into this issue again at updating Tidypics for Elgg 1.9 and if there's indeed some backward compatibility issue I might also fix this with a new Elgg 1.8 release of Tidypics.

    But if you actually refer to comments on image pages I can currently not confirm this (would have to check). I'm not aware that I changed anything between 1.8.0rc1 and the latest release of Tidypics that would result in comments vanishing - and surely no comments were deleted. The plugin option of "album comments" does refer to comments made on album pages not on image pages (but I believe the comments on album pages were not shown with release 1.8.0rc1 at all). If in doubt, enable the "album comment" option.

  • Hi IIonly,

    Thanks for your thorough answer, much appreciated !

    I tried to find the album entry in the database in order to change the ownership, so far no luck, but will try again with your new input.

    I had several issues with older plugins during Elgg upgrade, and during that work, I suddenly had my Tidypics comments back ! THat means that they are still in the DB.
    As I needed to resolve the general Elgg issues, I am not able to summarize how that happened. I now have Tidypics 1.8.1beta11 installed, and tried to disable/enable the comments several times without success...

    Would it help if I create some kind of report?

    Cheers and thanks !

  • If there are issues in general caused by other plugins and one of the side-effects of these issues is that the comments made on Tidypics images are not displayed, I would suggest to disable any problematic plugins temporarily to see if this brings the comments back. The point is: you need to narrow down the problem on the offending plugin at least. I can't tell you how to solve the comment issue without knowing what exactly is wrong with some other plugin. I can only guess that it's more likely that the plugin causing the trouble might be your theme plugin or (as you have mostly group albums) a plugin that adds some functionality to groups. But even that is a wild guess that could be totally wrong.

Stats

  • Category: Photos and Images
  • License: GNU General Public License (GPL) version 2
  • Updated: 2022-5-15
  • Downloads: 142049
  • Recommendations: 232

Other Projects

View iionly's plugins