[SOLVED] Place Gallery 3 into Template?

Tyharo

Joined: 2014-05-15
Posts: 10
Posted: Thu, 2014-05-15 15:08

Hello,
I was wondering if there was any way to include gallery 3 into a websites theme/template. I've built a site from scratch and the gallery page includes the header, menubar, and footer but as the main body I would like gallery 3. The pages are built using php so the gallery page consists of php include and require commands, is there any way to include or require gallery 3 as the body of a page?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2014-05-15 18:49

http://galleryproject.org/node/106581

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Tyharo

Joined: 2014-05-15
Posts: 10
Posted: Fri, 2014-05-16 12:24

That is exactly what I was looking for! One more question though, I uploaded the contents of the download to a gallery folder in my website, the gallery loads but its the same exact gallery as the example, how do I set my own images/videos up? Do I need a database like the original gallery 3 or do I actually have to have gallery 3 installed still?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-05-16 13:55

I'm not following your question. Can you rephrase.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Tyharo

Joined: 2014-05-15
Posts: 10
Posted: Fri, 2014-05-16 15:21

Extracted the files from the G3 Rest download (the link you gave me above) and stuck them into a folder named gallery on my server. I was only able to load the example pictures, how do I load my own pictures using G3 Rest? Do I have to have Gallery 3 installed and just simply point G3 Rest towards the install?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2014-05-16 19:31

You will need to edit the file to your install find:

        <script>
            $(document).ready(function(){
                $('#gallery').g3rest({
                    url: 'http://www.flashyourweb.com/gallery3/rest',
                    code: 'http://www.flashyourweb.com/gallery2/embed_samples/'
                });
            });
        </script>

edit the url and code to your install.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Tyharo

Joined: 2014-05-15
Posts: 10
Posted: Sun, 2014-05-18 20:45

I'm still having issues, what exactly is the url line supposed to point at and what is the code line supposed to point at? i tried pointing the code line to the code folder that was uploaded with rest and i set the url line to point to the gallery3 folder but it still wouldn't load any images.

the rest code is located in cphoto/gallery/ and gallery3 is installed in cphoto/gallery/gallery3/

Quote:
<script>
$(document).ready(function(){
$('#gallery').g3rest({
url: 'http://www.tyharotest.x10host.com/cphoto/gallery/gallery3/',
code: 'http://www.tyharotest.x10host.com/cphoto/gallery/code/'
});
});
</script>

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2014-05-19 01:04

Do you have the rest module activated?
have you configured the REST data to be accessed by the guest user?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Tyharo

Joined: 2014-05-15
Posts: 10
Posted: Mon, 2014-05-19 01:57

I didn't realize there was a module. I just activated the REST API Module but how do I configure the REST data to be accessed by the guest users?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2014-05-19 02:58

Admin - settings - Advanced 'allow_guest_access' set to 1

Then as a guest user Check if the REST API is working by entering the following URL in your web browser:
http://www.tyharotest.x10host.com/cphoto/gallery/gallery3/index.php/rest

In response you should get a blank page with two square brackets [] in the upper left corner, and the URL in your address bar should remain unchanged (to make sure no additional redirects take place).

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Tyharo

Joined: 2014-05-15
Posts: 10
Posted: Mon, 2014-05-19 14:55

Perfect, works like a dream! Thanks a lot floridave, you were a huge help!