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
Posts: 7939
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
Posts: 26107
So you want to add gallery images to an external page?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 3
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.
Posts: 26107
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
Posts: 7939
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
Posts: 7939
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
Posts: 3
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??
Posts: 7939
added code samples http://www.flashyourweb.com/gallery2/embed_samples/g3_ajaxGallery.php
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 62
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
Posts: 7939
I have a RESTful example here.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 62
I saw this but this says gallery2... I am using gallery 3... will this work in gallery3?
Thanks
Posts: 7939
It says G3.
But I need to package up a sample.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 62
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
Posts: 7939
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
Posts: 62
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
Posts: 7939
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
Posts: 62
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
Posts: 7939
put the page here http://www.mcrmysoldiers.com/my-chemical-romance/mrcmy-photos.html
and all the js and css files from my zip/code in http://www.mcrmysoldiers.com/my-chemical-romance/code
-s
Posts: 62
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
Posts: 62
oohh.. just FYI i am using FF 13.0.1
Posts: 7939
its trying to make the calls
http://www.mcrmysoldiers.com/my-chemical-romance/gallery/gallery3/rest/items?callback=jQuery17205980161890317446_1339961555647&output=jsonp&ancestors_for=http%3A%2F%2Fwww.mcrmysoldiers.com%2Fmy-chemical-romance%2Fgallery%2Fgallery3%2Frest%2Fitem%2F1&_=1339961555706
results in a 404 not found
do you have the rest module installed?
in gallery admin -> advanced settings do you have rest allow_guest_access set to 1?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 62
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"
Posts: 7939
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
Posts: 62
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
Posts: 7939
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
Posts: 7939
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
Posts: 7939
FYI, my RESTful embedding script is now a jQuery plugin.
-s