There is a security issue with this hack. I won't release the detail just yet, but here is what mine currently looks like:
PHP Code:
if ($bbuserinfo['userid'] > 0 and $_GET['styleid'] > 0) {
$newstyleset = intval($_GET['styleid']);
if ($allowchangestyles==1) {
$DB_site->query("UPDATE session SET styleid='$newstyleset' WHERE sessionhash='".addslashes($session['dbsessionhash'])."'");
$DB_site->query("UPDATE user SET styleid='$newstyleset' WHERE userid='$bbuserinfo[userid]' LIMIT 1");
vbsetcookie("bbstyleid","",1);
}
standardredirect("Style settings have been updated.", $bburl);
exit;
}
There extra code is how vB itself deals with changing styles i.e. expiring the style cookie and updating the sessions table.