Create an iframe to embed an album in another website

barge715

Joined: 2012-10-23
Posts: 15
Posted: Tue, 2013-06-11 17:38

Hi all,

I'd like to know if it is possible to create an iframe in order to embed an album in another website.

It is possible to embed the album without the header and the footer?

Thanks for the answers!

Marc

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2013-06-11 18:28

I wrote a RESTful script http://galleryproject.org/node/106581
its also been made into a WordPress plugin

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
barge715

Joined: 2012-10-23
Posts: 15
Posted: Wed, 2013-06-12 03:42

Ok thanks for that.

But the point is I'd like visitors to remain on the same page when they click on a picture, not be directed to the album page.

I am using a html website.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-06-12 12:57

you can embed my script in any webpage.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
barge715

Joined: 2012-10-23
Posts: 15
Posted: Wed, 2013-06-12 14:00

Hi,

Forgive my poor level in coding, but I seriously need some advices here ;-)

Here is an exemple of an album I'd like to embed : http://www.dday-overlord.com/galeries/index.php/ranville_commemorations_normandie_2013

I implemented the Galleria code ( http://galleria.io/docs/getting_started/beginners_guide/#complete-code ) to one of the page of my website and then ? What shall I do?

I am very interested in the Super easy G3 external slideshow, that's how I'd like to embed my albums.

Thanks for your help

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-06-12 14:09
 
barge715

Joined: 2012-10-23
Posts: 15
Posted: Wed, 2013-06-12 14:28

Ok so I just have to copy the code and that's it? I don't need to copy the Galleria code?

How do I change your album for my album?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2013-06-12 14:45
<div id="galleria"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="js/galleria-1.2.6.min.js"></script>
<script>
    $(document).ready(function(){
        $.get('/gallery3/rss/feed/gallery/album/114', {}, function(data){
            var images = [];
            $(data).find('item').each(function(){
                images.push({
                    image: $(this).children('media\\:group').children('media\\:content').first().attr('url'),
                    thumb: $(this).children('media\\:thumbnail').attr('url'),
                    big: $(this).children('media\\:group').children('media\\:content').last().attr('url'),
                    title: $(this).children('title').text(),
                    description: $(this).children('description').text(),
                    link: $(this).children('link').text()
                });
            });
            Galleria.loadTheme('themes/twelve/galleria.twelve.min.js');
            $('#galleria').galleria({
                data_source: images
            });
        });
    });
</script>
  • line 3 js/galleria-1.2.6.min.js you have to provide the url to your js/galleria-1.2.6.min.js on your server your version # may be different
  • line 6 /gallery3/rss/feed/gallery/album/114 provide the url to the album RSS feed you want to use
  • line 18 themes/twelve/galleria.twelve.min.js provide the url to your galleria theme.js

**HINT**
use relative urls from your site's root. So if you put galleria in yoursite.com/js/galleria-1.2.6.min.js then you would use /js/galleria-1.2.6.min.js
and your theme: yoursite.com/themes/twelve/galleria.twelve.min.js would be /themes/twelve/galleria.twelve.min.js
and keep it up with the RSS feed for your album: /gallery3/rss/feed/gallery/album/114

-s
________________________________
All New jQuery Minislideshow for G2/G3