10809 Posts in 2495 Topics by 1783 members
|Go to End||Next >|
15 March 2009 at 5:50am
I wanted to add png as a type of file that can be uploaded....
looking at the docs i saw that it was possible...
looking at the imagegallery code i see
'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?
15 March 2009 at 5:59am
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.
15 March 2009 at 6:41am Last edited: 15 March 2009 6:44am
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.
15 March 2009 at 6:50am
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?
16 March 2009 at 2:05am Last edited: 16 March 2009 2:06am
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.
16 March 2009 at 6:46am
Awesome. Appreciate that.
If you haven't already seen the post, I'm adding a SlideshowPro extension to the ImageGallery. What does everyone think?
16 March 2009 at 10:11pm
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 ?
17 March 2009 at 7:23am
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.
|Go to Top||Next >|