Using Gallery as external

gaspar@

Joined: 2004-11-11
Posts: 2
Posted: Thu, 2004-11-11 12:40

Hi all & first tnx for this super album!

I can't find appropriate thread for G2 questions, so i put it here..

I have downloaded G2 and succesfully installed it.
I'd like to use it as external app in my solution.
But i'm little stuck :(

My (external) file has:

<?php
require_once('/path_to_gallery/embed.php');
$G = new GalleryEmbed();
$G->init($params,$relative_path_to_gal,$params);

# if i do:
$ret = GalleryMain(true);
# this returns Galleries.
?>

BUT i'd like to:
1) get specific Gallery & it's Albums
2) get specific parts (title, date etc) for Gallery, Album and Picture & assign them into my existing template.

Can somebody give me some information about how to get some information out of G2 or to point out where i can find help?

Best regards,
Gaspar

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2004-11-11 13:52

gaspar@, you are only allowed to use GalleryEmbed statically.
See also docs/EMBEDDING from your G2 download.

<?php
require_once('/path_to_gallery/embed.php');
$ret = GalleryEmbed::init(...);
if ($ret->isSuccess()) ...
list ($ret, $g2data) = GalleryEmbed::handleRequest(...);
...
?>

@your questions:
We are still working on the G2 integration with other applications, it's not finished yet. Take a look at the CMS integration topic in the G2 dev. forum.
Your idea of only displaying a filtered part of all G2 albums is quite interesting. i.e. for CMS,this would allow to show a CMS category/topic specific album and the like.
Could you elaborate on this feature request in the CMS integration topic?
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=20560

@mods: move this topic to the G2 dev forum, thanks.

 
gaspar@

Joined: 2004-11-11
Posts: 2
Posted: Fri, 2004-11-12 07:29

valiant, thank You for quick replay!

valiant wrote:
See also docs/EMBEDDING from your G2 download.

I've only 2 docs inside this catalogue:
* DEVELOPER_GUIDELINES
* LOCALIZING

valiant wrote:
Could you elaborate on this feature request in the CMS integration topic?

I try if I get some more time for that..
Anyway i already planned to help your project on localizing Estonian version in the future.

P.S. I marked my post as "Notify me when a replay is posted". But didn't get any e-mail. Is this working?

Best regards,
Gaspar

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2004-11-12 08:08
gaspar@ wrote:
valiant, thank You for quick replay!

valiant wrote:
See also docs/EMBEDDING from your G2 download.

I've only 2 docs inside this catalogue:
* DEVELOPER_GUIDELINES
* LOCALIZING

You need to download a more recent version of G2 (alpha 3 is already obsolete), get it from here: http://galleryupdates.jpmullan.com/
G2/current.gallery2.zip
or
G2/current.gallery2.tar.gz
and don't open it with winzip, open it with any other application.

Quote:
P.S. I marked my post as "Notify me when a replay is posted". But didn't get any e-mail. Is this working?

didn't use this function for months, but it used to work correctly.

 
nepto
nepto's picture

Joined: 2004-07-06
Posts: 22
Posted: Sun, 2005-01-09 14:24

Interesting reading... since I suppose this is related to topic, I want to ask one simple question:

Is there a possibility to link some external gallery from my gallery?

I have homepage where I maintain several galleries. However there are sites, where something like gallleries is present as well (these galleries of course are related to me). I would like to have simple album item (with some album image as well) in my gallery on the homepage, but after clicking on the album, external site will load in the browser (or in the new window).

Of course I would like to see this feature in G2.

Is this "external galleries" feature possible to include into Gallery2? Would you have a time to implement this simple feature? If not, would you accept a simple and clean patch for this?

Thanks

Nepto, http://nepto.sk/

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-01-09 15:27

nepto, this feature doesn't exist in G2, yet. I don't know if there are any bigger difficulties in implementing this.
The best thing you could do is
a) create a RFE on http://sf.net/projects/gallery/
and
b) begin coding a G2 module for this feature.

b) is certainly not that easy, but if you have some programming experience and some time to learn how to program in the G2 framework, why not :)

 
Einstein
Einstein's picture

Joined: 2003-10-13
Posts: 105
Posted: Sun, 2005-01-09 18:12
nepto wrote:
Is there a possibility to link some external gallery from my gallery?

It rings a bell for me ... I like the idea very much. Anyway it's a bit of topic from the things gaspar@ asked for.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-01-09 19:56

see the attachment in this topic.. it could be modified for this purpose. ie, link to something external (and use thumbnail module for uploading a thumbnail) instead of linking to an album inside the gallery.