Jump to:

10846 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: 74076 Views
  • throb
    Avatar
    Community Member
    23 Posts

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

    I wanted to add png as a type of file that can be uploaded....
    looking at the docs i saw that it was possible...
    setAllowedFileTypes(array $types)

    looking at the imagegallery code i see

                array(
                   'file_upload_limit' => $this->getUploadLimit(), // how many files can be uploaded
                   'file_queue_limit' => $this->getUploadLimit(), // how many files can be in the queue at once
                   'browse_button_text' => 'Upload Images...',
                   'upload_url' => Director::absoluteURL('ImageGalleryManager_Controller/handleswfupload'),
                   'required' => 'true'
                )

    i added :    'allowed_file_types' => array('jpg','png');
    that of course doesn't work.

    any more clues?
    rob

  • UncleCheese
    Avatar
    4085 Posts

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

    Yeah, that will get overridden by the $limitFileTypes definition in the ImageGalleryManager class, to prevent people from settingAllowedFileTypes('PHP') in an imagegallery or something stupid like that.

    I think I excluded PNG because I don't believe the GD class in Silverstripe will handle PNG. Can you look into it? If it does, I'll add it in.

  • el berto
    Avatar
    Community Member
    3 Posts

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

    Galleria is a JQuery plugin. I think it would need a separate template to work properly. It's not hard to add an additional plug-in to the image_gallery. I have a test version running on my work machine with old revision of image_gallery producing Galleria galleries, once its tided up (at the moment I modifying the image_gallery methods directly, I think I should be able to overwrite them in the mysite folder?) I will write up the changes I made to make it work.

    UC, I upgraded to the latest commit of the image_gallery, when trying to view a image_gallery page created with a previous version the following error pops up;

    Pages created with the new commit work fine. Edit nevermind... was a cache issue.

    One more thing, all of the css references to images are absolute... which is fine if the site is installed in the web root, but breaks for any site installed in a subdirectory. Might it be an idea to replace them with relative links and let the base tag in the theme deal with routing them to the correct address? I'm happy to post diffs here if that would help.

    Thanks again for you work.

  • UncleCheese
    Avatar
    4085 Posts

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

    Nice catch on the pathing. I just checked in a version with relative paths in the CSS. Should work, but don't have time to test. Can you try and let me know?

  • el berto
    Avatar
    Community Member
    3 Posts

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

    Just checked out the new revision. All the css changes work, however, lightbox also needs the links vars changing in it's script. I've attached the updated version (only difference is image links are now relative) that fixes the issue.

    Cheers

    El B

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

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

    Awesome. Appreciate that.

    If you haven't already seen the post, I'm adding a SlideshowPro extension to the ImageGallery. What does everyone think?

    http://www.silverstripe.org/all-other-modules/show/256209#post256209

  • Stephan
    Avatar
    Community Member
    55 Posts

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

    Hi UncleCheese,
    thanks very much for your great work.
    We just published a website with your gallery extension.
    It works great (even on windows with IIS6 ;-) ).

    One extension would be good:
    The params for the lightbox are within your code.
    Can this be extendable so whe don't have to change your code ?

    What is the best way to translate the text within your module ?

    TIA Stephan

  • UncleCheese
    Avatar
    4085 Posts

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

    The popup UI components that come with ImageGallery are just there for quick-start purposes. You can select "None" for the UI in the Configuration tab, and then build your own template with any popup plugin of your choice.

    Translations would be really helpful. I will add the translation tags into the template and I believe you can write your own translations from there.

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