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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Galleria integration with ImageGallery


Reply


28 Posts   8284 Views

Avatar
Rockshox

Community Member, 14 Posts

17 December 2009 at 11:56am

Hey Uncle Cheese. Just wondering if you have had a chance to look into this any further? Regards

Avatar
UncleCheese

Forum Moderator, 4096 Posts

17 December 2009 at 2:26pm

Yeah, I have it working, but I the CSS is all messed up. I don't really get how that plugin works. I can post the files up here if you want to take a crack at the CSS.

Avatar
Rockshox

Community Member, 14 Posts

18 December 2009 at 2:55am

Edited: 18/12/2009 2:56am

Good work! Yeah, definitely more that happy to help with getting the CSS sorted. Just post up a link to the files.

As you saw on [url=http://www.silverstripe.org/dataobjectmanager-module-forum/show/275112?start=0#post275577#post275577]this[/url] forum post I am trying to "include" a Gallery (Galleria) on individual pages on a property listing website I am working on. I am trying to combine the code from the above link with the code below (PropertPage.php), so far I have had little success.

<?php

class PropertyPage extends Page {
static $db = array(
);
static $has_one = array(
'Photo1' => 'Image',
'Photo2' => 'Image'
);
   
function getCMSFields() {
$fields = parent::getCMSFields();
   
$fields->addFieldToTab("Root.Content.Images", new
ImageField('Photo1'));
   
$fields->addFieldToTab("Root.Content.Images", new
ImageField('Photo2'));
   
return $fields;
}
}

class PropertyPage_Controller extends Page_Controller {
   
}
?>

The website is almost complete except for the individual Galleries. Here is a link to my test site so you can see what I mean: [url=http://benwellby.com/properties/]benwellby.com/properties[/url]. Click on a property to see where the Gallery should be.

This shouldn't be too hard to accomplish, but so far I keep stumbling on this particular feature, that said building the website with SS has been a real pleasure (even though my programming knowledge is at best not great).

As usual, any help is greatly appreciated!
Cheers

Avatar
UncleCheese

Forum Moderator, 4096 Posts

18 December 2009 at 8:25am

I'm not sure what you're trying to do. I don't see any reference to an ImageGalleryPage in your code, or anything resembling the example in that post.

The galleria zip file is here:

http://dataobjectmanager.carlinowebdesign.com/assets/galleria.zip

Just drop the "galleria" folder in your image_gallery/gallery_ui folder.

Avatar
Rishi

Community Member, 97 Posts

24 January 2010 at 11:20am

UncleCheese you are simple great.....
galleria works like charm....

Avatar
UncleCheese

Forum Moderator, 4096 Posts

24 January 2010 at 2:20pm

It does? For me the styling was messed up. If you made any changes to the CSS, please post them so I can roll that into the trunk.

Avatar
Rishi

Community Member, 97 Posts

27 June 2010 at 10:16pm

Hello Uncle Cheese
i am sorry for late reply but i ahve not made any changes.i have followed your instruction and it worked

Avatar
mathiasmex

Community Member, 28 Posts

25 September 2010 at 3:04am

Edited: 25/09/2010 3:05am

Uncle Cheese,

just integrated the Galleria into "image_gallery/gallery_ui" with success.

Hade to make some modifications:

In "code/Galleria.php" i changed

Requirements::javascript('jsparty/jquery/jquery.js');

to

Requirements::javascript('sapphire/thirdparty/jquery/jquery.js');

(runninge Silverstripe 2.4.1).

In "css/galleria.css" following code messed my side up:

*{margin:0;padding:0}
body{padding:20px;background:white;background:white;color:#555;font:80%/140% 'helvetica neue',sans-serif;width:870px;margin: 0 auto;}

Taking this out, all looks fine.

Maybe this is of interest to someone who wants to use galleria in ImageGallery.

Regads,

Mathias