It should choose automatically, try...
adding this before ?>
// This neat function finds and returns info about all of our themes.
function getThemeData()
{
global $db_prefix, $user_info, $scripturl, $settings, $options, $modSettings;
$themes = array();
// Get all of our themes.
$request = db_query("
SELECT value, ID_THEME
FROM {$db_prefix}themes
WHERE variable = 'name'
AND ID_THEME != $settings[theme_id]" . (empty($modSettings['theme_default']) ? '
AND ID_THEME != 1' : '') . "
ORDER BY value", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$themes[] = array(
'id' => $row['ID_THEME'],
'name' => $row['value'],
);
}
return $themes;
}
and this where you want the select box:
$themes = getThemeData();
// Super duper theme changer slash! :D
if (!empty($themes))
{
echo '
<form action="', $scripturl ,'" name="themeForm">
<select name="theme" onchange="if (this.selectedIndex > 0 && this.options[this.selectedIndex].value) window.location.href = smf_scripturl + \'?theme=\' + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 ? 0 : 1);">';
foreach($themes as $theme)
echo '
<option value="', $theme['id'] ,'">' .$theme['name'] . '</option>';
echo '
</select>
<input type="submit" value="Change Themes!" />
</form>';
}
I updated a few things as well.