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.

All other Modules /

Discuss all other Modules here.

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

cwsoft-foldergallery - image gallery for SilverStripe 3


Reply


86 Posts   12173 Views

Avatar
Lexandclo

Community Member, 34 Posts

19 April 2013 at 6:08am

iHI to get the previous and next buttons in the colorbox

add this -

rel: 'gal',

just after -

escKey: true,

to the cwsFolderGallery.js, in the javascript folder in the main folder gallery folder.

hope this helps

Avatar
oldwrinkly

Community Member, 34 Posts

19 April 2013 at 8:04am

Thanks Dave and Dazman1
I have incorporated both your suggestions to no avail,

The gallery works fine , just no slideshow or prev / next buttons.
I still feel there is a conflict between the various jquery `s
as my jquery banner in the header does not work in the gallery pages either, but I do not know enough about javascript to sort it

Regards
Mike

Avatar
davepolyester

Community Member, 47 Posts

19 April 2013 at 9:02am

Sorry, I just remembered I removed the variable from the path and replaced it with 'mysite', and copied the script.js file to my javascript folder in mysite. It should read:

<script type="text/javascript" src="/mysite/javascript/script.js"></script>


Not sure if that will help you or not Mike.

Avatar
cwsoft

Community Member, 57 Posts

20 April 2013 at 5:29am

Edited: 20/04/2013 5:30am

Hi guys,

@oldwrinkly:
>no slideshow buttons, no previous / next buttons on full size image( is there meant to be? if not there should be)

Just tested with SilverStripe 3.1-beta3, default simple theme and cwsoft-foldergallery v2.7.1. Everything works as intended. Just for clarification: The "prev/next" buttons are only shown in the jQuery ColorBox preview. If a user hits the "full-scale" button (arrow up icon) in the Colorbox preview (at the bottom right), a full-scale image is shown in a new window without any navigation. The idea behind the "full-scale mode" was to offer an option to download an image in full-scale (right mouse click), not to offer another navigation layer.

>The gallery works fine , just no slideshow or prev / next buttons.

The "full-scale" button and the "start slideshow" link are dynamically enabled via jQuery code in "javascript/cwsoft-foldergallery.js" to be unobtrusive in case Javascript is disabled or there is an issue with other jQuery code. Can you check the generated HTML source code for possible other inclusions of jQuery (head, body) from other modules?

@dazman1:
>to get the previous and next buttons in the colorbox add this - rel: 'gal', just after -escKey: true,

To my understanding, this shouldn't be required, as all images shown on a gallery page have a rel="album" attribute in the image tag and the $("a[rel='album']").colorbox ... jQuery call should capture the group, while the flag "arrowKey = true" should force the buttons to show up. At least it works for me with Firefox 20.0.1 and IE 10.

In case you have a link (URL) to a live site for testing, would be great if you could post it here so I can have a look what might go on.

Cheers cwsoft

Avatar
cwsoft

Community Member, 57 Posts

20 April 2013 at 8:00am

Edited: 20/04/2013 8:02am

Hi,

I just updated the third party code jQuery and Colorbox distributed with cwsoft-foldergallery to the latest available version to ensure that the Javascript issues reported lately are not caused by jQuery/Colorbox/browser incompatibilities already fixed in later versions.

The updated package can be downloaded from my [url=https://github.com/cwsoft/silverstripe-cwsoft-foldergallery/archive/master.zip]GitHub account[/url]. Would be great, if you could test and report back if the new version works better in case you experienced issues with last stable 2.7.1 version. In case this fixes the issues, I will release an update cwsoft-foldergallery version.

Cheers cwsoft

Avatar
oldwrinkly

Community Member, 34 Posts

20 April 2013 at 8:31am

Thanks for the replies Dave and Cwsoft
I am away for the weekend, but I will try the updates and upload it all next week and will report back

Regards
mike

Avatar
oldwrinkly

Community Member, 34 Posts

24 April 2013 at 5:17am

Edited: 24/04/2013 5:18am

Hi
I have got the gallery, including the slideshow and my header working,

I installed your updates ( database rebuild error...`db must be public`in foldergallery page, I deleted `private` in lines 17 - 22
the database then rebuilt ok)
linked the simple theme script.js at the bottom of page.ss to mysite/ javascript/etc..
and put ......<script type="text/javascript">
jQuery.noConflict();
</script>
under my javascript lines in the header of page.ss

which bit has done the trick, I know not, but everything works just fine

The only problem to solve is that the foldergallery thumbnails on the default settings overlap the white background and each other
I have tried adding extra margins and padding to the foldergallery.photo and .img but so far, the layout breaks

Thanks cwsoft and Dave for your help

Regards
Mike

Avatar
cwsoft

Community Member, 57 Posts

24 April 2013 at 5:50am

@oldwrinkly: thanks for your feedback

>I installed your updates ( database rebuild error...`db must be public`in foldergallery page, I deleted `private`
Damn, forgot that changing db public to db private as required for SilverStripe 3.1 breaks SS 3.0.x installations.
Seems I have to maintain two branches for my module now, one for SS 3.0.x and one for upcoming 3.1.x branch - grrr.

>which bit has done the trick, I know not, but everything works just fine
Could you try to remove your two custom Javascript/jQuery modifications in your template and check if the module would work with just changing private $db to public $db? Would be great to know if upgrading jQuery and Colorbox of the cwsoft-foldergallery module did the trick for you or not.

>The only problem to solve is that the foldergallery thumbnails on the default settings overlap the white background and each other
Have you adapted "cwsoft-foldergallery/templates/Layout/cwsFolderGalleryPage.ss" to macht your template as described [url=https://github.com/cwsoft/silverstripe-cwsoft-foldergallery#adapt-foldergallery-layout-to-match-your-theme-layout]here[/url]? If yes, what browser and template are you using? Can you share a link (URL) to a live site so I can have a look on whats going on?

Cheers cwsoft