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

Release Notes

Updated for Elgg 1.8

Thanks to Brett for significant contributions. Make sure you run the upgrade script.

This is a release candidate which means there is not going to be any significant development before the final 1.8 release. Changes will be bug fixes.

Please make useful bug reports (report browser information if browser related, report server information if server related).

  • rjcalifornia what is the version of your php and apache. It worked for me long time ago without any issue but then stoped after moving to different server. I did not tested latest version yet but I will test it tonight. Thanks for your feedback

  • @tidypic: The plugin installed in v1.8.1, Pictures uploaded properly but do not display in the gallery .Only 'X' marks are shown, like there are missing links.

    I used chrome 7.0.1, and blackberry 9810 to view .

    Please advice

  • Upgraded to latest version got below error for deleted contents and urls which are not existing any more.

    PHP Fatal error:  Call to a member function getGUID() on a non-object in \\www\\mod\\tidypics\\pages\\photos\\owner.php on line 25

    Code is below:- on line 25

    'container_guid' => $owner->getGUID(),

  • @kxx4: do you happen to have also installed the Short URLs plugin by Team Webgalli? I also had a problem with tidypics images not showing with version 1.0 of the Short URLs plugin. Version 1.1 fixed this issue for me. If you don't use the Short URLs plugin another plugin might cause the issue in your case. You could try if it works with other 3rd party plugins disabled. Maybe there are other plugins with conflicts with tidypics.

  • Rest of things are working but flash loader is not working first pic uploaded perfectly rest of all giving http error my stats are:-

    Elgg version=1.8.8

    MySQL = 5.5.16

    Apache = 2.2.21

    PHP = 5.3.8

    Browsers:- FF and IE

  • @iionly I am not using short url plugin. But it is giving me notification error like login to see this content or this content is not available or you don't have permmisions to view this. Even I am logged in with admin.

  • I disabled all plugins accept tidypics but it still throughing 500 erro for links which are not existing.

  • I'm having the same problem as ghumanz, one picture is uploaded fine, getting HTTP Error for the others after reaching 100%. Had the same problem in Elgg 1.7 though.

    Elgg 1.8.8

    MySQL 5.1.61

    Apache 2.2.15 (CentOS) Server

    PHP 5.3.10

    Flash Player 11,3,300,265

    Browsers: Firefox 14.0.1 and Safari 5.1.7 on Windows 7

  • First, I'm new in Elgg but an early PHP developer, and I'm very interested in this great software.

    To the point, great plug-in, works perfectly but some details does not work for me, and I do some fixes in the code for my particular purposes.

    For now, I'm interested than, when clicking the image in the album view, the image is opened in the PicLens slideshow instead of loading the image page (technically seeking in the RSS feed the specific image that I clicked) unless I open the link in a new window/tab (CTRL+Click) as well as Facebook. I understand than the problem is than is hard to find these parameters in the Flash.

    I searched everywhere (Google, elgg comunity and viewing the javascript code of the PicLens) but no results.

    Is possible to implement them? Is already implemented? If not, where can I find more information or documentation about the PicLens parameters?

    Thanks in advance.

  • Thanks for this great plugin.

    Just a quick remark regarding using eregi_replace() in class TidypicsAlbum. According to http://php.net/manual/en/function.eregi-replace.php:

    This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

  • in /mod/tidypics/views/default/object, the code part after return is obsolete and need to be removed:

    $full_view = elgg_extract('full_view', $vars, false);

    if ($full_view) {
        echo elgg_view('object/image/full', $vars);
    } else {
        echo elgg_view('object/image/summary', $vars);
    }

    return true;

    global $CONFIG;
    include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/lib/exif.php";

    $image = $vars['entity'];

    ...............

  • PLEASE READ THIS!

    In the multiuploads, I found an error using the $("#uploadify").uploadify() method at "views/default/js/photos/uploading.php". The Firefox's console error shows the following error message: $("#uploadify").uploadify is not a function.

    Searching, I resolved them by replacing the $ with jQuery in the method calling, leaving jQuery("#uploadify").uploadify(). So, is convenient to replace the $ by jQuery in uploadify method callings in the whole script to avoid conflicts (specially with other plugins). The errors are caused in the lines 15, 22, 87 and 88 at the "uploading.php".

    I fixed them and multiuploads works perfectly!

  • I choosed to redirect automatically when the photos are uploaded successfull by adding location.href=url; in the onAllComplete.

    60 success: function(json) {
    61   var url = elgg.normalize_url('photos/edit/' + json.batch_guid)
    62 $('#tidypics-describe-button').attr('href', url);
    63 location.href=url;
    64 }

  • one more problem found.

    • Sidebar is not loading any contents for example:-

    "include(tidypics/pages/lists/mostrecentimages.php): failed to open stream: No such file or directory" in file \\www\\mod\\tidypics\\start.php (line 237)

  • ghumanz have you the file 'mostrecentimages.php' in the correct path? This error is obviously caused because include() does not found the script.

  • Another problem. In 'pages/photos/album/sort.php' the developers forgot to add code to redirect any unauthorized users. This allow any unauthorized user to sort albumjs that they don't own.

    To resolve this, after

    // panic if we can't get it
         if (!$album) {
         forward();
    }

    // Redirect any unauthorized user
    if (!album->canEdit()) {
         // @todo cannot change it
         forward('photos/all');
    }

    In diff (patch) format:

    *** sort.a.php Sat Jul 28 02:03:07 2012
    --- sort.b.php Sat Jul 28 02:03:07 2012
    ***************
    *** 17,22 ****
    --- 17,28 ----
    forward();
    }

    + // Redirect any unauthorized user
    + if (!album->canEdit()) {
    + // @todo cannot change it
    + forward('photos/all');
    + }
    +
    // container should always be set, but just in case
    $owner = $album->getContainerEntity();
    elgg_set_page_owner_guid($owner->getGUID());

  • Another important consideration is using readfile() instead of file_get_contents() in 'pages/photos/image/download.php', because the performance and memory saving increases considerably, specially in big files. Here is a comparsion between several functions to output files to the browser, that explain better this.

    The full filename path is given by $image->getFilenameOnFilestore(), that is passed to readfile() after checking with is_file() and is_readable(). The file size is given by filesize() (if this function fails, the file size in the header is not sended). $image->originalfilename is still used to get the filename of the original file without the full path, to be placed in the header.

    There is my modified version of the script:

    <?php
    /**
     * Download a photo
     *
     * @author Cash Costello
     * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
     */

    $guid = (int) get_input('guid');
    $image = get_entity($guid);

    $disposition = get_input('disposition', 'attachment');

    if ($image) {
        $filename = $image->originalfilename;
        $fullfilename = $image->getFilenameOnFilestore();
        $mime = $image->mimetype;
        header("Content-Type: $mime");
        header("Content-Disposition: $disposition; filename=\"$filename\"");
        
        if (!is_file($fullfilename) || !is_readable($fullfilename)){
            @readfile(dirname(dirname(__FILE__)) . "/graphics/image_error_large.png");
        } else {
            // expires every 60 days
            $expires = 60*60*60*24;

            if($filesize = @filesize($fullfilename) !== false) header("Content-Length: $filesize");
            header("Cache-Control: public", true);
            header("Pragma: public", true);
            header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT', true);

            @readfile($fullfilename);
        }

        exit;
    } else {
        register_error(elgg_echo("image:downloadfailed"));
    }

  • Oops, a little bug in my code when the file size is given, output a 1-byte file instead of the full file.

    This is resolved replacing in the line 27:

    if($filesize = @filesize($fullfilename) !== false) header("Content-Length: $filesize");

    With the following at lines 27 and 28:

    $filesize = filesize($fullfilename);
    if(!empty($filesize)) header("Content-Length: $filesize");

  • also with Davod's recommendation to change # into jQuery, the flash uploader is showing HTTP Error and I get this error in the Firefox console

    ReferenceError: reference to undefined property f.ajaxSettings.traditional
  • hi,

    first sorry for my english because this is translated via google.
    how can I turn off tinymce in Tidypics and use the standart editor since this is not right with me. I turn tinymce it goes wonderfully but I would have liked tinymce for other applications continue to run.

     

     image



    // <![CDATA[
    var fctb_tool=null;
    function FCTB_Init_391f1108040c4de8a8f612ff4de15639(t)
    {
    fctb_tool=t;
    start(fctb_tool);
    }
    FCTB_Init_391f1108040c4de8a8f612ff4de15639(document['FCTB_Init_267e8bd289584522868bc145b8680f39']); delete document['FCTB_Init_267e8bd289584522868bc145b8680f39']
    // ]]>

  • Thanks for the great plugin.

    can you make option to upload images without making albums.
    And these images are stored in a default album.

  • no problems so far using 1.8.8 on centos 5 VPS

  • @Lufer2012 I have seen that this question has already been done for another plug-ins, but currently no answers. I'm finding ways to disable TinyMCE, but implies varoius scripts and fucntions.

  • @Lufer2012 and the users that need to turning off TinyMCE for comments, I have a non-fancy (but working) way to do this.

    * Open 'mod/tinymce/start.php' (or their variables or enhancements).
    * After function tinymce_plus_init() {  add the following:

    switch($_GET['handler']){
        case 'photos';
        /*case ...;*/ return false;
    }

    I prefer to use switch because I can add more handlers and is more elegant to use if/elseif blocks

    * Save changes and flush the cache.

    Technically, this will void the TinyMCE plug-in and the whole pages under the photos handler (comments, image description, etc) will use the default plaintext mode, tha TinyMCE is not necessary.

    Obviously, there are more fancy ways to do this, but I don't a Elgg specialist (but a PHP developer), then, is necessary than a elgg/plugin developer answer how to disable TinyMCE in some circumstances.

Stats

  • Category: Photos and Images
  • License: GNU General Public License (GPL) version 2
  • Updated: 2017-1-8
  • Downloads: 123474
  • Recommendations: 258

Other Projects

View iionly's plugins