[pmwiki-users] flickr and keys
Dominique Faure
dominique.faure at gmail.com
Mon Feb 6 04:35:41 CST 2006
2006/2/6, Jon Haupt <jhaupt at gmail.com>:
> On 2/5/06, H S <haadyai at gmail.com> wrote:
>
> > Hello,
> >
> > How should I setup more than one key in the flickr-album.php?
> >
> > Also if I have two different fields and have A key for a field and B/C
> keys for another field, how do I set them up ?
> >
> >
> Hmm, I'm assuming what you mean is the flickr API key; what needs to be done
> is the key should be a global variable that can be set in config.php before
> including flickr-album.php. However, I'm a little confused as to how this
> is done; when I initially tried setting the key as a variable and then using
> the variable within the function, it didn't work. If someone else can
> explain how to write that in the code, I'll be glad to fix it.
Perhaps something like:
SDV($FlickrAPIKey, "put_your_API_key_here");
function FlickrAlbum($p) {
global $FlickrAPIKey;
require_once("phpFlickr/phpFlickr.php");
// Create new phpFlickr object
$f = new phpFlickr($FlickrAPIKey);
...
Regards,
Dom
More information about the pmwiki-users
mailing list