Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Image Gallery Extension: Testers Needed

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Go to End
Author Topic: 76927 Views
  • Andre
    Avatar
    Community Member
    126 Posts
  • Andre
    Avatar
    Community Member
    126 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Hi there, I fixed the ImageGalary by myself.

    the method checkFolder() in ImageGalleryPage.php starting at line 73 should be changed to the following:

       function checkFolder() {
          if( ! $this->RootFolderID ) {
             $galleries = Folder::findOrMake('image-gallery');
             $galleries->Title = 'Image Gallery';
             $galleries->write();
             $folder = Folder::findOrMake('image-gallery/' . $this->URLSegment);
             $folder->Title = $this->URLSegment;
             $folder->setName($this->URLSegment);
             $folder->write();
             
             $this->RootFolderID = $folder->ID;
             $this->write();
             
             $this->requireDefaultAlbum();
             FormResponse::add( "\$( 'Form_EditForm' ).getPageFromServer( $this->ID );" );
          }
          else {
             $this->RootFolder()->Title = $this->URLSegment;
             $this->RootFolder()->setName($this->URLSegment);
             $this->RootFolder()->write();
          }
             
       }

    Hope this helps anyone having the same Problems.

  • Andre
    Avatar
    Community Member
    126 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Ho there,

    another error was raised on my ImageGallery Installation.

    It seems, that old Galleries, added under 2.3.x, are incompatible with 2.4.x.

    Most of my old Galleries do not work. Also I'm unable to add Pictures from my old Galleries to a new one.

    Here is the Error Message I get after adding a new Album and trying to add Pictures from an existing Folder of a Gallery prior SS 2.4.x.
    It adds the Pictures insite Uploadity and when pressing "continue" the following comes up. Afterwards there are just empty Pictures shown in DataObjectManager unter Photos.

    [Notice] Trying to get property of non-object
    POST /admin/EditForm/field/GalleryItems/UploadifyForm?ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_198&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100

    Line 140 in /var/customers/hsvhandball/htdocs/image_gallery/code/ImageGalleryManager.php

    Source

    131    {
    132       $childData = parent::getChildDataObj();
    133       $childData->ImageGalleryPageID = $this->controllerID;
    134       return $childData;
    135    }
    136    
    137    public function getPreviewFieldFor($fileObject, $size = 150)
    138    {
    139       if($fileObject instanceof Image) {
    140          $URL = $fileObject->SetHeight($size)->URL;
    141          return new LiteralField("icon",
    142             "<div class='current-image'>
    143                <div id='preview-image'>
    144                   <img src='$URL' alt='' class='preview' />
    145                   <div class='ajax-loader'><img src='dataobject_manager/images/ajax-loader.gif' />". _t('ImageGalleryManager.ROTATING','Rotating')."...</div>
    146                </div>
    Trace

    ImageGalleryManager->getPreviewFieldFor(ImageGalleryImage)
    Line 512 of FileDataObjectManager.php
    FileDataObjectManager->EditUploadedForm()
    Line 436 of FileDataObjectManager.php
    FileDataObjectManager->saveUploadifyForm(Array,ImageGalleryManager_Popup,SS_HTTPRequest)
    Line 300 of Form.php
    Form->httpSubmission(SS_HTTPRequest)
    Line 137 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 155 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 155 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 155 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 147 of Controller.php
    Controller->handleRequest(SS_HTTPRequest)
    Line 281 of Director.php
    Director::handleRequest(SS_HTTPRequest,Session)
    Line 124 of Director.php
    Director::direct(/admin/EditForm/field/GalleryItems/UploadifyForm)
    Line 127 of main.php

    Is Image Gallery still under Development, or is it stuck?

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Is there a way to work out which base template is doing the rendering at any point?

    More specifically, when on a PAGE page I want to do something with the breadcrumb trail and when on an ALBUM page I want to do something else. I've been outputting all the page variables I can find and they are all identical, regardless of the underlying template.

    Is there a list of page variables specific to this module published anywhere?

    jf/

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    ^^bump^^

    Uncle Cheese, are you there?

    jf/

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Sorry, it's just difficult for me to troubleshoot these issues without being able to see them. Have you been able to replicate the issue on the demo site? http://dataobjectmanager.carlinowebdesign.com (admin/password)

    --------------------
    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Hi Uncle Cheese

    I don't really have an issue, nothing's broken. I'm just trying to soup-up my breadcrumb trail. The problem is this:

    When I create a gallery and place say three albums inside it I want my breadcrumb to do this:

    something > something > galleryName (when on the gallery, ie. the cover image thumbnails)
    something > something > galleryName > albumName (when on the album thumbnails)

    By default, the module always does the former and never the latter. I believe that's because regardless of gallery or album, it's always the same underlying record in sitetree_live that is being called.

    Now, galleryName is always $Title and albumName is $AlbumTitle, so I know how to retrieve the values I need. My problem is that I don't know how to tell the difference when I'm actually on a gallery page or an album page. ALL the variables, eg. URLSegment, are identical on both 'pages'.

    So the question is, which variable can I interrogate which tells me which type of page I am on?

    jf/

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    You can probably use <% if CurrentAlbum %> for that, no?

    --------------------
    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

    76927 Views
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.