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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

What is this SS showcase ... ?


Reply

6 Posts   1139 Views

Avatar
Rawbit

6 January 2009 at 6:14am Community Member, 52 Posts

It looks like the lightbox effect used here:
http://www.silverstripe.org/community-showcase/ (click on one of the large thumbnails)

is the same as one of the show case projects here:
http://www.inventionate.de/dieneuewelt/ (click on the thumbnail graphic)

Is this a proprietary extension or module? Can I access or download it from somewhere?

Avatar
Hamish

6 January 2009 at 9:50am Community Member, 712 Posts

It's a jQuery plugin, freely available, called 'Fancybox':

[url]http://fancy.klade.lv/[/url]

Avatar
Rawbit

7 January 2009 at 2:54am (Last edited: 8 January 2009 3:39am), Community Member, 52 Posts

How might someone integrate this into SS? Would I need to develop my own module for this? I'm guessing the sites I mentioned using it aren't hackishly done (or maybe they are).
------

[Edit]

I'm thinking about making a GalleryPage.php with HasManyComplexTableField that allows for images and then in the GalleryPage.ss <control> the rel and title tags... sound practical?

[Edit]

This method worked perfectly.

Avatar
nodrugads

2 February 2009 at 3:35pm Community Member, 2 Posts

Hi.

I am new to SilverStripe and would love to learn more about how you accomplished the FancyBox integration. Are you pulling images in dynamically or manually placing them in the content areas?

I built a portfolio section based on the news and staff pages in the tutorial. I have the three latest projects showing up on the homepage. I would like to add lightbox effect to the images on the portfolio page and keep it data driven. I am using:

$Screengrab.SetWidth(300)

to place the images on the page. All the examples I see seen to have the content placed on the page manually. (http://www.silverstripe.org/community-showcase/) To me this defeats the purpose of the CMS to a degree as I wont easily be able to use that content in other ways on the site. Can anyone tell me how to grab that image and use the rel tag or whatever to access the javascript? I tried variations on this:

<a href="$Screengrab.SetWidth(800)" rel="lightbox[images]" title="" ><img src="$Screengrab.SetWidth(245)"></a>

I get a XML Parsing Error: not well-formed. I have tried highslide, lightbox, etc all with similar results. I am pretty clueless but trying to learn.

Thanks in advance.

Avatar
Sean

2 February 2009 at 3:43pm (Last edited: 2 February 2009 3:44pm), Forum Moderator, 921 Posts

Hi nodrugads,

What version of SS are you using?

AFAIK, I think what you're doing isn't currently supported in 2.2.2 or 2.2.3.

Instead of $Screengrab.SetWidth(300) you could try doing:

<% control Screengrab %>$SetWidth(300)<% end_control %>

I believe that 2.3.0 will support that template syntax that you're attempting to use. But for now, the above workaround should be fine.

Cheers,
Sean

Avatar
nodrugads

2 February 2009 at 4:35pm Community Member, 2 Posts

Thanks so much for the reply! I have 2.2.3. Did you mean to swap out this code for the $Screengrab stuff I was using in the .ss file? I tried that and got the same XML Parsing Error. Not sure if that was what you wanted me to try or not. I am sure if I new PHP and java at all I could figure this out. Thanks for any help you can offer.