7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Can I use the lightboxes in ImageGalleryModule on other pages within my site?
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1032 Views |
-
Can I use the lightboxes in ImageGalleryModule on other pages within my site?

1 November 2009 at 7:34am
I want to pop a youtube link into one of the cool lightboxes used by the ImageGalleryModule. From Another page on my site. My home page in fact
I have link to the prettyphoto.js file in image_gallery/javascript/prettyphoto/prettyphoto.js
and have used the code form prettyphoto web site to try and implemet lightbox
http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/
but i think there is some kind of jquery problem
i drop the below into the page just before closing </body> tag as instructed and have also tried to change $ - $jQuery.
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>Does anyone know why this would not work I am definately linking to the prettyphoto.js file as put in an alert to test
-
Re: Can I use the lightboxes in ImageGalleryModule on other pages within my site?

4 November 2009 at 5:26am
I have nearly got this working.
I have included this in my HomePage.php
public function init()
{parent::init();
self::prototype2jquery();
self::includeForPrettyPhoto();
}
private static function prototype2jquery() {
Requirements::block('jsparty/prototype.js');
Requirements::javascript('jsparty/jquery/jquery.js');
Requirements::javascript('jsparty/jquery/jquery.cycle.js');
}
private static function includeForPrettyPhoto()
{
Requirements::javascript('image_gallery/javascript/prettyphoto/jquery.prettyPhoto.js');
Requirements::javascript('image_gallery/javascript/prettyphoto/prettyphoto_init.js');Requirements::css('image_gallery/css/prettyphoto/prettyPhoto.css');
}and this link in my HomePage.ss
<a href="http://www.youtube.com/watch?v=qqXi8WmQ_WM" id="http://www.youtube.com/watch?v=qqXi8WmQ_WM" rel="prettyPhoto" >Video Title</a>
the prettyphoto box opens with the loading icon but nothing loads in??
any idea why. I am so close.
-
Re: Can I use the lightboxes in ImageGalleryModule on other pages within my site?

4 November 2009 at 5:58am
Are you sure that PrettyPhoto supports video? I think you probably want to direct your questions to the PrettyPhoto documentation, since this isn't really related to Silverstripe.
-
Re: Can I use the lightboxes in ImageGalleryModule on other pages within my site?

4 November 2009 at 6:13am
I have managed to get this working.
my problem was that in trying to use the image gallery version this does not support youtube links. basically had to get new version of prettyphoto and use files from this instead.
so i blocked this one and loaded my own. now works fine!
public function init()
{parent::init();
self::prototype2jquery();
self::includeForPrettyPhoto();
}
private static function prototype2jquery() {
Requirements::block('jsparty/prototype.js');
Requirements::javascript('jsparty/jquery/jquery.js');}
private static function includeForPrettyPhoto()
{
Requirements::block('image_gallery/javascript/prettyphoto/jquery.prettyPhoto.js');
Requirements::javascript('jsparty/jquery/jquery.prettyPhoto.js');
Requirements::javascript('image_gallery/javascript/prettyphoto/prettyphoto_init.js');Requirements::css('themes/tutorial/css/prettyPhoto.css');
} -
Re: Can I use the lightboxes in ImageGalleryModule on other pages within my site?

4 November 2009 at 6:16am
sorry to go on about non silverstripe stuff. But it is the case that the new version of pretty photo supports youtube links, as well as flash and .mov etc and is pretty easy to integrate into silverstripe....
-
Re: Can I use the lightboxes in ImageGalleryModule on other pages within my site?

4 November 2009 at 6:25am Last edited: 4 November 2009 6:26am
Looks like you're using a really old version of ImageGallery. All that includeForXXX() stuff is pretty old school. Glad it's working, though!
-
Re: Can I use the lightboxes in ImageGalleryModule on other pages within my site?

4 November 2009 at 7:00am
oh! ok. I downloaded the imagegallery module only one week ago from the silverstripe site?
Has it changed a lot? what are the benefits in the new version dude?
| 1032 Views | ||
|
Page:
1
|
Go to Top |

