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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Image Gallery Extension: Testers Needed


Go to End


417 Posts   117811 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 May 2009 at 2:58am

Merci bien! Je me demandais si je devrais le traduire a francais moi meme, mais comme on peut voir, mon francais n'est pas le meilleur. J'ajouterai le tien aussi-tot que possible!

Tu viens de Quebec? Je ne suis pas loin de toi. Je suis un peu sud, dans le paysage nord de Vermont.

Merci encore, Xeal!

Avatar
Xeal

Community Member, 37 Posts

1 May 2009 at 3:06am

Edited: 01/05/2009 3:23am

Ah Bon! Je ne savais que tu etait francais toi aussi :D Bah en faite que tu parle le Francais. Je sais pas il pourrais avoir peut-etre des petite erreur. J'ai fais mon mieux pour me reviser mais parfois ca m'arrive de faire des erreur d'inattention.

Oui je vien de Quebec =) Ah ben! T'es pas trop loin de moi. Le monde est petit en ;)

De rien je vais surement traduire les autre module aussi donc quand c'est fais je vas te les donner!

Avatar
martimiz

Forum Moderator, 1391 Posts

1 May 2009 at 6:52am

@Mad_Clog
Nice work, your dutch translation, made life a lot easier for me :-) As far as I can see 'to' in the translation is used only(?) in the 'Add images to somegallery' button. So I guess it could be translated 'aan' as in 'Afbeeldingen toevoegen aan'. Kleinigheidje: 'berkijk' en 'Maxinmaal' :-)

Avatar
keeny

Community Member, 48 Posts

3 May 2009 at 9:05pm

Hiya Uncle,

Thanks a lot for your dataobject_manager module. I'm using it in a couple of projects and it really adds a lot of user friendly goodness for the clients. :-D

I'm having trouble with image gallery though. I can upload files to an album directly from my computer, no problem. BUT if I try to import existing files from 'File & Images' I get the following:

[Notice] Undefined index: controllerFieldName
POST /blackcandy/admin/EditForm/field/GalleryItems/ImportForm?ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=DESC&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_1&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100

Line 84 in /Library/WebServer/Documents/blackcandy/image_gallery/code/ImageGalleryManager.php

I added Debug::show($data); to the top of function saveImportForm($data, $form) in ImageGalleryManager.php. This is what I get:

    * url =

      /blackcandy/admin/EditForm/field/GalleryItems/ImportForm

    * ctf =
          o GalleryItems =
                + per_page =

                  10

                + showall =

                  0

                + sort =

                  SortOrder

                + sort_dir =

                  DESC

                + search =

                + filter =

                  AlbumID_1

                + view =

                  grid

                + imagesize =

                  100

    * dataObjectClassName =

      ImageGalleryItem

    * fileFieldName =

      Image

    * parentIDName =

      ImageGalleryPageID

    * controllerID =

      5

    * AlbumID =

      1

    * folder_id =

      1

    * imported_files =
          o 0 =

            2

    * SecurityID =

      1455651264

    * action_saveImportForm =

      Import

I'm using out of the box SS2.3.1 and up to date svn versions of dataobject_manager(r137) and image_gallery(r137). Any help much appreciated!

Thanks,

Barry.

Avatar
jhirm

Community Member, 21 Posts

4 May 2009 at 2:10am

Howdy UncleCheese. I can't thank you enough for all the work you've done - it has made my life infinitely easier!

I added a simple image search feature to your Image Gallery for a client, and it works well - it uses an additional Tags field on the ImageGalleryItem object to pull matching images from all albums, displaying them in a new album generated on the fly. Now I'd like to create a module for this feature that can be added easily to any Image Gallery, so I started separating my additions into DataObjectDecorators. Unfortunately, I can't get my extensions to work without removing the SortableDataObject extension (or adding my extension at the top of the ImageGallery_config.php file so that it loads first)... any idea how I could get around this? I'd really like to make this module usable without needing to modify your code directly...

Thanks!

Avatar
Mad_Clog

Community Member, 78 Posts

4 May 2009 at 8:52pm

@martimiz
I'll correct the spelling mistakes later on when I get the chance, thanks for heads up.

@UncleCheese
I noticed you named the file nlNL4.php (or something alike, I don't access to my files at the moment) on the SVN, is there any particular reason you did this? Oh and expect an update some time soon ;)

Speaking of which, what is the best way to submit patches on 3rd party modules like this one?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

5 May 2009 at 4:34am

Hey, everyone. Just got back from a weekend in NYC. Lots of catching up to do in the forums. I've got some responses for you.

@Mad_Clog - Not sure why the file got named nlNL4. I think it came in that way. I've changed it to nlNL.php in the newest version.

@jhirm - Decorators are pretty tricky, and it seems every time I try to implement them I hit some sort of roadblock. Is there a specific reason you want to use a decorator instead of just subclassing the ImageGalleryItem object?

@keeny - Fixed in the latest version. Thanks for flushing that out.

Avatar
jhirm

Community Member, 21 Posts

5 May 2009 at 11:20pm

Yeah, the decorators have been giving me grief. I didn't think it would work to extend the ImageGalleryItem directly since the ImageGalleryPage class includes the ImageGalleryItem in its has_many array, which would mean editing the ImageGalleryPage class, defeating the purpose of separating my additions into a separate module. However, after thinking about it a bit, your suggestion may actually work, since I CAN decorate the ImageGalleryPage successfully... I'll try it this afternoon.

On an entirely unrelated note, I'm also working on a module that organizes various SilverStripe features into a package for user-management. In working on this, I noticed that the die() statement used to render a single album gallery breaks the built-in SS security model. For example, if you create a Page with Access set to a specific user-group, then make a Image Gallery Page as a child of the secured page, it is still possible to access the gallery via its URL if there is only one album because the die() statement stops further PHP execution. My quick fix was to change the die() to a redirect like this:

if($this->SingleAlbumView()) {
//FIX: changed die() to redirect to only album in order to solve security issue...
$gallery_ID = $this->data()->getField("ID");
$gallery_URLSegment = $this->data()->getField("URLSegment");
$album = ImageGalleryAlbum::get_one("ImageGalleryAlbum", "ImageGalleryPageID = ".$gallery_ID);
$album_URL = $gallery_URLSegment.'/album/'.$album->Folder()->Name;
Director::redirect($album_URL);
//die($this->renderWith(array('ImageGalleryPage_album','Page')));
}

The URL isn't as pretty, but it fixes the security issue... any thoughts on a better way to do this?

Go to Top