[Elgg 1.5-1.12 & 2.X: Tidypics] v1.9.4.1

Release Notes

  • Added Tidypics upgrade script to be executed after upgrading a site to Elgg 1.9.5 to catch any comments made on images and albums possibly not yet upgraded by Tidypics previously due to a bug in Elgg core resulting in the comments migration when upgrading from Elgg 1.8 left incomplete (fixed in Elgg 1.9.5).

BEFORE running the Tidypics upgrade (from Tidypics' settings page) check for any pending Elgg core upgrades and if there are any (especially comments migration!) FIRST run the core upgrades. Depending on the number of comments on your site the Tidypics upgrade might take a while to finish. In any case, make a database backup before running the Tidypics upgrade!

  • Hello iionly. Thanks a lot for taking good care of Tidypics.

    Letting the size of the images in river to be set to either album size or thumbnail size is a very useful improvement. I have noticed that, although in album view the images are displayed in original rectengular shape (Tidypics 1.9.4 on Elgg 1.9.4 with Aalborg) , in river they seem to be square, cropped. How would it be possible to see rectengular images also in river?

    regards.

  • Preview images are square by default, both thumbnail size or album view size. The "album view" does not refer to "viewing a single image of an album" but to the gallery view of the content of an album. If the gallery view of an album doesn't show sqare-sized images on your site it's not the default. What are the image dimensions showing up in the "Thumbnail Size" section of the Tidypics settings page?

    If you want preview images in the river entries with original image proportions, you need to either use the "large" image (used when viewing a single image) and scale it down to the size you want it to show up on the river or you would need to create yet another thumbnail on image upload with the dimensions you want (but the existing image entries won't have this version of the image then) or you need to change the resize settings for the thumbnails to keep the image proportions (but this will very likely result in problems on the pages these images are used because the layout is defined assuming that these images are square-sized and again the image proportions of the thumbnails of existing image entries will still be unchanged).

  • Hello iionly. Sorry for coming back so late. Thank you for the clarification on album view. Thumbnail size in settings is 60x60. I shall play around to see if I can get it show the images in river, as close as possible to the original. Thanks again.

  • With the version 1.9.4 on Elgg 1.9.5 running Aalborg Theme, I seem to have a issue on Android 4.1.2. When I want to take a picture on the phone, I click on "Upload Photos", it lets me to choose (or create) an album. But when I click on "Continue", nothing happens.

    When I disabled all non-bundled plugins (but Tidypicks), still the same issue. I seem to have this issue only on Aalborg theme and not on default theme. I might be doing something wrong though... Anybody else had this issue?

  • @İşöğüçı Does it only fail with Android, usage of html5 uploader and Aalborg theme?

    Unfortunately, I've no way of testing on Android. If anyone else could confirm this issue or maybe give more details about possible conditions that result in the problem it would be of much help.

  • It works fine on Fİrefox internet browser running on Win 8.1. The only other place I tested it (and hit the issue) is with Android 4.1.2  and only with Aalborg Theme. HTML5 upload disabled/enabled (via 'Use Plupload HTML5/HTML4 uploader' setting) plays no role. It would be great to hear from other people...

  • İşöğüçı does the same happen with File Upload [uploading pics by core file mod] also?

  • @İşöğüçı If uploading of images on Android 4.1.2 fails also using the basic uploader I tend to say the problem isn't within Tidypics. As dranii already asked: does image upload to the files section fails, too?

    Would it be possible for you to test it on Android with different browsers? As far as I know Firefox and Opera should be available for Android, too. Maybe it's a browser issue. It would help to narrow the cause of the problem down.

    If the problem would occur also with the default theme of Elgg I would even say that it might be due to some setting of Android that blocks uploads (if such an option exists... as I said before I've no experience at all with Android).

  •  

    One user can tag on another user's photo ( tag = directly mark on photo) - users should be able to tag his own photo

    Using the latest FF tagging (marking on photo) is difficult - the selection area is not seen and cannot be made properly (previous versions of tidypics did not have this problem)

  • @iionly @dranii I had to find someone to test the iphone. Hence the delay...

    I can upload images as "file"s. No problem. The problem occurs while uploading them as photos (i.e. via Tidypics) and only on Android and only with Aalborg theme. On iphone it works fine.

    Details: With the Tidypics version 1.9.4 on Elgg 1.9.5, 

    running Aalborg Theme: No problem with iphone. It lets you upload photos. But with Android (tested only on v.4.1.2 & v.4.2.2), I can come as far as selecting an existing (or having created a new) album to upload the image. When I click on "Continue" on the pop-up window, nothing happens.

    The same result if I disable all non-bundled plugins (except Tidypics) or whether I enable/disable "Use Plupload HTML5/HTML4 uploader" in Tidypics settings.

    Without Aalborg Theme (on default Elgg theme): I am able to upload with Android without any issue. Not tested for iphone.

    regards.

     

  • @İşöğüçı Could you try the following (suggested by Per who developed the Aalborg theme)? In start.php of the Aalborg theme in the function aalborg_theme_init() comment out the lines

    elgg_register_js('respond', 'mod/aalborg_theme/vendors/js/respond.min.js');
    elgg_load_js('respond');

    The respond.js is used for responsiveness support on IE8. Maybe this has some unintended side-effect on Android.

  • @iionly I did the comment-outs but no change. Still the same issue. (This time tested with all non-bundled plugins enabled. "Use Plupload HTML5/HTML4 uploader" both enabled and disabled. Tested only on Android v4.1.2. I had uninstalled the Adobe Flash Player from that device since the last test).

    Regards.

  • When we hover over an album thumbnail, multiple images in that album is shown to give an idea what images are in that album - this is nowadays seen in many sites - Multi-Image Hover Display.

    In tidypics\views\default\object\album\gallery.php if we make


    $album_cover = '<div class=xxx>' . $album->viewImages() . '</div>';


    within the square thumbnail area we can scroll on hover and see the images - how do we just make it appear  animated (one image after another like slide) instead of scroll? How do we set the number so that only a few images per album are shown instead of all the images?
     

  • @İşöğüçı I was able to test it on Android now (Android 4.1.1 and 4.2.2). But I couldn't reproduce the problem. Selection of album (or selection of creating a new album) in the popup and uploading images both with the html5 uploader and basic uploader worked without issues. Where exactly are you stuck? Is it in the popup that opens on a click on "Upload photos" already? Is the continue button shown in the popup? Or does the next part (the uploader itself) fails to work? What is if you click on "Upload photos to this album" when on an album's page? Does this way fail also? If the latter also fails the problem would be with the uploader part otherwise with the lightbox popup. Though I've still no idea what could be the problem if the issue is only on Android (and not even on all Android devices).

    @dranii I take your question as suggestion (though no promise of implementing it). I just can't come up with the answer just like that.

  • @iionly I hit this problem consistently on my I9100 (Samsung Galaxy II) phone running Android 4.1.2. It lets me select an existing album or create a new one. But afterwards on that pop-up window, I click the "continue" and nothing happens. Just freezes. I get out of the situation only by pressing the back button.

    I think it is not related to Android version. Maybe browser version? On my I9100, I have Android 4.1.2. But I have tried it on a friend's GT-I8730 (Samsung Galaxy Express) and there is no problem. I was able to upload photos on my site with my username and using html5 (I did not try basic) uploader without a problem. Strange enough, it also runs on Android 4.1.2. I can see though that there are still differences in UI and Browser (mine has a globe but his has a Chrome symbol). I have updated my OS with Samsung's automatic software upgrade and but his came native with the hardware. I'll try to find out more about these differences on the net...

    The version I mentioned earlier (Android 4.2.2) belongs to another friend and the test was made by that friend. I shall borrow his phone and test myself... So for now, the problem does NOT happen on every Android phone and seems not to be related to Android version...

  • İşöğüçı So, it's not a problem of Android in general (not a problem of other OS either), not a problem of Android version or device type either. I'm afraid I've no idea what could cause the problem on your phone specifically and I don't think that there's a bug in Tidypics for sure but rather there's some bug only on your phone. You could try with some other browser on the phone (e.g. Chrome, Firefox or Opera). Unfortunately, that's all that comes to my mind.

  • I think that is right. I have the issue on my Android phone but it may be specific to my phone. And the one reported on my friend's Android phone: I'll be sure when I have the chance to test it myself on his phone.

  • This is a feature request but can be very helpful for non-profit sites. Is it possible to integrate http://postimage.org/mod.php into tidypics ? I have tried their code but am unable to get any success. Some forums ( of friends known to me) have integrated the service quite nicely. It has the problem that if the service disappears my files also disappear but till then it can be very useful for those on limited resources.

  • I really like the plupload loader (especially because of the progress bar!), but the interface is a bit overwhelming compared to the basic uploader (especially for my case where I only allow single file uploads).  So I thought I would take a stab at trying to change the UI widget interface to the "simpler" core plupload API, but I can't get my new "Select Files" link to pop up the file browser.  Here's my new views/default/js/photos/uploading.php:

    <?php
    /**
     * AJAX uploading
     */
    $maxfilesize = (int) elgg_get_plugin_setting('maxfilesize', 'tidypics');
    $max_files = 1;
    ?>

    elgg.provide('elgg.tidypics.uploading');

    elgg.tidypics.uploading.init = function() {

            var fields = ['Elgg', 'user_guid', 'album_guid', 'batch', 'tidypics_token'];
            var data = elgg.security.token;

            $(fields).each(function(i, name) {
                    var value = $('input[name=' + name + ']').val();
                    if (value) {
                            data[name] = value;
                    }
            });

            var uploader = new plupload.Uploader({
                    // General settings

                    runtimes : 'html5,html4',
                    browse_button : 'pickfiles', // you can pass in id...
                    container: $('container'),
                    url : elgg.config.wwwroot + 'action/photos/image/ajax_upload',
                    file_data_name : 'Image',

                    dragdrop: true,
                    sortable: true,
                    multipart_params : data,
                    max_file_size : '<?php echo $maxfilesize; ?>mb',

                    filters : [
                            {title : "<?php echo elgg_echo('tidypics:uploader:filetype'); ?>", extensions : "jpg,gif,png"}
            ],

                    init : {
                            PostInit: function() {
                                    $('uploader').innerHTML = '';

                                    $('uploadfiles').onclick = function() {
                                            uploader.start();

                                            return false;
                                    };
                            },
                            UploadComplete: function(up, files) {
                                    // Called when all files are either uploaded or failed
                                    elgg.action('photos/image/ajax_upload_complete', {
                                            data: {
                                                    album_guid: data.album_guid,
                                                    batch: data.batch
                                            },
                                            success: function(json) {
                                                    var url = elgg.normalize_url('photos/edit/' + json.batch_guid)
                                                    window.location.href = url;
                                            }
                                    });
                            },

                            FilesAdded: function(up, files) {
                                    var maxfiles = <?php echo $max_files;?>;
                                    if(up.files.length > maxfiles ) {
                                            alert("<?php echo elgg_echo('tidypics:exceedmax_number', array($max_files));?>");
                                    }
                                    if(up.files.length > maxfiles ) {
                                            up.splice(maxfiles);
                                    }

                                    if (up.files.length >= maxfiles) {
                                            up.disableBrowse(true);
                                    }
                            },

                            FilesRemoved: function(up, files) {
                                    var maxfiles = <?php echo $max_files;?>;
                                    if (up.files.length < maxfiles) {
                                            up.disableBrowse(false);
                                    }
                            }
                    }
            });
    uploader.init();
    };

    elgg.register_hook_handler('init', 'system', elgg.tidypics.uploading.init);
                                                                                       

     And here's my additions to views/default/forms/photos/ajax_upload.php:


    <div id="uploader">
            <input type="hidden" name="album_guid" value="<?php echo $album->getGUID(); ?>" />
            <input type="hidden" name="batch" value="<?php echo $batch; ?>" />
            <input type="hidden" name="tidypics_token" value="<?php echo $tidypics_token; ?>" />
            <input type="hidden" name="user_guid" value="<?php echo elgg_get_logged_in_user_guid(); ?>" />
            <input type="hidden" name="Elgg" value="<?php echo session_id(); ?>" />
                    <?php   
                            elgg_echo('tidypics:uploader:no_flash');
                    ?>
    </div>
    <div id="container">
        <a id="pickfiles" href="javascript:;">[Select files]</a>
        <a id="uploadfiles" href="javascript:;">[Upload files]</a>
    </div>

     

     BTW, if this core API code could work it might be another nice option for tidypics in case there are others out there with my requirements.

  • Hi iionly,  thanks for you great plugin.

    Unfortunately I have a problem with the plugin.Clicking the Start Upload button in upload page does nothing. However when changing the upload view file from ajax_upload to basic_upload ( line 53 in upload.php file : $content = elgg_view('forms/photos/basic_upload', array('entity' => $album));  ), I can upload images successfully. Can you tell me how to make it work for ajax_upload view .

    Thanks in advance

     

  • @disha Off-server saving of photos might have advantages regarding disc space on the server. On the other hand, it's not a trivial issue. For example, what to do with the thumbnails? If they are not on the Elgg site's server but the off-server images are used instead it could result in long loading times (not only when viewing the image itself but also on the album view page, the river, index page and profile page where the images might be displayed). Then the reliability of the off-server service is another thing to keep in mind. If the server is not available - or even worse the service is discontinued - the images won't be available or even lost forever. I might do some testing when I have some free time but I can't promise anything - and surely not on the short term. But I will keep the idea in mind.

    @blab It might have something to do with the id used for the browse button. I'm not sure why it would be necessary to provide an id specifically (in your code). Unfortunately, I don't have the time to help you here at the moment. I don't know if adding yet another uploader would make much sense either (even if it's the same uploader but reduced to a single image upload). I don't know if many people would have the need for it. In principle the basic uploader reduced to a single image upload might do in this case, too. While it doesn't offer a progress bar it might not take so much time for a single image upload to finish anyway. Maybe the instructions at http://designmodo.com/create-upload-form/ will be of some use to you. The tutorial on this page explains basically the same of what you want to achieve (also with plupload). Maybe you'll find what's the problem with your code when reading the instructions they give.

    @sprite The modification in code is quite unnecessary. There's a plugin setting that changes from html5 to basic uploader (and this setting is evaluated in the very same if-clause where you have made the modification). If the html5 uploader fails for you, it could have several reasons:

    • conflict with another 3rd party plugin on your site,
    • browser issue or
    • OS issue.

    Do you see any error entries in the server logs? Maybe the output in the JS console of your browser indicates where the origin of the problem is. Regarding browser and OS: which OS are you using and does the error occur also when using another (up to date) browser?

  • Wow, thanks for the awesome (and honest) feedback!  My suggestion wasn't referring to the single file upload aspect, but on the use of the plupload API rather than the UI widget (especially in mobile cases where the big drag-n-drop box doesn't make as much sense, and upload speeds might be extremely slow meriting the progress bar).  Anyway, can't wait to check out the link...looks alot more clear than the plupload docs.

  • @iionly Thanks for your response. It conflicts with bootstrap.min.js file I use in my theme plugin. Do you now what might be the reason of that and how can I fix it ?

  • @sprite Unfortunately, I can't give you any advice about bootstrap issues. I've never worked with it so far. Maybe the js console of your browser (or the Firebug log) will give some indication what might be wrong.

    Is the theme publically available?

Stats

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

Other Projects

View iionly's plugins