[pmwiki-users] flickr and keys

H S haadyai at gmail.com
Mon Feb 6 15:57:30 CST 2006


I think I am still missing something.

I applied a new flickr-album.php.

Then, I added

a) in  config.php  in field A
$FlickrAPIKey = 'flickr_key_user_a';
include_once("$FarmD/cookbook/flickr-album.php");

b)  in  config.php  in field B
$FlickrAPIKey = 'flickr_key_user_b';
include_once("$FarmD/cookbook/flickr-album.php");

my access to user-a in either field A or field B works. I can see my
pictures on both fields.  However, I can't access 'user-b' even on field B
itself.

Thanks,
Isarin


On 2/6/06, Jon Haupt <jhaupt at gmail.com> wrote:
>
>
>
> 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/02e0e85a/attachment.html 


More information about the pmwiki-users mailing list