Integrating the gallery into my webpage

joesnow

Joined: 2012-05-09
Posts: 3
Posted: Wed, 2012-05-09 13:20

How do I add the albums I've created in Gallery into my webpage??

I have it installed, uploaded some photo's, created albums and it all works fine. What I was hoping to do was have my own webpage that is in the same style as the rest of my website that had the albums on that I created in Gallery.

Apologies for such a beginner question but the documentation and support section of this website appears to be down.

Many Thanks
Joe

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Wed, 2012-05-09 15:45

Gallery3 does not have an external embed API yet.
You'd have to edit your theme to match your site.

There are tools to display your items in your external web pages:
http://www.flashyourweb.com/article.php?story=MiniSlideShowReadyforG3
http://gallery.menalto.com/node/106425

-s

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 26107
Posted: Wed, 2012-05-09 21:56
Quote:
How do I add the albums I've created in Gallery into my webpage??

So you want to add gallery images to an external page?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
joesnow

Joined: 2012-05-09
Posts: 3
Posted: Wed, 2012-05-09 22:04
floridave wrote:
Quote:
How do I add the albums I've created in Gallery into my webpage??

So you want to add gallery images to an external page?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Yeah. I really like the way the Gallery works. Being able to upload images and create albums via the webpage makes it easy to manage and it looks good, but I want to have the albums appear on my own web pages.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 26107
Posted: Wed, 2012-05-09 22:25

Well items and albums are a bit different. Items can be added with a module:
http://codex.gallery2.org/Gallery3:Modules:embedlinks
albums would have to be done like suprsidr said,

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Wed, 2012-05-09 22:37

I think w/ the techniques I use in my G3 examples (jQuery, G3 XML feeds) and any lightbox, it should be easy enough to create an ajax representation of your G3 albums in any page.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Thu, 2012-05-10 04:31

Done - Super easy G3 Ajax Gallery http://www.flashyourweb.com/gallery2/embed_samples/g3_ajaxGallery.php

If anybody is interested I'll put together a code sample.(or you can look at the source)

-s

 
joesnow

Joined: 2012-05-09
Posts: 3
Posted: Thu, 2012-05-10 08:46
suprsidr wrote:
Done - Super easy G3 Ajax Gallery http://www.flashyourweb.com/gallery2/embed_samples/g3_ajaxGallery.php

If anybody is interested I'll put together a code sample.(or you can look at the source)

-s

It's close to I' would like to do and if you code provide a code sample that would be great.

Ideally I would like the album showing as a single icon that then opens up the gallery of images. Do you think that is possible??

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Fri, 2012-05-11 05:01
 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-05-27 21:00

I see this brings the photos in the gallery onto your personal webpage... Can this be done with the albums too? We would like the gallery to display in our site so it matches the rest of the site. We would like it to look similar to the attachment screen shot...

Can this be done? did i miss something you already mentioned above?

thanks

dave

AttachmentSize
gallery7.jpg108.89 KB
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-05-27 21:40
 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-05-27 23:25

I saw this but this says gallery2... I am using gallery 3... will this work in gallery3?

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Mon, 2012-05-28 02:25

It says G3.
But I need to package up a sample.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 17:27

I do not think this is what I was looking for. If it is then I guess I am just confused. I dont see how that example shows me how to actually do this... Are you able to help?

dave

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-06-17 15:24

My RESTful example is simply a HTML page I created and am displaying my G3 items within it via javascript/ajax.
This could be done in any page.

I have even released the code.

with a link to your site, I could whip up an example very quickly.

-s

 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 17:34

sorry I am just not as computer savvy as some of you are. I have found the code and downloaded the ZIP... I am unsure where to upload to in my site... I have updated the webpage as instructed in the .js file... and added the code to the HTML file in the header and the body of the page.

I have attached those two files here...

I am still unsure WHERE to upload the entire REST folder to....

http://www.mcrmysoldiers.com/my-chemical-romance/mrcmy-photos.html

thanks

dave

