I didnt make it, but i had it on my forums:
add to the end of the phpinclude template:
PHP Code:
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$result = mysql_query("SELECT styleid,title FROM style WHERE userselect=1 ORDER BY title");
if (!$result)
{
$styledropdown = 'Couldn\'t get a list of styles';
}
else
{
$s = mysql_fetch_row($result);
while ($s != false)
{
$styleid = $s[0];
$title = htmlspecialchars($s[1]);
$selected = ($styleid == $bbuserinfo[styleid]) ? " selected" : "";
$styledropdown .= "<option value=\"$styleid\"$selected>$title</option>";
$s = mysql_fetch_row($result);
}
$shash = $session[sessionhash];
$styledropdown = "
<select name=\"newstyleid\" onChange=\"window.location='index.php?s=$shash&styleid=' + this.value\">
$styledropdown
</select>";
}
}
Then add to forumhome template where you wish to show:
PHP Code:
<td align="center">
<smallfont><b>Change Style</b></smallfont><br>$styledropdown<br>
or you can put in the header to show on every page generated.