Die zweite geschwungene Klammer kommt durch diese zusätzliche abfrage:
Code: Alles auswählen
if (!function_exists('color_group_colorize_name'))
{
Code: Alles auswählen
if (!function_exists('color_group_colorize_name'))
{
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions_color_groups.php
#
#-----[ FIND ]------------------------------------------------
#
function color_group_colorize_name($user_id, $no_profile = false)
{
global $board_config, $phpEx, $db, $phpbb_root_path;
// First see if the user is Anon
if ($user_id != ANONYMOUS)
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Version cache mod start
// Change following two variables if you need to:
$cache_update = 3600; // 1 hours cache timeout. change it to whatever you want
$cache_file = $phpbb_root_path . '/cache/cg-user' . $user_id .'.php'; // file where to store cache
$do_update = true;
if ( (@file_exists($cache_file)) && (empty($disable_color_cache)) )
{
$last_update = 0;
include($cache_file);
if($last_update > (time() - $cache_update))
{
$do_update = false;
}
}
if($do_update)
{
// Version cache mod end
#
#-----[ FIND ]------------------------------------------------
#
$curr = $row['order_num'];
$style_color = 'style="font-weight:bold;color:' . $row['group_color'] . '"';
}
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Version cache mod start
if(@$f = fopen($cache_file, 'w'))
{
fwrite($f, '<' . '?php $last_update = ' . time() . '; $style_color = \'' . $style_color . '\'; $username = \'' . $username . '\'; ?' . '>');
fclose($f);
@chmod($cache_file, 0666);
}
}
// Version cache mod end
#
#---[ SAVE/CLOSE ALL FILES ]-----------------------
#
# eom
Aaaaaaahhhhhhhhoxpus hat geschrieben:Ich hatte das mal anders versucht, also nur die gefärbten User zu cachen, aber da war ich noch nicht mit fertig und mittlerweile fehlte auch die Zeit, das weiter zu verfolgen.
Code: Alles auswählen
#
#----------[ OPEN ]-------------------------------------
#
functioms_color_groups.php
#
#----------[ FIND ]-------------------------------------
#
$user_style_color[$user_color_id] = $style_color;
$user_style_name[$user_color_id] = addslashes($username);
$write_string .= '$user_style_name['.$user_color_id.'] = \''.addslashes($username)."';\n";
if ($style_color != '')
{
$write_string .= '$user_style_color['.$user_color_id."] = '$style_color';\n";
}
#
#----------[ REPLACE WITH ]-----------------------------
#
$user_style_color[$user_color_id] = $style_color;
$user_style_name[$user_color_id] = addslashes($username);
if ($style_color != '')
{
$write_string .= '$user_style_name['.$user_color_id.'] = \''.addslashes($username)."';\n";
$write_string .= '$user_style_color['.$user_color_id."] = '$style_color';\n";
}
Ach du schreck.na ajax ist da doch noch nicht so ausgereift
Code: Alles auswählen
Could not get username for new registered user
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2
SELECT username FROM phpbb_users WHERE user_id =
Line : 371
File : functions_color_groups.php