Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

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

Image Gallery Extension: Testers Needed


Reply


417 Posts   78435 Views

Avatar
micahsheets

Community Member, 165 Posts

18 April 2009 at 9:42am

Edited: 18/04/2009 9:46am

I have figured out that this code has "die" in it which I think is keeping my init from running.

      if(!isset($this->urlParams['Action'])) {
         if($this->SingleAlbumView()) {
            die($this->renderWith(array('ImageGalleryPage_album','Page')));
         }
      }

Avatar
UncleCheese

4085 Posts

18 April 2009 at 9:46am

Sure. Keep your init() function as is, only below your css requirement, add all the blocks you need.

Avatar
UncleCheese

4085 Posts

18 April 2009 at 9:51am

Ahh.. that makes sense. Yeah, something was weird there.. when i just put return $this->renderWith, it came back blank, as I remember. die() was the only thing that worked for some reason. If you figure it out, let me know, and I'll make the update.

Avatar
micahsheets

Community Member, 165 Posts

18 April 2009 at 10:01am

Edited: 18/04/2009 10:04am

Could you add a public $useTemplate = 'ImageGalleryPage_album"; like you did with public $itemClass?

That won't help with the die() blocking my entire init() though.

Avatar
micahsheets

Community Member, 165 Posts

18 April 2009 at 10:08am

Here is what I did to make this work.

I added: public $useTemplate = "ImageGalleryPage_album"; to ImageGalleryPage.php

and changed the ImageGalleryPage.php init to look like this:

   public function init()
   {

      parent::init();
      self::prototype2jquery();
      Requirements::css('image_gallery/css/ImageGallery.css');
      
      if ($this->useTemplate == "ImageGalleryPage_album"){
         if(!isset($this->urlParams['Action'])) {
            if($this->SingleAlbumView()) {
               die($this->renderWith(array('$this->useTemplate','Page')));
            }
         }
         else if($this->CurrentAlbum())
            $this->includeUI();
      }

   }

then I set the public $useTemplate = "ImageGalleryPage_album in my subclass, then it all seems to work.

Avatar
stx333

Community Member, 14 Posts

21 April 2009 at 3:27am

Hi Uncle, didn't know where to ask this so I just replyed to one of yours..

A quick question:

In the "Configuration" tab there is a "normal size" input. Is there any way NOT to specify the size? What I'm doing is a gallery of images not of the same size - is there a way?

By the way - putting anything BIG like 5000 causes SS to throw an error without any explenation.

Thanks a lot for the answer.

Stx

Avatar
UncleCheese

4085 Posts

21 April 2009 at 3:33am

Unfortunately, the ImageGallery is built to output uniform sized thumbnails and full-sized images. If you want to break that convention, I'd recommend using the ImageDataObjectManager to build your Image class and template.

Avatar
micahsheets

Community Member, 165 Posts

21 April 2009 at 10:43am

Edited: 21/04/2009 11:25am

Hey, I had a huge long question posted here that was probably too difficult to understand so I removed the text. The forum software doesn't allow me to just delete one of my posts so I am just putting this explanation instead. If a mod wants to delet this post then please do. Also It would be something that might be good to add to the forum modules that people can delete their own posts if need be.

Thanks all.