Jump to:

10848 Posts in 2516 Topics by 1792 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: 74097 Views
  • Mad_Clog
    Avatar
    Community Member
    78 Posts

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

    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

    Attached Files
  • mobius
    Avatar
    Community Member
    54 Posts

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

    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?

  • micahsheets
    Avatar
    Community Member
    164 Posts

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

    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.

  • mobius
    Avatar
    Community Member
    54 Posts

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

    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

  • stooni
    Avatar
    Community Member
    89 Posts

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

    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

  • stooni
    Avatar
    Community Member
    89 Posts

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

    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

  • UncleCheese
    Avatar
    4085 Posts

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

    @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.

  • Xeal
    Avatar
    Community Member
    37 Posts

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

    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 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.

    Attached Files
    74097 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.