[pmwiki-users] flickr and keys

Jon Haupt jhaupt at gmail.com
Mon Feb 6 13:38:22 CST 2006


On 2/6/06, Dominique Faure <dominique.faure at gmail.com> wrote:
>
> 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.phpbefore
> > 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
>

Thanks - I think I understand SDV and declarations better now.  I've updated
flickr-album.php with this little insight and now you should be able to
simply set $FlickrAPIKey = "whatever"; in each field before including
flickr-album.php and it'll work.

Jon

--
Jon Haupt
Fine & Performing Arts Librarian
Iowa State University
152 Parks Library
Ames, IA 50011
515-294-0904
jhaupt at iastate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060206/ae406dfe/attachment.html 


More information about the pmwiki-users mailing list