Previous Up Next
In depth explanations In depth explanations Using the $option array effectively

Using the $source parameter effectively

How to narrow your results

Vuud

What is the $source parameter?

A large number of CpmFetch calls take the source tag as a parameter. The source parameter is a way to narrow down what CpmFetch will consider eligible to be displayed. These seemingly simple parameter allows you great control over your results.

As of CpmFetch 2.0 there are several items you can pass as the $source parameter: cat, album, owner, keyword and text. You can mix and match them as much as you want, but each one can only occur once in the $source string. You can however, specify each one with as many items as you want all seperated with commas. Here is an example:

Example of a valid source string

"cat=5,3:album=10:owner=vuud"

This will allow items that are category 5 or category 3 or album 10 AND owner vuud

In CpmFetch 2.1.x I have also added a favorites entry. This allows you to specify a list of user ids and have the images they have marked as favorites as being part of your selected photos.

Example of a valid source string using favorites

"cat=5,3:favorites=2,3,4"

The above will return images that are from the favorites listings of user 2, user 3 and user 4 - that also happen to be in category 5 or category 3.

Here is an overview of what they each do: cat - Allows items in given category numbers to be eligible. album - Allows items in given album numbers to be eligible. owner - Specifies a specific owner. keyword - Matches to the keyword list. text - Matches to the keywords, title, or captions. favorites - List of user id numbers. Will select photos from the total favorites list.

Previous Up Next
In depth explanations In depth explanations Using the $option array effectively

Documentation generated on Fri, 22 Jun 2007 10:16:51 -0400 by phpDocumentor 1.3.0