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


Go to End
Reply


417 Posts   80137 Views

Avatar
Mad_Clog

Community Member, 78 Posts

28 April 2009 at 8:07am

Edited: 28/04/2009 8:10am

Hi UncleCheese,

I translated the module's lang file to Dutch (nl_NL), see attached file.
I couldn't find where "$lang['nl_NL']['ImageGalleryPage']['TO']" was used so i left that untranslated as "to" can have more then 1 meaning in Dutch.

Also in your "ImageGalleryPage_album.ss" on line 78 you forgot to translate "Next"

Old

<li class="next"><a title="<% _t('VIEWNEXTPAGE', 'View the next page') %>" href="$GalleryItems.NextLink">Next »</a></li>


Should be

<li class="next"><a title="<% _t('VIEWNEXTPAGE', 'View the next page') %>" href="$GalleryItems.NextLink"><% _t('NEXT','Next') %> »</a></li>

- Geert

Avatar
mobius

Community Member, 54 Posts

28 April 2009 at 9:45pm

Wow Uncle Cheese - this is awesome stuff!

Just one question for now, can I have the large images show up inside a standard div on my page, ie not in a lightbox?

Avatar
micahsheets

Community Member, 165 Posts

29 April 2009 at 3:18pm

Edited: 29/04/2009 4:15pm

Uncle Cheese,

I was wondering if you could replace you init function in ImageGalleryPage.php from:
   
public function init()
   {

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

   }

To:

   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();
      }

   }

And add:
public $useTemplate = "ImageGalleryPage_album";

Also to make this work function includeUI() needs to be change to protected instead of private.

This way people who extend the class can define their own template. Otherwise the die() in your init kills the init of the child class.

This change should be backwards compatible and not mess with anyones galleries if they do not extend them the way I do.

I understand if you don't want to make this change, but it sure would be nice since I use the image_gallery a lot on different sites but almost always extend it for my own specific use. I like to retain upgradability so I do not want edit your code at all and do all my customization in my own code folder.

Thanks.

Avatar
mobius

Community Member, 54 Posts

29 April 2009 at 5:25pm

Sorry, one more thing: when I try and add an album I get a path not found error, and I have to manually make the /assets/image-gallery/PageName folder... is this a bug? I'm running svn trunk

Avatar
stooni

Community Member, 89 Posts

29 April 2009 at 9:50pm

Edited: 29/04/2009 9:55pm

i become these error from gallery, what can i do?

Error: Bad class to singleton() - ImageGalleryPage
At line 263 in .../httpdocs/sapphire/core/Core.php

* Bad class to singleton() - ImageGalleryPage
Line 263 of Core.php
* singleton(ImageGalleryPage)
Line 207 of SiteTree.php
* SiteTree::page_type_classes()
Line 315 of CMSMain.php
* CMSMain->PageTypes()
Line 1099 of CMSMain.php
* CMSMain->AddPageOptionsForm()
* call_user_func_array(Array,Array)
Line 319 of ViewableData.php
* ViewableData->obj(AddPageOptionsForm)
Line 47 of .cache.....httpdocs.cms.templates.Includes.CMSMain_left.ss
* include(...-httpdocs/.cache....httpdocs.cms.templates.Includes.CMSMain_left.ss)
Line 354 of SSViewer.php
* SSViewer->process(CMSMain)
Line 774 of ViewableData.php
* ViewableData->renderWith(Array)
Line 445 of LeftAndMain.php
* LeftAndMain->Left()
* call_user_func_array(Array,Array)
Line 409 of ViewableData.php
* ViewableData->XML_val(Left,,1)
Line 59 of .....httpdocs.cms.templates.LeftAndMain.ss
* include(...-httpdocs/....httpdocs.cms.templates.LeftAndMain.ss)
Line 354 of SSViewer.php
* SSViewer->process(CMSMain)
Line 175 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(admin)
Line 115 of main.php

... = path to the file in my server !
----Stooni

Avatar
stooni

Community Member, 89 Posts

29 April 2009 at 9:59pm

And when i create a new gallery

these error

Warning: copy(.../httpdocs/assets/Uploads/P1050071.JPG) [function.copy]: failed to open stream: Permission denied
At line 129 in .../httpdocs/sapphire/filesystem/Upload.php

--thanks for help

Avatar
UncleCheese

Forum Moderator, 4096 Posts

30 April 2009 at 2:31am

@Mad_Clog - Thank you. I'll add in the Dutch translation.

@mobius - Just create your own ImageGalleryPage_album.ss in your mysite/Layout folder and you can control the presentation as you wish. Make sure you select "none" for the popup style. Not sure about the folder creation. You shouldn't have to do that. Was the "image-gallery" folder created automatically? What about "image-gallery/YourGalleryName"?

@stooni -- Looks like you just need to run a /dev/build to rebuild the class manifest. Make sure your permissions for your assets folder are writeable by Apache. Either 775 or 777 if you have to.

Avatar
Xeal

Community Member, 37 Posts

1 May 2009 at 2:52am

Hey! I started using the Image Gallery recently, and I love how easy it is to upload images and make separate albums. It's perfect for what I'm building at the moment. I thought I'd go ahead and translate it into French, which is the only other language I speak, so I guess I got lucky that no one else has done the French version yet :P I can take the credit for it haha.. So here you go the French Translation.

I'm also impressed at the amount of modules you have been keeping up with UncleCheese. It's simply amazing =) and your modules are all very useful to me hehe. :D

Go to Top