callSearch();
Calls flickr to request images based on the search you pass it.
Oberkampf Tip -
Use this function to get all the photos from your account, and also
play
with
the limit
and random
setting.
REQUIRED!
-This function must be used with displaySearch();
-This function must be placed at the top of your file directly
under require_once("oberkampf/required.php");
Parameters
callSearch(size,stop,limit,random,sort);
size (Optional)
- Defaults to "s"
Similar to the flickr sizing. that
is used for a photo url however Oberkampf has (s,t,m,n) ;
You can read more about the Oberkampf sizing here.
stop (Optional)
- Passing a "1" for stop will make sure NO photos load on your search page.
By default flickr gets all the photos in your
photostream if you don't pass it search criteria.
If stop is set to 1, then in order to display your search a GET or POST
must be made for either "tags" or "text'
limit (Optional)
- Limits the number of results per page. Defaults to 100.
random (Optional)
- Shuffles the results. Defaults to 0. Simply make random "1" to turn it
on.
sort (Optional)
- Orders the results the same way flickr orders theirs. Defaults to 'date-posted-desc'
Possible values are [ date-posted-asc, date-posted-desc, date-taken-asc
and date-taken-desc]
Important: callSearch listens for a GET/POST for the values : tags & text
Use html forms and have input values as tags or text
or
Pass a string value as myfile.php?tags=yourtags
|
Example Calls:
callSearch();
- Retrieves search data, defaulting to size 's', displaying automatically,
limiting 100 per page, sorting by date-posted-desc
callSearch('s',1,10);
- Retrieves thumbnail data, passes sizing of "s" , only displaying
after an html POST has been made, and limits thumbnails
to
10 per page
callSearch('s',0,60,1);
- Retrieves thumbnail data, passes sizing of "s" , displaying
automatically, sets limit to 60 per page, and shuffles them.
callSearch('t',1,0,0,'date-taken-desc');
- Retrieves search data, defaulting to size 't', only displaying after
an html POST has been made, 0 is same as default limit (100)
no random shuffle, and ordering by date taken descending.
-
|