We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17249 ☆ A M B ☆
    • 165 Posts
    Hi;
    I’ve checked the latest new welcomed changes for the Gallery and decided to try them in a fresh 2.0.8 Revo install

    I’m getting this error when uploading the pictures over the single file or the batch upload modes.
    When using the batch upload the error shows once for each generated thumbnail:

    OutputThumbnail() failed - headers already sent in file "phpthumb.class.php" on line 3652
    [2011-03-14 12:36:27] (ERROR @ /assets/components/gallery/connector.php) [Gallery] Error outputting thumbnail:
    phpThumb() v1.7.9-200712090829
    
    OutputThumbnail() failed - headers already sent in file "phpthumb.class.php" on line 3652
    


    Also when trying .zip upload the windows stays in the Saving... state forever (with the loading bar looping)
    See image attached.

    Should i file this issues at Github or have you experienced this before and have a solution?
    Regards, and thanks in advance for the help.

    Using:

    Windows 2003 Server
    All Revo requirements met.

    Write permissions confirmed for:
    /core/cache
    /core/config
    /core/packages

      • 17249 ☆ A M B ☆
      • 165 Posts
      Also, after the batch upload, then hitting, Save, Back... the album show as inactive.
      Then, when trying to update Active and Prominent boxes to enable them again, a error pops in the javascript console when hitting the Save button:
      Uncaught TypeError: Cannot call method 'setDisabled' of undefined
      


      See img attached.

      Let me know if you need additional info to help solve this.
      Thanks in advance.

        • 17249 ☆ A M B ☆
        • 165 Posts
        The last error concerning the Active/Prominent check boxes were fixed in a update. Thanks for that.
        The other errors in the console still shows every time a thumb is called.

          • 22244
          • 144 Posts
          It would be so cool if you were able to assign an image to more than one gallery or move them from one gallery to another.

          Currently this is not possible. You have to delete the image in gallery number one and make a new one in gallery number two.
          Or you have to add the image two times if it belongs in two galleries.

          I really really hope this will be a future feature!!
            • 21838
            • 284 Posts
            The Gallery.Gallery snippet is only to have absolute thumbnail sizes. Can we have a max-width max-height for this so to have different ratio-aspects in thumbnails?
            https://github.com/splittingred/Gallery/issues/86
              MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
              • 36686
              • 165 Posts
              Since upgrading Gallery to 1.0.2-rc2 and even 1.1 I don’t get it to work at all anymore, even after downgrading to 1.0.1-rc2.

              All I’m using is this simple call (also tried uncached):

              [[Gallery? &album=`Gammelvala2010`]]


              Nothing is displayed at all as you can see at http://gammelvala.se/galleritest.html

              Am I required to install anything other than the Gallery snippet, such as phpthumb or anything like that? I’m running MODx Revolution 2.0.8-pl (traditional).

              Any help would be much appreciated!
                • 14822
                • 61 Posts
                Quote from: lithiumlab at Mar 14, 2011, 11:02 AM

                Hi;
                I’ve checked the latest new welcomed changes for the Gallery and decided to try them in a fresh 2.0.8 Revo install

                I’m getting this error when uploading the pictures over the single file or the batch upload modes.
                When using the batch upload the error shows once for each generated thumbnail:

                OutputThumbnail() failed - headers already sent in file "phpthumb.class.php" on line 3652
                [2011-03-14 12:36:27] (ERROR @ /assets/components/gallery/connector.php) [Gallery] Error outputting thumbnail:
                phpThumb() v1.7.9-200712090829
                
                OutputThumbnail() failed - headers already sent in file "phpthumb.class.php" on line 3652
                


                Also when trying .zip upload the windows stays in the Saving... state forever (with the loading bar looping)
                See image attached.

                Any solution for this issues??

                my system
                MODx 2.0.8-pl Revo
                PHP 5.2.12
                MySQL 5.0.91-community
                  • 17249 ☆ A M B ☆
                  • 165 Posts
                  Tested also with RC3 and still error persists.
                    • 2048
                    • 15 Posts
                    Very good job

                    but it is possible to have ratio aspect keep on thumbnail without generating extra picture ?
                    i found this how seems very good : http://snipplr.com/view/753/create-a-thumbnail-maintaining-aspect-ratio-using-gd/

                    because i have picture with different ratio and actually Gallery generate extra pixel white which is not pretty if background is not white

                    [Edit]

                    As i needed real url of gallery image and not version of thumbnails, i made a little fork of snippet GalleryItem in adding these lines :
                    /* setup placeholders */
                    $itemArray = $item->toArray();
                    $itemArray['filename'] = basename($item->get('filename'));
                    $itemArray['filesize'] = $item->get('filesize');
                    $itemArray['image_path'] = $item->get('image_path');       //adding
                    $itemArray['absoluteImage'] = $item->get('absoluteImage'); //adding 
                    $itemArray['relativeImage'] = $item->get('relativeImage'); //adding ... in reality this is one i needed 
                    
                    


                    and now can use these new placeholders :

                    [[!MyGalleryItem? &id=`4` ]]
                    [[!+galitem.filename:notempty=`
                    
                      <img class="[[+galitem.imgCls]]" src="[[+galitem.relativeImage]]" alt="[[+galitem.description]]" />
                    
                    `]]
                    


                    in fact i had created also an another snippet which give me ID of Gallery item in giving his name, tag or album :
                    <?php
                    /**
                     * Addon Gallery
                     *
                    
                     * @package gallery
                     */
                    /**
                     * Get id a single Gallery Item
                     *
                     * @package gallery
                     */
                    $gallery = $modx->getService('gallery','Gallery',$modx->getOption('gallery.core_path',null,$modx->getOption('core_path').'components/gallery/').'model/gallery/',$scriptProperties);
                    if (!($gallery instanceof Gallery)) return '';
                    
                    /* get ID of item */
                    $name = $modx->getOption('name',$scriptProperties,'');
                    $album = $modx->getOption('album',$scriptProperties,false);
                    $tag = $modx->getOption('tag',$scriptProperties,'');
                    
                    
                    
                    if (empty($name) && empty($album) && empty($tag)) return '';
                    
                    /* setup default properties */
                    
                    $c = $modx->newQuery('galItem');
                    $c->innerJoin('galAlbumItem','AlbumItems');
                    $c->innerJoin('galAlbum','Album',$modx->getSelectColumns('galAlbumItem','AlbumItems','',array('album')).' = '.$modx->getSelectColumns('galAlbum','Album','',array('id')));
                    
                    /* pull by album */
                    if (!empty($album)) {
                        $albumField = is_numeric($album) ? 'id' : 'name';
                    
                        $albumWhere = $albumField == 'name' ? array('name' => $album) : $album;
                        $album = $modx->getObject('galAlbum',$albumWhere);
                        if (empty($album)) return '';
                        $c->where(array(
                            'Album.'.$albumField => $album->get($albumField),
                        ));
                        $galleryId = $album->get('id');
                        $galleryName = $album->get('name');
                        $galleryDescription = $album->get('description');
                        unset($albumWhere,$albumField);
                    }
                    if (!empty($tag)) { /* pull by tag */
                        $c->innerJoin('galTag','Tags');
                        $c->where(array(
                            'Tags.tag' => $tag,
                        ));
                        if (empty($album)) {
                            $galleryId = 0;
                            $galleryName = $tag;
                            $galleryDescription = '';
                        }
                    }
                    if (!empty($name)) { /* pull by tag */
                        $c->innerJoin('galTag','Tags');
                        $c->where(array(
                            'galitem.name' => $name,
                        ));
                    }
                    
                    /* get item */
                    $c = $modx->newQuery('galItem');
                    $c->select($modx->getSelectColumns('galItem','galItem'));
                    $c->where(array(
                        'name' => $name,
                         ));
                    $item = $modx->getObject('galItem',$c);
                    if (empty($item)) return '';
                    $id = $item->get('id');
                    return $id;


                    Hum maybe it is possible to optimize ... i have just make this today ... for my first snippet wink
                    i think it will be more easier to integrate in GalleryItem ?

                    So for my site i do this for example for my software template :
                    [[!MyGalleryItem? &id=`[[!MyGalleryGetIDItem? &name=`icone` &album=`[[*alias]]` ]]`]]
                    
                    [[!+galitem.filename:notempty=`
                    
                      <img class="[[+galitem.imgCls]]" src="[[+galitem.relativeImage]]" alt="[[+galitem.description]]" />
                    
                    `]]
                    


                    i make an album by software and give name to image for his role : ’icone’ for icon, ’accueil’ for main screen ....
                    So just need to upload bitmaps and naming for new software ... laugh
                      coding Java Android and NDS
                      • 41520
                      • 7 Posts
                      Hi there,

                      I have the thumbnails at my desired size but can I control the method of cropping and from where the image is cropped?

                      I tried using the &thumbFar=`TL` thinking that would make the ratio crop from that point but it does not seem to work.

                      Can anyone point me in the right direction?

                      gallery-1.5.2-pl
                      MODX Revolution 2.2.5-pl (traditional) [ed. note: hendersizer last edited this post 13 years, 11 months ago.]