Please can some share sample code for embedding G2 into php code.
This can be a good starting point for anyone who wants to embed G2 into own sites.
I would appreciate something like:
<html>
<head>
</head>
<body
<?php
GalleryEmbed CODE
....
?>
</body>
</html>
to show:
1. all albums
2. specific album
3. specific pic
4. sidebar
5. header
on a blank page.
can someone help me with this ? PLEASE !!!!
Thank you so much
Greetz RaVen
Posts: 32509
docs/EMBEDDING
cvs checkout integration (xaraya, phpnuke, tikipro, drupal, ... integrations)
better docs coming not so soon.
Posts: 24
Ich weiss, aber ich möchte das in eine eigene Seite (kein bestehendes CMS) integrieren, und weiss nicht wie ich anfangen soll !!
I know, but I want to integrate G2 into an own site that is no CMS driven one
and don't know where and how to start.
RaVen
Posts: 32509
it strongly depends on what you really want.
- If you want to integrate user management of G2 with your website or
- If you're using a content management system / portal or
-> then take a look at EMBEDDING and the existing integration examples (xaraya, phpnuke, drupal, ...) on how the steps of EMBEDDING actually can be implemented.
- Else, you can edit the templates of G2. You can put static html, php and include any header / footer you want in the G2 templates.
I assume from your wishlist that you really want embedding and not just custom templates/layout.
If you study docs/EMBEDDING and the examples from cvs "integration" you will come quite far. I don't have time for more documentation at the moment, sorry.
to download the examples, use cvs
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gallery checkout integration
Posts: 32509
If you're too lazy to download the examples, here's a very small wrapper, minimal code to call G2 via embed.php.
@edit: removed typos, works now.
@edit: updated the wrapper with embedPath
@edit: i'm moving the attached file to the embedding and integration topic, first post.
Posts: 24
YES
Looking at the index.php of PHPNuke Integration seems to clarify a lot of things.
Thank you for your time and patience
RaVen
P.S.: Thank you again, I will download and try it
P.P.S.: Didn't try it so far but had a look on it and that is exactly what I asked for.
a SMALL piece of code I can handle.
Posts: 57
By any chance, do you still have this wrapper? I would very much appreciate it.
Posts: 32509
mrwilly123, just 3 posts above your post, there's one from me with a main.zip attachement. this is the wrapper file. you can download it by pressing on the link on the right of the post.
Posts: 7
nm.
Posts: 1
Just in case you are as confused as I was...the wrapper code posted above (5th message up) by valiant is not visible unless you login...
Posts: 10
Valiant.
I am sorry, but I think this wrapper is what I want, but it is no more. I am just trying to embed a number of random images in an html page.
Can you post the zip again for us non PHP able Gallery users...
Gus
Posts: 32509
take the attachement from the first post of this thread. perhaps it was moved during the import from the old site to the new site.
Posts: 6
It is corrupted. Doesn't work for me.
Posts: 32509
no it isn't, just tried it.
use firefox or opera to download attachements from this website. maybe save the file as .zip.