Tidypics Photo Gallery Plugin v1.08

Release Notes

Tidypics Photo Gallery

For Elgg 1.2+

Tidypics Photo Gallery is an Elgg plug-in that provides a very simple to use photo gallery.  It provides photo albums for both users and groups.  If you would like to see this plug-in in action, visit: http://oakpages.com.

 

Your contributions are always welcome!!!  If you wish to contribute to this plug-in, please release all your changes under a GPL-compatible license, upload your plug-in to the Tidypics group, and update the contributions.txt file with your changes.

 

------------------------------------------------------------------------
Version 1.08 Change List
Release Date: 02/08/2008
Contributors:
  * Gabriel Monge-Franco (http://gabriel.mongefranco.com)
------------------------------------------------------------------------
BEGIN VERSION 1.08 CHANGES
------------------------------------------------------------------------
* Merged most (safe) changes made by other contributors in v1.07.
 - Did not include SWFuploader or JQuery due to the number of bugs reported.
* Changed ugly "new album" picture into something better looking.
* Fixed bug whereby image objects were deleted from the database, but they physical files remained on the server.
  - Since deleting directories was not possible without the use of unsafe file operations, albums no longer create new directories.  Instead, all pictures are saved as /image/ALBUMGUID__picturename.
* Fixed some bugs in the English, Spanish and German language files and added missing error messages.
* Thumbnails now display the default error image (same as new album) when the requested image cannot be found.
* Fixed a bug in the multi-edit form that did not allow image titles to be saved.
* Removed some customizations made to edit.php action in v1.07 since they removed the ability to add titles to images.
* Fixed bug introduced in v1.07 that prevented images from being set as album covers.
* Fixed miscellaneous bugs in group albums widget.
* Removed jQuery for now since it was making the albums too slow.  In the future, we should look into replacing individual image views with lightbox2 or jQuery lightbox album views.


* TODO: fix Polish language file -- it seems to break the whole Elgg site! Maybe it needs to use HTML codes in place of international characters?
* TODO: Work around 0.9MB source file size limit when creating thumbnails (an Elgg limitation... can probably be fixed by using PHP GD functions directly)
  - The problem is with get_resized_image_from_existing_file().  Submitted a ticket to the Elgg tracking bug system.
  - Edit actions/upload.php when done. There is a dirty hack in place for now that needs to be removed once the above bug is fixed.
* TODO: disable public by default (input/accessRead.php) -- add setting to admin page that lets the site admin decide whether pictures can be public or not.
* TODO: allow group members to add pictures to group photo albums
* TODO: implement photo anotations
* TODO: look into replacing individual image views with lightbox2 or jQuery lightbox album views.

* OF NOTE: It is currently not possible to allow group members to edit an album created by another group member.  This is a bug with group permissions and it will probably not be fixed until [at least] Elgg v1.5 comes out.
------------------------------------------------------------------------
END VERSION 1.08 CHANGES
------------------------------------------------------------------------


------------------------------------------------------------------------
Version 1.07 Change List
Release Date: 02/03/2008
Contributors:
  * vazco (http://community.elgg.org/pg/profile/vazco)
  * simophin (http://community.elgg.org/pg/profile/simophin)
------------------------------------------------------------------------
BEGIN VERSION 1.07 CHANGES
------------------------------------------------------------------------
* About 10 missing translations added
* Translated to polish
* When no album is present, user can add a new album straight from the widget if he has the required rights
* Added some missing <p></p>
* Changed some  <? to <?php
* Unauthorized album edit taken care of
* Added jQuery Lightbox support, but commented out just in case someone won't want to use it (there may be some problems with the lightbox, since I'm not using it myself and I didn't test it)
------------------------------------------------------------------------
END VERSION 1.07 CHANGES
------------------------------------------------------------------------


------------------------------------------------------------------------
Version 1.06 Change List
Release Date: 02/03/2008
Contributors:
  * Gabriel Monge-Franco (http://gabriel.mongefranco.com)
------------------------------------------------------------------------
BEGIN VERSION 1.06 CHANGES
------------------------------------------------------------------------
* Forward all non-logged in users to World (public) pictures. This fixes a bug in which anonymous users would see a list of pictures titled, "'s pictures" (without a name).
* Forward requests to "owned" without an user ID to "owned/userid" when a user is logged in. This fixes a bug in which all users would see a list of pictures titled, "'s pictures" (without a name).
* Replaced several hard-coded strings to elgg_echo() functions so they can be translated.
* Re-enabled title entry in picture editing. Titles are only optional, so there is no reason to hide them, especially if some users may find them useful.  Moreover, lack of image titles makes list views awkward.
* Fixed multi-picture editing bug in which editing was disabled after uploading multiple pictures.
* Fixed several tags not conforming to standard PHP opening tags.
* Fixed some bugs in the English language file.
* Added Spanish and German translations (if you speak German, please double-check the language file!!!).
* Added a download link at the bottom of each picture to download the original file.
* Updated some icons and created missing ones.

* TODO: disable public by default (input/accessRead.php) -- add setting to admin page that lets the site admin decide whether pictures can be public or not.
* TODO: change ugly "new album" picture into something better looking.
* TODO: re-organize files to clean up the plug-in directory (e.g., move world.php to views/default)
* TODO: Fix bug whereby image objects are deleted from the database, but the physical files remain on the server.  The path can be found with $file->getFilename(), but would it be safe to execute shell commands directly???
------------------------------------------------------------------------
END VERSION 1.06 CHANGES
------------------------------------------------------------------------

  • I'm glad to see you've picked up this project!

    I took a quick look at the Polish translation file, and the problem is the dreaded UTF-8 BOM character.

    Kevin Jardine gives a good explanation of it here: http://groups.google.com/group/elgg-development/browse_thread/thread/21d9b360862f1278/4e928428f6fc3880?lnk=gst&q=utf-8+bom#4e928428f6fc3880

  • Tried this version of tidypics and found a little bug: If you are not logged in and want to view an album by clicking 'albums' on the the menu under the profile picture of the user, the href generated is domain.xx/community/pg/photos/owned/[username] but then it will show all site albums instead of the albums that belongs to this user :-))

  • All pictures in the albums overview will be displayed among themselves not side by side?

  • Nice work!

    except for the two little limitations it works very fine. I'm impressed that there is no need to reupload existing images in defiance of the new file saving format. Thanks for implementing the new groups widget view.

  • item:object:image and item:object:album are not defined in language files...

  • Thanks for working on this. Concerning directories, I'd rather have empty directories left over from deleted albums than all the images in a single directory. Plus, I think deleting albums is not something than will happen often.

  • About the polish translation - it needs to be converted to the URF-8 without BOM format in order to work. If you make some edits to this file in the Windows notepad, you have to convert it in the editor which can write the file in UTF-8 without BOM format (Notepad++ works fine). If this configuration won't work for you, try some other formats - I guess it depends on the server you use.

  • Tried the plugin and all works except when displaying users profile the the photo album widget displys all the photo albums and not what the edit options states!!! Any ideas? Can we also have the thumbnail pictures large or small?? Thanks for help.

     

  • Thanks all for the quick feedback!!

    @cheltenham -- I'm not sure I understand the problem you are having with the widget.  Can you please explain this with more detail?

    Karsten -- I'm not sure what you mean by, "All pictures in the albums overview will be displayed among themselves not side by side?"

    @cash -- True, it would be nicer to have a folder for each album.  However, the folder organization is completely transparent to the end user.  Besides, the pictures are stored under each user's /elgg_data/<username>/image directory, so there is no risk of a user accessing another user's pictures.  For example, your "coolpic.jpg" file would be stored as /elgg_data/cash/image/123__20080209-coolpic.jpg, while mine would be /elgg_data/gabrielinux/image/123__20080809-coolpic.jpg.

     

  • If you click on your own profile via the icon top left of Dashboard. Select EDIT page and add Photo Albums. Then select EDIT and click Number of photo Albums to Display = 2

    What happens is all the photo albums show!!

  • @Gabriel, I was thinking more of the administrator who has to debug some sort of problem that a user is having. If the user has a thousand images, it can make it difficult to poke around the directories.

  • Will the new file directory system allow for moving photos between albums? That would be a good feature.

  • Re:

    * TODO: Work around 0.9MB source file size limit when creating
    thumbnails (an Elgg limitation... can probably be fixed by using PHP GD
    functions directly)
      - The problem is with get_resized_image_from_existing_file().  Submitted a ticket to the Elgg tracking bug system.
      - Edit actions/upload.php when done. There is a dirty hack in place for now that needs to be removed once the above bug is fixed.

    The problem for me is not with the file size but with the picture size. I tried uploading a photo only 567 kb in size but 2448x3264 in pixels and it wouldn't create the thumbs. It must have something to do with with php memory usage in creating the thumbs. Here is a test for a 2400x1800 pixel (697 kb) file on my server. This test passed.

    	debug test.php> code-lines: 44-36 time: 0.0031 mem: 79 KB
    Calculated : 20.95 MB
    Loading image 2400x1800.jpg, size 2400 * 1800, bpp 8, channels 3... done
    debug test.php> code-lines: 36-44 time: 0.2414 mem: 21222 KB
    Memory usage: 20.72 MB
    Difference: 20.65 MB
    Difference / (Width * Height * Bytes per pixel): 1.6705679012346
    Destroyed. Memory usage: 78.13 KB

    Here is a test for the 2448x326400 pixel (697 kb) file mentioned above. this test failed:

    	debug test.php> code-lines: 44-36 time: 0.0030 mem: 79 KBCalculated : 38.59 MB
    Loading image 3264x2448.jpg, size 2448 * 3264, bpp 8, channels 3...

    Fatal error: Out of memory (allocated 33292288) (tried to allocate 9792 bytes) in /my.web.site/memory/test.php on line 41

    Can we utilize an external graphics program like ImageMagick instead of php gd to create thumbnails? I have a Gallery2 site on my server and have no problems uploading large photos and creating resized images.

     

    ps. I just spent 10 minutes filling out a comment only for it to disappear when I said save because i timed out on my log-in grrr!

  • Can someone add a feature where the pics do a slideshow while in the small window of the profile view. That would be just awesome to click on someones profile and have pics rotating right on their profile. My ELGG system e3pros.com is where my customers can show off their projects. Thank you wonderful anyways! William

  • Sorry, typo in my last message. Second test file was 2448x3264 pixels (564 kb)

  • Hi Gabriel

    Any thoughts on our issue?

    Ian (Cheltenham)

  • I agree with LKLaRose, the upload problems seem to be related to the image size rather than the file size. I am currently having issues with the file plugin (on which I believe Tidypics is based) when users try to upload photos from a large megapixel (e.g. 12mp) camera. The filesize is only 2.2mb but the image is 4000x3000px in size. When we resized it down to 50% it uploaded fine.

  • Regarding the TODO: allow group members to add pictures to group photo albums - I started to look into this but got stuck very early on :-(

    http://groups.google.co.uk/group/elgg-development/browse_thread/thread/39ec5d57166a35ca?hl=en

    However, I then read: OF NOTE: It is currently not possible to allow group members to edit an album created by another group member.  This is a bug with group permissions and it will probably not be fixed until [at least] Elgg v1.5 comes out.

    Is there no way around this at all until this bug gets fixed?? I hope it gets fixed in 1.5 as it is causing me all sorts of problems as we are running Elgg as a closed system.

  • Hi everyone -- thanks for the comments and feedback.  I'm looking into all the issues reported, but I won't have a whole of time until next week.  Meanwhile, I do have some questions:

    1) Is everyone OK with leaving empty directories on the server upon album deletion, instead of saving all pictures on a single directory?  The main benefit would be for admins when troubleshooting issues.  However, this is completely invisible to the end users, but not using directories makes things easier to program.

    2) Does anyone know a way to give group members write permissions?  The "Group:<group name>" permission is broken in Elgg 1.2.

    3) Since there seems to be a problem with GD not handling high-resoluiton images correctly, would using ImageMagick be a viable solution?  It is probably more efficient, but I don't know that every server would have it available, which would reduce the usability of Tidypics.  Or does anyone have a different work around?

    4) I'm pretty new to Elgg and PHP so... would somebody be willing to split some of the work?  I guess I need help with the TODO items and the following bugs/new requests: profile/group widget not showing the specified number of albums; missing items in the language files; broken Polish language file; moving pictures from one album to another; slideshows in profiles; and anonymous users cannot see a member's albums (this bug was generated by another bug fix.... the "'s photos" bug).

  • Gabriel,

    ad 2) Maybe we should wait for Elgg 1.5? It's being released soon.

    ad 4) I can help you with some of the work. If you give me an e-mail, I'll send you the working Polish translation this evening.

  • Here is the fix for the language file:

    add two lines in /languages/en.php (xx.php) after line 27:

    'item:object:image' => "Photos",
    'item:object:album' => "Albums",

    :-))

  • There is another little bug:

    If you are not logged in and you are in the profile view of a user who has one or more album(s), klick on 'photos' under the profile avatar. The generated url is ... /pg/photos/owned/[user] but will be resetted to ... /pg/photos/world so that you see all site albums and not only the albums of the specified user. If i have time today, i will try to find out why.

  • Found a possible solution:

    Line 18 of /tidypics/index.php commented out
    // if (!isloggedin()) forward('pg/photos/world');

    and it works.

    Should the solution be so simple??

  • And now found another strange behavior:

    created one new album and uploaded two photos. Album view is ok. But in addition i have now 6(six!) new empty files in my files view?

Gabriel Monge-Franco

Gabriel Monge-Franco is an open source developer, hacker, poet, musician and robotics experimenter.

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 3
  • Updated: 2014-11-17
  • Downloads: 11208
  • Recommendations: 2

Other Projects

View Gabriel Monge-Franco's plugins