[Elgg 1.5-1.12 & 2.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.
  • @ura: I thought about recently how to reduce the sidebar entries, too. Basically, there could be dropdown menus in the sidebar for "Images commented...", "Most viewed images..." with the different options in the dropdown selection respectively. Then you would have less entries in the sidebar visible but still all options available. The main area could be reserved for tabs (all, mine, friends) not only for images and albums but for corresponding tabs in all the other categories, too. Don't know yet when I'll have the time for some experimentations (first I want to make sure that all my plugins will work on Elgg 1.9).

    @w2f: if the different sized image files for an uploaded image are not saved in the data directory but the original image file is saved, something goes wrong already during the upload/resizing phase. Depending on which image library you have selected on the Tidypics settings page this is most likely a memory issue (in case of using the GD php extension) or the libraries are not correctly installed on the server or not correctly configured on the Tidypics settings page (in case of the ImageMagick executable or the Imagick php extension).

    If uploading avatars works the GD php extension is correctly installed on the server (as Elgg core uses it for resizing the avatar images). So, uploading images with Tidypics with the GD php extension selected as image library should work, too. The only limitations are due to the limitations of memory, upload file size and post max size. What happens when you upload the image you are using as avatar with Tidypics? This image must be within the limits or it would not work as avatar image either. Tell me if you can upload this image using the GD php extension as image library selected on the Tidypics settings page and using the basic uploader.

    Testing any further configuration changes like using one of the other image libraries with less memory requirements (still same requirements on upload file size and post max size) will not make sense right now. They can only improve the configuration to allow for uploading of larger images but won't fix any general issue that occurs already on uploading small images.

    If you want to, you can post your current server info. Maybe I see something that could be improved. Right now I don't think your hoster support can do much to help you. First you need to make at least the test with uploading the avatar image.

  • i am looking at this now and since i am coding an ajax replacement for the tabbing system of all elgg subtypes i can also include any layout changes to tidypics now in my code that are useful.

    after reading your comment above i revised my vision.. :)

    how about a sidebar box labelled something like 'filters', which contains:

    • radio button for type: album or image.
    • dropdown box for time period (all, today, week, month)
    • radiobutton or checkbox or dropdown to choose a sort order: most commented, most viewed OR date/time
    • checkbox to filter for items you are tagged in (or not tagged in)

    and the tabs could contain:

    • all
    • owner
    • friends
    • current album - contains the listing of a specific album
    • current image - contains the view for individual images within an album

    the tabs would be managed via javascript to be interactively activated/ deactivated etc.

    this way you could access nearly all of the tidypics functions with one page load.

  • after thinking more on this i think that the current image tab would not be such a great idea.. though the album tab would be ok for now, since it is ultimately of the same format as the other lists (a gallery)

  • here's the layout i am intending to use for release one of the supajax plugin:

    image

  • @iionly i've got the same error as @jim

    PHP-Version 5.3.27  
    GD Aktiviert Elgg setzt voraus, dass die GD-PHP-Erweiterung verfügbar ist.
    imagick Deaktiviert  
    exec() Aktiviert Benötigt für die ImageMagick-Kommandozeilentools.
    Für PHP verfügbarer Speicher 128MB Passe die PHP-Variable memory_limit an, um mehr Speicher zur Verfügung zu stellen.
    Genutzer Speicher, um diese Seite zu laden 14.90 MB Dies ist ungefähr der Mindest-Speicherbedarf pro Seite.
    PHP-Einstellung von upload_max_filesize 50MB Maximal erlaubte Dateigröße für ein einzelnes hochzuladendes Bild.
    PHP-Einstellung von post_max_size 100MB "Max post size" abzüglich der Größe der HTML-Form = Maximal mögliche Gesamtgröße von gleichzeitig hochzuladenden Bildern.
    PHP-Einstellung von max_input_time 90s Maximale erlaubte Dauer, in der das Hochladen von Daten auf den Server abgeschlossen sein muss.
    PHP-Einstellung von max_execution_time 300 s Maximal erlaubte Ausführdauer für ein Skript auf dem Server.
    GD imagejpeg Aktiviert  
    GD imagepng Aktiviert  
    GD imagegif Aktiviert  
    EXIF Aktiviert  
    PHP-Einstellung von session.use_only_cookies Aktiviert Cookie only sessions können den Flash-Uploader beeinträchtigen.
  • @Carsten: Jim's problem seemed to have been sorted out - without I currently remember what exactly the problem was and how it was solved (but I have a certain suspicion that the problem was not directly connected with Tidypics but rather a general installation issue of Elgg).

    What's exactly not working for you? When you upload an image do you see any thumbnails of this image on your site? Have you tried uploading a single small image with the basic uploader (at least for testing purposes)?

    Can you say if the image files (original image and thumbnails) are saved in the data directory?

    Does uploading of profile images work on your site?

    The server config looks okay to me, so I can say what's wrong atm. It could be an issue with the data directory permissions (if no uploaded files at all can be saved). In case uploading a small image works but not larger images it would likely be an issue with GD memory requirements. In this case using another image library would be the best way to solve the issue. I also can't exclude the possibility that another plugin might cause the problem if the images are uploaded correctly but then not displayed.

  • another minor point i haven't seen mentioned before...
    the left/right arrows on the image full view are rendered even when there is only one image in the album.. so you can click them and they reload the current page.. which just generally is a bit sloppy - not to hold you responsible iionly! ;)

  • hi iionly! thanks for your request. my exact problem is:upload photo works (with and without flash). After upload i see the same thumbnail for all uploaded pictures . if i open the picture, the message: The requested content cannot be loaded.
    Please try again later.

    single file, same error

    i have no idea.

    i've tried different php versions, different tidypics beta versions, play with chmod rights - but nothing works for me.

    error side

  • @iionly i forgot, this is a a2hosting.com prefered from elgg.org. how can i change the grafic library?

  • @Carsten: If the thumbnail images show up I think the problem is not with the data directory having any wrong permissions. After all the thumbnail images do show up so they must have been created during upload and saved in the data directory.

    I have to admit that I'm not exactly sure if I understand the issue with the same image (thumbnail image) appearing for all entries that were uploaded in one go. The image titles are different so it's not the same entry shown twice. Have you entered the image titles yourself during uploading the images or have you not changed the titles (which means the image titles are created based on the image file names)? Are you sure you did not select the same image file for upload several times by mistake?

    When you experimented with different versions of the Tidypics plugin, have you removed the whole Tidypics plugin folder when upgrading - at least before your changed the version for the last time? If not, there might be files remaining in the Tidypics plugin folder that are not included in the latest version and this might result in strange issues. I would suggest to disable Tidypics, then remove the whole Tidypics folder and copy the latest version again on the server. After enabling the plugin again check out the Tidypics settings page if there's an "Upgrade" button displayed. If yes, execute the upgrade (Tidypics specific database entries).

    The problem with the large image not showing (but instead of the image the "The requested content cannot be loaded. Please try again later." error message) might be connected with the problem of outdated files in the Tidypics plugin directory. It might also be caused by another plugin you use on your site. Could you temporarily disable all the other 3rd party plugins (including a theme plugin if used) to test if there might be some side-effect caused by another plugin? If this would be the case it would help debugging this issue to know which other plugin causes the problem.

    Using another image library than the GD php extension has the advantage of lower memory requirements for image resizing. If you can use another image library depends on the availability of these libraries on the server. From the above server info I see that the imagick php extension is not installed on your server. You could ask your hoster support, if they will install it. Alternatively, you could use the ImageMagick executibles (namely a command line tool named "convert"), if it's available on your server. In this case you would need to know the path where the ImageMagick executibles are installed. Again, you should ask your hoster if it's already installed (and where) or ask them to install it. When knowing the path (e,g, /usr/bin/) you can check if the convert command can be found by entering the path on the ImageMagick tab of the Tidypics settings page. The image library to be used (depending on it's availability) can be set on the Settings tab of the Tidypics plugin settings page. For the ImageMagick executables you would need to enter the path to the command additionally.

  • @ura: regarding the arrows I'm not sure if it's worth spending too much time on coding an exception for only a single image in an album (either hiding the arrows or disabling them). With a single image it looks like "<- 1 of 1 ->" which will discourage most likely most people from clicking on an arrow when they see that there's only a single image in the album available. For the few other people no harm is done apart from a tiny bit more traffic on the site. :-)

  • @iionly i m so sorry :-( :-(

    i m search for a problem that will never be your problem. after  i disabled all 3rd party plug ins, everything’s works fine. i tried one by one. the error was the "bad word filter". its not compatible with the other plug ins of elgg. i disabled that and now everything is working. thanks so much and have a nice day/ week.

  • @Carsten: np. I'm glad you solved the problem. :-)

    I would have never thought of the Word filter plugin causing the problem (though I'm also not familiar with this plugin). It might not help solving any problem with a plugin to check for conflicts due to other plugins (and most likely the plugin that fails to work is indeed buggy itself) but it can never hurt to check for conflicting plugins as you know as site admin best which plugins are used. Therefore, others can't help you here in most cases - at least not if the symptoms of the problem aren't very obvious and the problem hasn't occured before.

  • @iionly - I'm still getting to problem where some photos get successfully uploaded, and others time-out and leave rubbish behind with thumbnaiuls with no image etc..

    It seems random - some people get most images up, some people get barely any images up. Lots of memory allocated, disk space is barely used, permissions must be ok since some pics load properly..

    Its running on a2hosting on a virtual server. imagick is installed.

     

    Help!

     

    Thanks

  • @bret:

    What are the current limits set on your server that are shown on the server info tab of Tidypics (memory_limit, post_max_size, upload_max_filesize, max_input_time, max_execution_time) and what limit do you have set for file size of images on the Tidypics settings page?

    Which uploader is used (Flash or basic)? Do you add a watermark to the images?

    Do you see any pattern at all on the failed image uploads? I know you said it seems random, but do you notice any connection between number of images uploaded in one batch plus size of the images uploaded and the failed entries?

    Could it be that any other 3rd party plugin used on your site interferes with Tidypics?

  • @iionly:  I have had our host tech working on tidypics issue on our site for a few days.  they now say that it is a scripting issue which is causing the photo's not to render into the different sizes once they are uploaded into the image folders.  After reading a copy of the thread from elgg community, that they linked me to, I am wondering if the problem could be on the elgg1.8.16 side, because like i mentioned earlier, before i upgraded (from 1.8.14) tidypics at least was working properly for user albums, just not group albums.

  • @iionly - all that is required is an (if $image_count > 1) around the arrow rendering code...

    the elgg platform certainly suffers from a mentality of non formal software design, which has led to so many 'minor' flaws existing which mount up to make the whole application seem unfinished - this is not attractive to site visitors.. even the non-technical ones notice this since they are often experienced with facebook etc. which are far more polished.
    several small improvements like this can often equal the effect that a single entire feature/enhancement would have in terms of the increase in attractiveness and joy of using the page/site.

    so my 'vote' is for 'not ignore the fine points' ;)

  • @ura: let me check out the if-clause you suggested to suppress the arrows on a single image within an album. I hope I'll have some time working on Tidypics soon.

    @w2f: if the problem is not the uploading of the images (if the techs say the images are correctly uploaded let's assume this is true) but the problem is the displaying of the images I suspect a conflict with another plugin. It's not necessarily Elgg 1.8.16 that is causing the trouble but rather the other way round that a plugin fails to work correctly on Elgg 1.8.16. Or maybe the plugin generally would have issues with Tidypics regardless of the Elgg version.

    Please try what happens when you disable all other 3rd party plugins including any theme plugin you might use temporarily and only keep Tidypics enabled (bundled plugins should not cause any problems so leave them enabled). This is the fastest method to check if there is a conflict caused by another plugin. If the images still not show up with the other 3rd party plugins disabled it would at least be more obvious that the problem is caused by Tidypics itself. But if the images turn up with the other plugins disabled you know that one of them is part of the problem. In this case enable the plugins again one by one to find out which plugin is responsible. Depending on what you find out I might be able to tell you more.

  • @ura: Update on the arrow issue (will be included in the next version). If you can't wait so long, open mod/tidypics/views/default/object/image/full.php and change the following:

    $image = $photo = $vars['entity'];

    $album = $image->getContainerEntity();

    New code is in bold. The additional line is necessary to get the album entity the currently viewed image belongs to.

    if ($album->getSize() > 1) {

        echo elgg_view('object/image/navigation', $vars);

    }

    This if-clause is used to check the number of images in the album and only display the arrows when the number is larger 1.

  • I am just facing a strange issue. Can anybody confirm it please?

    1. Login as User(X) -> Join a Group(G) with any access
    2. Create an Album(A) and upload photos to the album
    3. Login as User(Y) -> Join the Group(G)
    4. Try to upload the photos to Album(A) through the flash uploader.
    5. Once the upload is completed the page wont get redirected to the photo editing page.

    This issue happens only if you are using flash uploader. Not with basic uploader. I tried to debug it. To me the error appears to be at line 24. Its not returning any images based on the metadata_values.

    Browsers : Chrome and FF, Elgg version 1.8.16, tidypic version : 1.8.11beta11

  • @isabelle: I can reproduce the issue but I've not yet found out the reason for the problem. I guess you refer to line 24 of mod/tidypics/actions/photos/image/ajax_upload_complete.php. While the error might be caused by a problem at the call to elgg_get_entities_from_metadata() the origin of the issue might be elsewhere. I'll need some time for debugging (first need to find the time to work on it anyway). If I find out what's the cause I'll post an update. Still, any further info is appreciated in the meantime.

  • @isabelle: the problem with image uploads failing on group albums created by other users with the flash uploader was due to an incomplete permission override (override only for the basic uploader upload action).

    The issue can be fixed by a minor modification of the function tidypics_group_permission_override() in start.php:

    function tidypics_group_permission_override($hook, $type, $result, $params) {
        if (get_input('action') == 'photos/image/upload' || get_input('action') == 'photos/image/ajax_upload' || get_input('action') == 'photos/image/ajax_upload_complete') {
            if (isset($params['container'])) {
                $album = $params['container'];
            } else {
                $album = $params['entity'];
            }

            if (elgg_instanceof($album, 'object', 'album')) {
                return $album->getContainerEntity()->canWriteToContainer();
            }
        }
    }

    The code that need to be added is in bold. In the next release of Tidypics this issue will be fixed.

  • Thanks a lot iionly. I wonder, why I missed the permission override hook. Anyway great effort by you in maintaining this plugin.

  • Works great for me. Does some one know's if there's a french translation file for this plugin? Otherwise, I will do it and for sure, share it.

    Thanks to developper.

  • @Julien: the latest official release of Tidypics (rc1 for Elgg 1.8) did contain a French language file. But as far as I know it was incomplete (not updated since about the Elgg 1.6/1.7 versions of Tidypics). Since the rc1 release I've added quite a number of language strings within my versions of Tidypics additionally, so I've decided to remove all language files that were part of the Tidypics release that I can't update myself.

    If you want to provide a complete French language file for the latest release of Tidypics, I'll gladly add it to the next release of Tidypics.

Stats

  • Category: Photos and Images
  • License: GNU General Public License (GPL) version 2
  • Updated: 2018-9-16
  • Downloads: 131935
  • Recommendations: 262

Other Projects

View iionly's plugins