fsockopen and embed path

kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Fri, 2006-02-17 15:50

I see in the latest cvs that it is possible to get the embed.php path via fsockopen eg "http://example.com/gallery2/embed.php?getEmbedPath=1". I am having some difficulty in actually getting this to work in my embed code. Could you please post a snippet of how to use fsockopen to actually do this.

Thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-02-17 16:00
 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Fri, 2006-02-17 23:16

Thanks valiant, somehow I missed that.

If I use the functions in G2EmbedDiscoveryUtilities, how should the G2EmbedDiscoveryUtilities.class file be distributed with the embed code (Drupal in my case)? It would seem to me that ideally it should be part of the Gallery2 core files, rather than also supplying a (potentially out of date) version of it and then get the user to install it correctly.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-02-18 00:06

of course you need to package the G2EmbedDiscoveryUtilities class with your integration and it can't be packaged with g2.
why? because you don't know where g2 is on the server at the time when you need G2EmbeDiscoveryUtilities.
the purpose of this class is to find g2.

 
kiz_0987

Joined: 2005-02-27
Posts: 189
Posted: Sat, 2006-02-18 03:14

Doh. What kind of idiot am I ;-)