17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 6679 Views |
-
Gallery - lightwindow porblems

18 October 2007 at 12:33am Last edited: 18 October 2007 12:45am
Hi,
I have a problem with my gallery, when I open my gallery page everything looks OK, thumbnails, pagination ..., but when i click on the thumbnail image nothing happened, my firebug plugin tell me about an error:
link has no properties
http://localhost:3000/gallery/javascript/lightwindow.js
Line 557What can I do?
Regards,
MarkoP.S. sorry about my english
-
Re: Gallery - lightwindow porblems

19 October 2007 at 8:30am Last edited: 19 October 2007 8:31am
I solve the problem!
Lightwindow doesn't work on local computer because of, when I remove it everything works great.$SilverStripeNavigator
Thx!
-
Re: Gallery - lightwindow porblems

10 December 2007 at 5:14am
Currently having the exact same problem, but removing the navigation bar doesn't work for me.
I'm pretty keen on fixing this , because this module looks awesome !
Anyone has an idea ?
-
Re: Gallery - lightwindow porblems

10 December 2007 at 5:19am
Ah.. Figured it out..
Behaviour.js is also conflicting with gallery.
So , in short :
- Turn off the SS navigator
- Do not include behaviour.js -
Re: Gallery - lightwindow porblems

30 August 2008 at 10:42am Last edited: 30 August 2008 10:51am
Aah, thanks a lot for posting your solutions! I've been struggling with the gallery almost all day long...
After reading your posts, I did something like this:
Page.php:
function ThisIsNotAGalleryPage() {
return !( $this instanceof GalleryPage );
}Page.ss:
<% if ThisIsNotAGalleryPage %>
$SilverStripeNavigator
<% end_if %>Just a stupid band-aid, of course, but seems to work so far...
I'd like to say that those conflicts REALLY AREN'T funny! As soon as you add a feature that needs some javascript, some different versions of a library may be included at the same time. How shall I ever implement a gallery that supports comments, for example?
-
Re: Gallery - lightwindow porblems

30 August 2008 at 11:03am
Comments should work without JS. They will just default back to standard PHP processing rather then the fancy AJAX commenting system. Forms also will just use Server side validation rather then client side and serverside if you disable the behavior.
This will be fixed for good once the JS rewrite of the system is complete / we start to see it merged back to trunk, Hopefully it will tidy up things like the gallery etc by using a more up to date library / better JS support and control
-
Re: Gallery - lightwindow porblems

30 August 2008 at 11:34am
OK, comments and forms work without JS. In fact, even the gallery does, opening every image in its own browser window. The problem is that the gallery will not work as soon as two versions of prototype.js are included, with one being not compatible with lightwindow (e.g. because the version from jsparty doesn't support Prototype.BrowserFeatures).
At this moment, I guess I cannot "choose" to grant AJAX capabilities to the gallery, but use traditional processing for forms and comments, right? I would have to hack silverstripe so that it doesn't include any JS for comments and forms on gallery pages, in order to keep the Javascript "clean" and the gallery working. Is there a simple way to do this?
I'm looking forward to the JS rewrite.
-
Re: Gallery - lightwindow porblems

30 August 2008 at 11:43am
This is what I did to get it to work on a recent client site
gallery/code/GalleryPage.php
function init() {
// Javascript Requirements - Block the standard JS. Include Gallery JS.
Requirements::block("jsparty/scriptaculous.js");
Requirements::block("jsparty/prototype.js");
Requirements::block("jsparty/prototype_improvements.js");
Requirements::block("jsparty/loader.js");
Requirements::block("jsparty/behaviour.js");
Requirements::javascript( "gallery/javascript/prototype.js" );
Requirements::javascript( "gallery/javascript/effects.js" );
Requirements::javascript( "gallery/javascript/lightwindow.js" );
parent::init();
}
| 6679 Views | ||
| Go to Top | Next > |