AttachmentSize
g3.rest_.js_.txt16.49 KB
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-06-17 18:16

http://www.flashyourweb.com/gallery2/embed_samples/mrcmy-photos.html#item/114

You can copy the html of the above to yours
then upload the entire code directory from my zip to http://www.mcrmysoldiers.com/my-chemical-romance/code including your edited g3.rest.js

-s

 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 19:07

still a bit of trouble but i thin I have the info you want. the page you showed me looks GREAT!!!!!

the page I took directly from you and uploaded it as the code was perfect but nothing showed up when i went to view it on line.... the URL's are different in the .js file and where the file actually is.....

The .js file code is below that I customized with my URL. the URL was the ONLY think I changed

(function(window, $, PhotoSwipe){
var max,
pager = {
page: 0,
html: ''
},
rest = {
url: 'http://www.mcrmysoldiers.com/my-chemical-romance/gallery/gallery3/rest',
initial: 1,
max_items_per_page: 20,
key: ''
};

$(window).hashchange( function(){
if(location.hash.indexOf('page') > -1){
var parts = location.hash.replace('#', '/').split('/page/');
getItems(rest.url + parts[0], {output: 'jsonp', scope: 'direct', page: parseInt(parts[1]) - 1});
} else if (location.hash != '') {
getItems(rest.url + location.hash.replace('#', '/'), {output: 'jsonp', scope: 'direct', page: 0});
} else {
getItems(rest.url + '/item/' + rest.initial, {output: 'jsonp', scope: 'direct', page: 0});
}
})

the page is actually located here..... I thought this was where you wanted the page to be...... in the "code" Directory
http://www.mcrmysoldiers.com/my-chemical-romance/code/mrcmy-photos.html

Is the the problem....?

Thanks for your help.. it means a lot to me and my daughter

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-06-17 19:20
 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 19:30

thank you... still having a bit of an issue. I have included a screen shot of the upload to the "code" DIR. I am assuming it is all good.

When I visit the page http://www.mcrmysoldiers.com/my-chemical-romance/mrcmy-photos.html the images do not show up..... sorry to be such a pain.....

dave

AttachmentSize
MCR-FTP.gif73.58 KB
 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 19:32

oohh.. just FYI i am using FF 13.0.1

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-06-17 19:36
 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 19:50

thanks... No none of that was done....

I just did it...
and I am now using the REST module

rest allow_guest_access 1

but this page is still not showing the different galleries
http://www.mcrmysoldiers.com/my-chemical-romance/mrcmy-photos.html

see attached screen shot.. it shows the module it attached and set up to "1"

AttachmentSize
MCR-module-settings.gif77.73 KB
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-06-17 19:58

change:

rest = {
    url: 'http://www.mcrmysoldiers.com/my-chemical-romance/gallery/gallery3/rest',
    initial: 1,
    max_items_per_page: 20,
    key: ''
};

to

rest = {
    url: 'http://www.mcrmysoldiers.com/my-chemical-romance/gallery/gallery3/index.php/rest',
    initial: 1,
    max_items_per_page: 20,
    key: ''
};

seems your REST is not utilizing rewrite

-s

 
dave111111

Joined: 2012-05-17
Posts: 62
Posted: Sun, 2012-06-17 20:20

Ok made the change to :
rest = {
url: 'http://www.mcrmysoldiers.com/my-chemical-romance/gallery/gallery3/index.php/rest',
initial: 1,
max_items_per_page: 20,
key: ''
};

What is the rewrite for and how can i fix it?

thanks

dave

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Sun, 2012-06-17 20:27
Quote:
Ok made the change to

did you forget to upload it to http://www.mcrmysoldiers.com/my-chemical-romance/code/g3.rest.js

cuz the change is not in there.

-s

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Mon, 2012-06-18 02:52

I see you got it working.
But the very long title of your root album screws up the breadcrumbs.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7939
Posted: Thu, 2012-06-28 00:10

FYI, my RESTful embedding script is now a jQuery plugin.

-s