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

Release Notes

Another incremental release. This one includes a simple categories integration. It also has better text for displaying how much of a user's quota has been used. See the contributions.txt for fuller information on changes for this release and previous release.

The top two priorities items are a better uploader and album sorting. We're hoping those will be available in the 1.7 release.

This release should work with Elgg 1.5-1.7. Might work with Elgg 1.2 but did not test that.

  • This is a new release as of Saturday, April 24. If you commented recently, your responses will be on the previous release. Enjoy!

  • Thanks for the update! This is one of the best pluggins for elgg. I like the road map of features, keep it up.

     

    I have one small question. I was diging through the source to find the cause of why my thumbnail images are always square no matter what I set in the tidypics settings. I found the problem in the /lib/resize.php file. When you call tp_gd_resize(...) you are hardcoding it to make the thumbnails square. It is the same in this release too. Additionally the main image resize is hardcoded to be true for watermark.

    Is there any reason for this?

  • @chirhoxi - the square restriction is intended. As open source you are free to change the code.

    I don't know what you mean by "Additionally the main image resize is hardcoded to be true for watermark."

     

  • Got to try this out! :)

  • @Tidypics Team

    What I mean by "Additionally the main image resize is hardcoded to be true for watermark." is the following. In 'tidypics/lib/resize.php' in function tp_create_gd_thumbnails($file, $prefix, $filestorename) {...} you call tp_gd_resize(...) three times for
    (1)// tiny thumbail
    (2)// album thumbnail
    (3)// main image

    tp_gd_resize is declared as follows
    function tp_gd_resize($input_name, $output_name, $watermark, $maxwidth, $maxheight, $square = false, $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0)

    when you call this each time the $watermark and $square parameters are hard coded as follows
    // tiny thumbail

    $watermark = false
    $square = true

    // album thumbnail
    $watermark = false
    $square = true

    // main image
    $watermark = true
    $square = false

    The reason I am bringing this up is because it is bad form to allow the user the option to change the size of each image in the tidypics admin settings but in the actual code disregard those inputs when in fact the code is perfectly setup to handle them. If I go to tidy pics admin settings and set all my image sizes to be say 640x480, 128x96, 64x48 for Primary image size, album image size, and thumbnail image size, respectfully, the behavior is to make the primary image as specified in the settings,640x480, and water mark it, make the album image size 96x96, no water mark and the thumbnail 48x48, no water mark.

    Do you not see this as bad? I personally don't want my album covers and thumbnails to be square (this stretches the image and distorts the image ratio and it looks bad, I want them to be the size that I set in the settings(so I can preserve the image ratios). Am I the only user that finds this bad? I know it is open source but not everyone has the capacity to dig through source code and find reasons for odd behavior and correct them. This seems like a change that should be standard in the release and not require a small code hack.

    Thank you

  • @chirhoxi

    1. I think it is reasonable to watermark the main image view and not watermark the album thumbnail and tiny thumbnail.

    2. The watermark only runs if the watermark option is set in the settings.

    3. The creation of a square thumbnail does not stretch an image. It crops the center section.

    4. I plan to add a cropping capability to allow users to decide what section of the image is used for the album and tiny thumbnails.

    5. Having square thumbnails makes life easy in the layout. I think just about any web photo application that I've seen does it this way. Flickr certainly does.

    6. I will change the interface so that only one size dimension can be set in for the album and tiny thumbnails.

    Good day. 

  • chirhoxi, do not know if this was your problem. A helping hand for future cases.

    Today I had a problem on a site also implemented in the images
    resizing. TidyPics I use to send pictures in my plugin.

    What happened: My Tidypics settings for the "album thumbnail is 150 x 150 but if a user enviase an image 90x90 or 600x300 the wrong plugin resize the image. cutting the photo image of the shaft.

    The solution: in /lib/resize.php in start comments //album thumbnail + or - change the line 56 $square option to false.

    -Sorry my ingles, I spek portuguese. not very well ingles.
    perhaps the owner can explain it better.

     

     

     

  • @ Tidypics Team

    I agree with 1 and 2, the water mark feature is well implemented, no worries there.

    On 3 however, cropping of the center section is not the behavior that I get. I get a resized image that is stretched out of its proper image ratio's. ( a square that has dimension of min(height, width) as height and width are set in the admin interface settings)

    After further inspection of the code I see that this descrepency possibly exists in which image library you are using (GD vs ImageMagick) In the code that handles the GD library everything I stated previously is true by looking at the code. But in the code for ImageMagick handling you do not specify a parameter for $square when you call your resize wrapper so it defaults to false as defined in the function declaration. So just by looking at the code I can see that there is a difference in the way the images are handled for GD vs ImageMagick. For ImageMagick you do call the crop function so I can see what you might be talking about when you say "3. The creation of a square thumbnail does not stretch an image. It crops the center section." But under GD I do not believe this is the actual behavior, regardless of intent, GD is coded to resize the image as a square and stretching may occur.

    I have not tested the image magick functionality yet as my host just today enabled me access to image magick. I can provide you with sample images of the three image sizes under GD so that you can see the stretching that is occuring, if you want.

    Thanks,

     

    @bernardo - this is what I did to stop making the images square and stretched under the GD library.

  • Hi Guys

    Sorry if im being stupid i am new to elgg.  I have uploaded and enabled the Tinypics plug in however when i click to access the admin page it comes back with the "Oops this link appears to be broken message".  I thought it may have been an issue with the upload so have removed and re-added it but the issue is exactly the same.

    Any help appreicated.

    Gav

  • I have same issue as GMC as.

    I am on a shared hosting just testing elgg and cant get in to admin panel from tidypics.

    I changed Chmod to 777 keep geting same issue.

    Is there any part of the admin.php I need to change? thanks and sorry for my EN

  • I apologize if I'm just missing it, but I do not understand how to install this plug in.  The zip file does not have a parent folder for tidypics, so I am very dubious about moving all of the contents to the mod directory.  Could someone please point me to a place to get the installation instructions?

    Thank you very much.

  • @ StanZ

    make a folder and call it "tidypics" and unzip everything into that folder, then upload that folder to the mod directory of your elgg installation.

  • Very nice plugin congratulations!!!

  • @chirhoxi - the stretching obviously shouldn't happen. I've never seen it happen. Perhaps changing the default thumbnail sizes away from square is causing this. Will look into it.

  • Those having problems with admin.php - I don't know what the problem is but will look into it. Perhaps it is an encoding problem. 

  • @StanZ - oops, looks like we forgot to zip up the code with the container directory. We'll be releasing a new version this weekend that will have the tidypics directory.

  • @tidypics team

    do you know why the direct downloads to my images are broken after i set the albums privacy settings from private to public?

  • @Tidypics Team

    After closer examination of the code (but not TOO close) I figured out what was causing the stretching of the thumbnails. With a fresh tidypics module install, by placing the album view and thumbnail image size settings off of the defaults to a NON-SQUARE configuration. Stretching will occur.

     

    I am using the GD library not ImageMagick (have not had time to test imagemagick). But here are two examples to hopefully make it more clear.

    (1) Tidypics settings
    Primary image size [640x480]
    Album view image size [150x150]
    Thumbnail image size [50x50]

    Behavior: No Stretching and properly sized thumbnails

     

    (2) Tidypics Settings
    Primary image size [640x480]
    Album view image size [250x150]
    Thumbnail image size [50x50]

    Behavior: The album view thumbnail is stretched

     

    There must be something in the math when you are going through the width / height juggle in the code in tp_gd_resize(...) I haven't taken the time to analyize that algorithm in depth but just looking at it makes me go cross-eyed. After I stared at it long enough I decided to test if the problem occured when the code told the image to be square but was given non square configurations in the admin settings, and bing-o.

    After looking more into this, I agree with you that square thumbnails are fine and pretty standard (it was the stretching that threw me off). The interface settings are a little misleading though if you are able to define a height and width for thumbnails/album views but the code defaults it to a square anyway. Something nice to see would be a checkbox option in the admin settings to turn squaring on or off. Something to consider instead of just dis-allowing width/height settings in the interface in favor of making the square the only option by only allowing the admin settings to set one dimension.

    In my spare time I will try to figure out why the code is stretching the image if the height and width settings in the admin settings are not equal. But I would expect your team to be better equiped at it then I.

     

    Thanks again for a great mod, I hope my 2-cents are helpful.

     

    Regards,

  • @Cim - unsure why that would happen. Will have to test that.

  • @chirhoxi - did find a bug in the GD resizing code. I pulled all the calculations out into a single function so that we do not have to maintain 3 versions of the code. I also restricted the resizing to square for the two smallest thumbnails. I agree that the settings page was confusing on that point.  We left the original code related to this in the code commented out for those who want to experiment with it. If you do find an additional bug with the resizing code, would be pleased to fix it/get a patch and maintain that resizing code within Tidypics. 

  • I wanted to check, how can we disable the friend's image, all site images, friend's recently uploaded images etc... only the profile owners images/albums should be visible under the profile picture of the user.

  • hello all

     

    firsly i am sorry we all on 1.8 of ELGG. but at the moment our hosting wont take the new version.

     

    so we still 1.7

    i downloaded this version of tinypics, (not the latest one) and when got to like for example change settings. and then do save, i get this message

    Forbidden

    You don't have permission to access /elgg/action/tidypics/settings on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    bare in mind the elgg installed on http://sitename/elgg

    and the tinypics is in the mods folder of the elgg.

    i have had a look into the say imagemagic etc. and the hosting says its disabled but no idea how to enable that yet

     

    also when i do a new album, called test, and and also upload a test image

    eg, new album, name it test, do save and then it will show the page for uploading files to the album, but when i do a file for a test eg a jpg, and then save again i get this message at the top over the title...

    Admin of this site has not set photo album settings.

    and yet it uploads them, bu it shows or gives me a question mark image on the album cover and the photo

    thanks for your help in advanced...

    kind regardsdarkdaz

    PS i will wait 48 hours and then i will contact the author directly

     

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