Forum Index > FlashYourWeb OS Support > Gallery New Topic Post Reply
 Gallery 3 and galleria
 |  Printable Version
grantiago
 March 04 2013 12:42 PM (Read 1201 times)  
Forum Newbie
Newbie

Status: offline

Registered: 03/02/13
Posts: 6

Hi. I'm trying to pull some images from a g3 install with some code I picked up off your gallery 3 landing example and display it in galleria on a second site. it works fine locally on the g3 install. but just displays the galleria container on the new site.

I have galleria set up on both ends as well as a crossdomain.xml allowing all from the other site.

this is the (your modded) code:

PHP Formatted Code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
        <script src="/media/galleria/galleria-1.2.9.min.js"></script>
 
       <title>Galleria remote pull</title>
  <style>
  #galleria{
        width: 640px;
        height: 400px;
        padding:10px;
        border: 1px solid #ccc;
        -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.25), inset 0 0 3px #fff;
        -moz-box-shadow:    0 1px 2px rgba(0,0,0,0.25), inset 0 0 3px #fff;
        box-shadow:         0 1px 2px rgba(0,0,0,0.25), inset 0 0 3px #fff;
    }
  </style>

  </head>
  <body>   

    <div id="galleria">
    </div>
<script>
    $(document).ready(function(){
       
        $.get('http://grantamaral.com/test/rss/feed/gallery/latest', {}, 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('/media/galleria/themes/classic/galleria.classic.min.js');
            $('#galleria').galleria({
                data_source: images,
                width: 640,
                height: 400,
                autoplay: 5000,
                transition: 'fadeslide',
                transitionSpeed: 1000                             
            });
        });
    });
</script>

The only changes here from the local are the addition of the "http://grantamaral.com/" and the location of the galleria js.

I can pull picasa and flickr with the provided galleria plugins, but prefer the flexibility of G3. A gallery3 galleria plugin sounds like your kind of challenge?! Razz They haven't risen to it. Confused


 
Profile Email
Quote
Content generated in: 0.08 seconds
New Topic Post Reply



 All times are PDT. The time is now 08:31 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content