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

Release Notes

Changelog:

  • Fix in river entry creation (hopefully last fix necessary for now...).
  • Still this is beta release. Please suggest if i can use this on production.

     

  • @saurabh: the main reason I still add the "beta" to the releases is due to the known issues (i.e. Flash uploader, watermarking, tagging, slideshow) that I've not yet had the time to deal with. I don't want to leave out the "beta" when I know there are some features included that are not yet fully working. On the other hand, if you are already using a previous version of the Tidypics plugin there shouldn't be much of a difference as the same features do not work exactly in the same way on these versions either.

    Apart from the watermarking feature that really is kind of useless at the moment as the original image does not get watermarked the other features with issues are not completely broken anyway but simply not yet working without issues. The Flash uploader and tagging should already work better than in previous versions and the slideshow as such is not broken at all but simply has some limitations (max 50 images) that might need to get fixed if possible.

    I can't give you any definite answer regarding using this version of Tidypics on a productive site. If you don't use the features with known issues anyway or are already using an older version you could give it a try. Best would be to test it out on a developement / test site to find out on your own if it works okay for you.

  • @chicken: tagging a user in a photo creates an entry in river. Tagging works quite roughly atm though and I hope to improve that soon.

    Installing when a previous version of Tidypics is already installed works quite in the same way as upgrading any other plugin. I would suggest to disable the Tidypics plugin, then remove the Tidypics folder from "mod" (preventing obsolete files remaining which is never wrong to do with any plugin) before copying the new version to the server. Then enable the plugin again and check the Tidypics plugin settings page if you might need to run Tidypics-specific upgrade scripts (if this is the case there's an update link visible). Check also the other plugin settings if they are according to your needs. This should be all.

  • one minor tweak:
    the widgets 'view more' buttons are missing the span that is present on other widgets with class .elgg-widget-more..
    this is an issue on my theme as i have customised that link and i'm unaware of a way to make the theme as i want it without having that link present (other plugins such as videolist also are missing that link).

  • @ura: the "View all" link is implemented like the link in the messageboard widget and not like for example the "More" link in the blogs widget. Actually, I wasn't even aware that the blogs plugin and some others additionally embed the link code within span tags. Let me take a look at the code. I may include a fix in the next version - if I ever manage to fix (currently the plan is rather to replace) the flash uploader...

  • most core widgets have that span.. messageboard doesn't, as i recall, yes.

  • 'slightly improved' & 'hopefully last fix necessary for now' ? and + Known issues'..?!;-) is there more details of improvements (for now) ? any particular directions for improvements to expect in the future ?

  • Maybe the description is a bit brief. More details about what is new or has changed since the last "official" release is available in the README.txt included in the zip archive. I guess I might need to add more details or at least a more detailed description about what Tidypics is at all at some point here, too.

    "Knows issues" are the issues that have not been working or not fully working in any Elgg 1.8 versions of Tidypics so far. First goal is to fix the issues with the already included features step-by-step (currently, I'm updating the Flash Uploader). What additional improvements might come in the future I can't say yet.

  • Hola

    How can I make the default behavior as follows :

    when more than one photos uploaded show a certain number of photos in activity stream - commenting is on album because number of photos is more than one - comment made in activity stream shows in stream and under album also, and vice versa

    when one photo uploaded commenting on individual photo - commenting (from activity stream) is on photo (and not album)  as there is only one photo

    This is the default behavior in social networks, as well as php scripts lile oxwall, phpfox etc

    Thanks so much!

  • @shaania: the first part (multiple images uploaded with comments added to activity stream and corresponding album) is already happening when you select "One entry with all photos of the batch" for the option "How many entries in activity river for each batch of uploaded photos" in the Activity Integration options of Tidypics.

    To get the second part (comment added to image instead of album for only a single image uploaded) you would need to make a few modifications in tidypics/actions/photos/image/upload.php (for basic uploader) and tidypics/actions/photos/image/ajax_upload_complete.php (for Flash uploader). In these files there are the lines

    if ($img_river_view == "batch" && $album->new_album == false) {
            add_to_river('river/object/tidypics_batch/create', 'create', $batch->getOwnerGUID(), $batch->getGUID());

    which create the entries in the activity river. What you would need to add is a check how many images where uploaded in the current batch. If more than one image is uploaded the add_to_river call to be used is the same as above. If there's only a single image included in the batch the add_to_river() call is instead:

    add_to_river('river/object/image/create', 'create', $image->getOwnerGUID(), $image->getGUID());

    with the value of $image variable being assigned this image ($image = batch[0];). Counting the number of images in the batch works with:

    $images_count = elgg_get_entities_from_relationship(array(
                  'relationship' => 'belongs_to_batch',
                  'relationship_guid' => $batch->getGUID(),
                  'inverse_relationship' => true,
                  'type' => 'object',
                  'subtype' => 'image',
                  'offset' => 0,
                  'count' => true
    ));

    So the resulting code is something like:

    if ($img_river_view == "batch" && $album->new_album == false) {
            $images_count = elgg_get_entities_from_relationship(array(
                  'relationship' => 'belongs_to_batch',
                  'relationship_guid' => $batch->getGUID(),
                  'inverse_relationship' => true,
                  'type' => 'object',
                  'subtype' => 'image',
                  'offset' => 0,
                  'count' => true
            ));
            if ($images_count > 1) {
                    add_to_river('river/object/tidypics_batch/create', 'create', $batch->getOwnerGUID(), $batch->getGUID());
            } else {
                    $image = batch[0];
                    add_to_river('river/object/image/create', 'create', $image->getOwnerGUID(), $image->getGUID());
            }
    }

  • Hola

    It gives  HTTP 500

    The photo apparently does not gets uploaded or even if uploaded no stream entry is made. Using the basic uploader. Reverting to the code before changes make everything work again.

    I have removed /commented out

     /*
     if ($img_river_view == "batch" && $album->new_album == false) {
      add_to_river('river/object/tidypics_batch/create', 'create', $batch->getOwnerGUID(), $batch->getGUID());
     } else if ($img_river_view == "1" && $album->new_album == false) {
                    add_to_river('river/object/tidypics_batch/create_single_image', 'create', $batch->getOwnerGUID(), $batch->getGUID());
     }
     */

    and pasted the "resulting code" as given above. What am I doing wrong?!

  • On refreshing I get "Form is missing _token or _ts fields"

  • Oh well, it might have been better for me to test out what I suggested...

    Replace

    // "added images to album" river
        if ($img_river_view == "batch" && $album->new_album == false) {
            add_to_river('river/object/tidypics_batch/create', 'create', $batch->getOwnerGUID(), $batch->getGUID());
        } else if ($img_river_view == "1" && $album->new_album == false) {
                    add_to_river('river/object/tidypics_batch/create_single_image', 'create', $batch->getOwnerGUID(), $batch->getGUID());
        }

    with

    // "added images to album" river
        if ($img_river_view == "batch" && $album->new_album == false) {
                  $images_count = elgg_get_entities_from_relationship(array(
                                       'relationship' => 'belongs_to_batch',
                                       'relationship_guid' => $batch->getGUID(),
                                       'inverse_relationship' => true,
                                       'type' => 'object',
                                       'subtype' => 'image',
                                       'offset' => 0,
                                       'count' => true
                                  ));
                  if ($images_count > 1) {
                          add_to_river('river/object/tidypics_batch/create', 'create', $batch->getOwnerGUID(), $batch->getGUID());
                  } else {
                          $image = elgg_get_entities_from_relationship(array(
                                       'relationship' => 'belongs_to_batch',
                                       'relationship_guid' => $batch->getGUID(),
                                       'inverse_relationship' => true,
                                       'type' => 'object',
                                       'subtype' => 'image',
                                       'offset' => 0,
                                       'limit' => 1,
                                  ));
                          add_to_river('river/object/image/create', 'create', $image[0]->getOwnerGUID(), $image[0]->getGUID());
                  }
        } else if ($img_river_view == "1" && $album->new_album == false) {
                    add_to_river('river/object/tidypics_batch/create_single_image', 'create', $batch->getOwnerGUID(), $batch->getGUID());
        }

    Do it both in actions/photos/image/upload.php and actions/photos/image/ajax_upload_complete.php for it to work with both uploaders.

  • Thanks! This actually works. Only problem is that the comment that is made directly on the album page does not show in the activity stream under the album thumbnails. Comments made in the stream itself under the album thumbnails show in both places - stream and album itself.

    This problem happens when multiple photos are uploaed to the album simultaneously.

    With single photo there is no such problem and things work as expected. Great!

  • @shaania: yes, I know. And there's no practicable way to change this. If you comment on an album, there's already a separate new entry created in the river. Commenting directly on a river item adds this comments to the corresponding Elgg entity which could be in case of the Tidypics plugin an image or an album and for multiple image uploads in one go the river item is associated with a third data type, an Elgg batch (tidypics_batch). Actually, I changed the original Tidypics plugin this way that when you comment on one of this batch river entries the comment appearing on the album page is a second comment belonging to the corresponding album. Otherwise there would be no comment on the album page at all. The separate river entry appearing corresponds to this second comment.

    But how to solve the other way round? If you comment on an album and you want this comment also appearing on the river batch entry... which one? There could be countless of these entries, basically one entry for each single image in the album. If the album has 1000s of images, you can imagine that it would be rather unwise to let this comment appear on all of the corresponding batch river entries.

  • ... meaning a new Elgg annotation (which saves this comment) would be created for each batch. In the worst case your server would simply be crash even on creating so many new database entries at once!

  • Hola

    " basically one entry for each single image in the album. If the album has 1000s of images"
    Can it not be just the first image of that album? That way, comments made on the album page itself would also appear in the activity stream.

    Just wondering how phpfox, oxwall, facebook etc etc have solved this problem!
    Thanks for taking me upto this far till now.

  • If you comment on an album there is an entry in the activity river created - just look at the newest entry after you made a comment. It's just not added to any other existing entry that was created on image uploads.

  • I'm having trouble. I only get question marks when uploading an image of any size. How can I fix ths?

     

  • Here is an update. I can upload photos to an existing album no problem, but putting them in a new album doesn't work. Wonder if upgrading to elgg 1.8.15 caused trouble?

     

  • @knussear: thanks for reporting. I just tried it and I can verify that uploading images to a new album fails in Elgg 1.8.15. I don't have a solution yet though - I don't even know yet if the issue is caused by the Tidypics plugin itself or due to a bug introduced in Elgg 1.8.15 itself. If I know more I will tell.

  • The problem also occurs in the original tidypics, so not an issue with your plugin per say

  • I found the change in Elgg 1.8.15 that causes the trouble: https://github.com/Elgg/Elgg/issues/5207

    For new albums this change causes the upload to fail because the new subdirectory for this album won't get created anymore resulting in the uploaded images not getting saved. I need to figure out still how to solve this. It might be that the Tidypics plugin does not check for existance of the album directory in a correct way resulting in a wrong return value of the getFilenameOnFilestore() function which has been changed in Elgg 1.8.15.

  • flash uploader and slideshow not working any help guys

  • @Ravish:

    first: are you using version 1.8.1beta6 on your site already? I've not worked on the flash uploader in beta5 and earlier. So, there could be problems using the flash uploader with these versions that might not occur anymore with beta6.

    In case you already use the beta6: what exactly is not working with the flash uploader and the slideshow? Can you give me more details (Elgg version, OS, browser)? For the slideshow: is it not working at all or is only the 3d wall part not working? If it's not working at all there might be a conflict with some browser extension. The 3d wall is definitely not working and won't work anymore in future either as Cooliris is not supporting it anymore. Therefore a replacement will be necessary for the slideshow library used by Tidypics which hopefully will also solve other issues that are currently happening with the slideshow (like maximum of 50 images per slideshow).

Stats

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

Other Projects

View iionly's plugins