Ok, so I know we can do things like this
$searchword = "whatever";
$objCpm->cpm_viewRandomMediaFrom("cat=:album=:text=$searchword", 1, 4, $options);
to get image results using keywords, title etc which is cool. But it doesn't work with Filenames, I've dug into a few files but don't see anything jumping out at me saying "change me" can I get a nudge in the proper direction?
I know you can direct link to search results like this thumbnails.php?album=search&search=findthisword
I've messed with this line from search.inc.php a tad thinking maybe it prioritized in order...it don't.
$USER['search']['params']['title'] = $USER['search']['params']['caption'] = $USER['search']['params']['keywords'] = $USER['search']['params']['filename'] = 1;
Someone please point in the proper direction.
You would need to mess with the cpmfetch_dao's makeSourceSql code to include a new flag to generate the SQL code to check filesnames.
Hope that helps
That was to easy.
Here's what I did
In cpmfetch_dao.php find:
if (sizeof($textlist)) {
foreach ($textlist as $keyword) {
$sourceSql .= " p.keywords LIKE '%" . mysql_escape_string($keyword) . "%' OR ";
$sourceSql .= " p.title LIKE '%" . mysql_escape_string($keyword) . "%' OR ";
$sourceSql .= " p.caption LIKE '%" . mysql_escape_string($keyword) . "%' OR ";
Add after:
$sourceSql .= " p.filename Like '%" . mysql_escape_string($keyword) . "%' OR ";