Find the following function:
$template_thumb_view_title_row = <<<EOT
That's not a function, but merely a variable getting populated.
Replace the entire function with the following:
// HTML template for title row of the thumbnail view (album title + sort options)
if (!isset($template_thumb_view_title_row)) { //{THEMES}
$template_thumb_view_title_row = <<<EOT
<table width="100%" cellpadding="4" cellspacing="0">
<tr>
<td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
<td><img src="images/spacer.gif" width="1" alt="" /></td>
<td class="sortorder_cell">
<form name="sort">
<select name="sortbox" OnChange="location.href=sort.sortbox.options[selectedIndex].value">
<option>Sorting Order</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=ta">{TITLE} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=td">{TITLE} -</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=na">{NAME} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=nd">{NAME} -</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=da">{DATE} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=dd">{DATE} -</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=pa">{POSITION} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=pd">{POSITION} -</option>
</select>
</form>
</td>
</tr>
</table>
EOT;
} //{THEMES}
No, don't do that - that's silly. Actually, the instructions need to be as following:
Edit themes/yourtheme/theme.php with a plain text editor. Find
$template_thumb_view_title_row = <<<EOT
and edit as suggested below. If that section doesn't exist in your custom theme, copy
// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
<td><img src="images/spacer.gif" width="1" alt="" /></td>
<td class="sortorder_cell">
<table cellpadding="0" cellspacing="0">
<tr>
<td class="sortorder_options">{TITLE}</td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=ta" title="{SORT_TA}"> + </a></span></td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=td" title="{SORT_TD}"> - </a></span></td>
</tr>
<tr>
<td class="sortorder_options">{NAME}</td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=na" title="{SORT_NA}"> + </a></span></td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=nd" title="{SORT_ND}"> - </a></span></td>
</tr>
<tr>
<td class="sortorder_options">{DATE}</td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=da" title="{SORT_DA}"> + </a></span></td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=dd" title="{SORT_DD}"> - </a></span></td>
</tr>
<tr>
<td class="sortorder_options">{POSITION}</td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=pa" title="{SORT_PA}"> + </a></span></td>
<td class="sortorder_options"><span class="statlink"><a href="thumbnails.php?album={AID}&page={PAGE}&sort=pd" title="{SORT_PD}"> - </a></span></td>
</tr>
</table>
</td>
</tr>
</table>
EOT;
from themes/sample/theme.php into a new line before
?>
of the file themes/yourtheme/theme.php
Then replace your definition of
$template_thumb_view_title_row with the following code:
$template_thumb_view_title_row = <<<EOT
<form name="sort" action="{$_SERVER['REQUEST_URI']}" method="get">
<table width="100%" cellpadding="4" cellspacing="0">
<tr>
<td width="100%" class="statlink">
<h2>{ALBUM_NAME}</h2>
</td>
<td>
<img src="images/spacer.gif" width="1" alt="" />
</td>
<td class="sortorder_cell">
<select name="sortbox" OnChange="location.href=sort.sortbox.options[selectedIndex].value">
<option>Sorting Order</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=ta">{TITLE} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=td">{TITLE} -</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=na">{NAME} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=nd">{NAME} -</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=da">{DATE} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=dd">{DATE} -</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=pa">{POSITION} +</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=pd">{POSITION} -</option>
</select>
</td>
</tr>
</table>
</form>
EOT;
@jeepguy_1980:
never copy stuff from include/themes.inc.php! Always copy stuff from themes/sample/theme.php instead!