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

Release Notes

The newest version of the Tidypics Photo Gallery. It has been updated for Elgg 1.5.

1.5 updates

  • improved css for new theme
  • ties in with activity river (only for album creation)
  • notifications for new album creation
  • grabs sitewide default access levels

Other changes

Rewrote a lot of core code - especially the page_handlers
More consistent menus
Fixed access bug on images that was making them private
Fixed group access bug that was prevent group members from adding/changing to albums
Many more bug fixes
Turkish language added (thanks to VeniVidiVinco)
German language file fixed (thanks to alfalive for that and bug fixes)

 

Other Improvements still to do

To upgrade:

  1. disable current plugin
  2. delete tidypics directory
  3. upload the code
  4. enable plugin

 This version has a hard coded limit on filesize inherited from previous versions. As pointed out in the comments, you can edit line 62 of tidypics/actions/upload.php to change this limit. The largest filesize will be determined by your server setup so you cannot just change it to a huge value and expect it to work. The current limit in this code is ~ 1MB.

The next version will have a rewritten uploader that should be more robust and offer more feedback to the administrator on configuration options. We will also be adding in some hooks to allow for quotas.

  • I am going through the code trying to figure out where to increase the file upload limit. From what I can see if the User Setting isn't set it defaults to 10mb. 

    I have come across:

    //TODO: REMOVE THE BELOW IF STATEMENT ONCE get_resized_image_from_existing_file() ACCEPTS IMAGES OVER 0.9MB IN SIZE

    if (filesize($file->getFilenameOnFilestore())<= 943718) { //create thumbnails if file size < 0.9MB

    try {

    $thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),600,600, false); 

    } catch (Exception $e) { $thumblarge = false; }

    try {

    $thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),153,153, true); 

    } catch (Exception $e) { $thumbsmall = false; }

    try {

    $thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(),60,60, true); 

    } catch (Exception $e) { $thumbnail = false; }

    }

    But to me that just creates the thumbnail if over 0.9mb. 

    If it is only allowing 1mb what is the point of the $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics'); as $maxfilesize doesn't pay any part?

  • I got it to work once again. In the actions/upload.php file. Increasing the value 943718, will allow bigger files to be uploaded:

    if (filesize($file->getFilenameOnFilestore())<= 943718) { //create thumbnails if file size < 0.9MB

    I put in 2943718, and set my max size in the plugin settings to 2048. I can now upload 2MB files without issues. Thanks team it really looks great.
  • I also verified that increasing everything works. I got a 3MB jpg to upload and create a thumbnail. A 2MB png worked fine and a 1.7MB gif was no problem. The wait for files of this size without some sort of visual status update seemed to take forever. I got impatient and clicked the save button a second time, after a brief pause the page reloads fine with the thumbnail. Hope this helps.

  • I would like to make my first coding contribution. I did this all by myself. :)

    I changed the Maximum file size to also display the equivalent MB, for easier reference.

    It now reads: Maximum file size: 2560 KB (2.5 MB)

     

    Line 50 of views/default/tidypics/forms/upload.php 

    <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br />

     

    Change to:

    <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize . ' KB (' . $maxfilesize / 1024; ?> MB)</i><br />

     

    Line 22 of languages/en.php

    'tidypics:settings:maxfilesize' => "Maximum file size in kilo bytes (KB):",

     

    Change to:

    'tidypics:settings:maxfilesize' => "Maximum file size:",

  • I don't know exactly what I'm doing, so I hold no promises. Your milage may vary. It worked on my site. Make sure to set the max size in the plugin settings also. 

    Realistically, over 3mb for more than one file will seem to take a long time to upload. You might want to start smaller and see how it goes. I'm sticking with 2.5mb for now. Most of my photos off my camera don't go over 2.3mb. 

  • Anyone know how to get the photos to display from first uploaded to last rather than the current method of "last one displayed first"?

  • Thanks for this great plugin!

    I have a small problem, as soon as I activate tidypics, then the "edit" link in the top bar of every widget goes away for all widgets on the user profile page and on the dashboard. This happens only for "normal" users and not for the admin user. I'am using elgg 1.5, I tried already a different order of plugins but it does not help. As soon as I activate tidypics, the edit links go away and if I disable the plugin the links are back again.

  • I can confirm this happens. My site and tested in MAMP with a clean install. Only enabling tidypics and bookmarks.

  • Yes, I can confirm this, too!

  • My assumption is when the group and profile views of the widget were combined, it created a permission issue. 

  • @Till & Skotmiller

    I do not have an issue with the edit button my widgets not showing with TidayPics Enabled. Have you tried changing the ordering of your plugins? Could be a conflict with another plugion and Tidypics together that is causing your problem

    @TidyPics team - Regarding last PM about Thumbs not showing correct in each album. I did not have time to check the code to see if it was caused before or after but I found out about 2 AM this morning that all was fine. The only thing that had changed is that I restarted my browser so all is well here.

  • > Have you tried changing the ordering of your plugins?

    Yes. I tried already with a different oder and also disabling of other plugins.

  • @ father

    I did a clean install of elgg and tidypics, in MAMP. I disabled all the plugins except bookmarks, tidypics, and profile. And "edit" was missing when tidypics was enabled. Remember this only happens for users, not admins. The admin profile is fine, the edit button is there. Which is why it leads me to believe it's a permission issue. If you look at izaps views.php file it looks to me like it determines permissions for the widget before displaying it. I can't figure it out. But, I'm sure the team will. Just tossing in my best guess.

  • @Skot and Till

    Ok I also can confirm this bug as well. I did not see it when I was logged in as Admin

    Further I have found that only admin can set, display or delete status messages.

    So there is 2 bugs I am seeing

  • Just for the record if it helps the team

    I backed up to a previous SVN version and all problems were resolved. So its something that was an issue in the thsi release. According the I believe the SVN version that worked fine was 1.09

  • Just created a normal user account to test it, and yep, I can confirm the same problems listed by @Till.

  • Also, it'd be lovely if (by default) the only member of a group that could delete his or her photo was the person who uploaded it. Otherwise we might see some vandalism.

  • @TidyPics

    I think it'd be a good idea to add an 'add album button' in the widget in case there are no albums created yet. Something like this code at the end of tidypics/albums.php:

    }else{
            echo '<div class="shares_widget_wrapper">';
                if ($owner instanceof ElggGroup){
                    echo '<div class="forum_latest">'.elgg_echo("album:none").'</div>';
                    //check if owner has write rights. If so, let him edit the album
                    $container_guid = get_input('container_guid', $_SESSION['user']->getGUID());
               
                    if (can_edit()){
                        echo '<a class="add_topic_button" href='.$CONFIG->url .'pg/photos/new/'.$owner->username.'>'.elgg_echo("album:create").'</a>';
                    }
                }
                else{
                    echo '<p class="pages_add_title">'.elgg_echo("album:none").'</p>';
                    //check if owner has write rights. If so, let him edit the album
                    $container_guid = get_input('container_guid', $_SESSION['user']->getGUID());
           
                    if (can_edit()){
                       
                        echo '<p class="pages_add"><a class="pages add" href='.$CONFIG->url .'pg/photos/new/'.$owner->username.'>'.elgg_echo("album:create").'</a></p>';
                    }
                }
            echo '</div>';           
        }

    and in start.php:

        function can_edit(){
            return page_owner_entity()->canEdit(get_loggedin_userid());
        }

  • Thanks for bug reports everyone. You can track the progress of the edit link issue here: http://code.google.com/p/tidypics/issues/detail?id=16

  • @David Moon - I've been unable to reproduce the issue you are having with the activity river text. Anyone else seeing that? 

  • I can confirm 2 bugs that we had that disappeared once we disabled Tidypics. One was that only admin accounts could delete messages, and all widgets lost their edit facility. This was not the case if you where signed in as an admin, but user accounts. We started getting reports about the inability to delete just after we enabled the new version although when we tested it it seemed fine, it was only when we logged in as a user it became apparent

  • @Malaga Jack - both are caused by the same stupid thing - I was returning false from a function when I shouldn't have returned anything. New version uploaded.

  • @Tidypics Team. Thank you very much for the fast response and fix!

  • Since installing 1.5.1 i cant upload or delete photos, tidypics is completely useless on my site.

     

  • @jkempton - sorry you're having difficulty. Since so many people are using it without this issue, there must be something wrong on your install.

Stats

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

Other Projects

View iionly's plugins