I take back my previous statement. Well, what I mean to say is that sure, you could do it with a plugin, but you could also do it in your theme.php, which is not modifying the core code, so that's a very reasonable way to do it.
What you'll be doing is creating a custom theme_no_img_to_display() function. Copy the code below into your theme.php:
function theme_no_img_to_display($album_name)
{
global $lang_errors, $template_no_img_to_display;
static $template = '';
static $spacer;
if ((!$template)) {
$template = $template_no_img_to_display;
$spacer = template_extract_block($template, 'spacer');
}
// put mod here for quick search box before "no image to display" table
$params = array('{TEXT}' => $lang_errors['no_img_to_display']);
starttable('100%', $album_name);
echo template_eval($template, $params);
endtable();
// put mod here for quick search box afer "no image to display" table
}
This is the sample code from sample/theme.php that is used to customize the "no image to display" table, except I added in 2 comment lines that tell you where to put the code for adding a quick search box. This function is used whenever an album has no image to display, either for an empty album, or an empty search results meta-album. Since it's used for both, you need to check whether this function is being called for an empty search results reason and not for an empty regular album.
To add a quick search box, choose whether you want this above or below the "no image to display" table, and put the code below at the appropriate line:
// mod begin - add quick search box
if ($_POST['search'] || $_GET['search']) {
echo <<<EOT
<form method="get" action="thumbnails.php" name="searchcpg">
<input type="hidden" name="album" value="search" />
<input type="hidden" name="type" value="full" />
<input type="input" name="search" maxlength="255" value="" class="textinput" />
<input type="submit" value="Quick Search" />
> <a href="search.php">Advanced Search</a>
</form>
<script language="javascript" type="text/javascript">
<!--
document.searchcpg.search.focus();
-->
</script>
EOT;
}
// mod end - add quick search box
Warning: If you want to use my Search Album plugin, you need to modify the "Advanced Search" link above to point to "index.php?file=search_album/search" instead of "search.php". I just realized my plugin breaks the regular search form and so if you link to it, an error will occur. I will fix that for my plugin, but for now, please pick the correct link for the "Advanced Search" link, or just delete that line if you don't want it. So I don't need to add a post to this thread in the future, version 1.02 of the Search Album plugin has this problem. I'll make sure to put the fix into the next release, so look in the plugin thread for the version number to determine if you need to change this code or not. Ideally, you don't want to manually change anything when activating or deactivating a plugin. Otherwise, what's the point of having a plugin as opposed to a hack?