Verfasst: 03.03.2003 12:10
SQRT, ja wenn Nachfrage besteht werde ich Ihn weiterentwickeln und 2.0.4 bzw. bald 2.0.5 tauglich machen.
Ich werd ihn dann komplett überarbeiten.
Ich werd ihn dann komplett überarbeiten.

Code: Alles auswählen
if (!empty($forum_id))
{
$sql = "SELECT forum_style
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for forum info');
}
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(CRITICAL_ERROR, "Could not extract theme data for forum_id [$forum_id]");
}
if (!empty($row['forum_style']))
$theme = setup_style($row['forum_style']);
else
$theme = setup_style($userdata['user_style']);
}
else
{
if ( !$board_config['override_user_style'] )
{
if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
{
if ( $theme = setup_style($userdata['user_style']) )
{
return;
}
}
}
$theme = setup_style($board_config['default_style']);
}
Sorry für meine Platzverschwendung.saerdnaer hat geschrieben:könntest du den code oben verlinken
Bei mir sieht der Teil der includes/functions.php, der die setup_style Funktion beinhaltet wie folgt aus:saerdnaer hat geschrieben:und könntest du bitte mal die komplette setup_style funktion posten bzw. wenn sie sehr groß ist verlinken...
Code: Alles auswählen
#
#-----[ OPEN FILE: phpBB2/includes/functions.php ]------------------------------------------
#
#
#-----[ FIND 238]------------------------------------------
#
if ( !$board_config['override_user_style'] )
{
if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
{
if ( $theme = setup_style($userdata['user_style']) )
{
return;
}
}
}
$theme = setup_style($board_config['default_style']);
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (!empty($forum_id))
{
$sql = "SELECT forum_style
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for forum info');
}
if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(CRITICAL_ERROR, "Could not extract theme data for forum_id [$forum_id]");
}
if (!empty($row['forum_style']))
$theme = setup_style($row['forum_style']);
else
$theme = setup_style($board_config['default_style']);
}
else
{
if ( !$board_config['override_user_style'] )
{
if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
{
if ( $theme = setup_style($userdata['user_style']) )
{
return;
}
}
}
$theme = setup_style($board_config['default_style']);
}