yes the code is bad .. sorry.
The code is
PHP Code:
// MioTraGuSa Modification Last Scores
// Fetch the latest scores.
$scorbits = '';
$scorquery = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "arcade_news_scor AS arcade_news_scor ORDER BY datescor DESC LIMIT " . $vbulletin->options['quicksearchresults']);
while ($scor = $db->fetch_array($scorquery))
{
exec_switch_bg();
// Format the score news date/time.
$scor['date'] = vbdate($vbulletin->options['logdateformat'], $scor['datescor']);
$scor['newstext'] = unhtmlspecialchars($parser->do_parse($scor['scortext'], false, true, true, false, true, false));
if ($scor['scorid'] == "1")
{
eval('$scorbits .= "' . fetch_template('arcade_scor_bit_first') . '";');
} else {
eval('$scorbits .= "' . fetch_template('arcade_scor_bit') . '";');
}
}
// MioTraGuSa END Modification Last Scores
and
PHP Code:
// MioTraGuSa Modification Last Scores
$gamescornews['score'] = sprintf((float)$game['score']);
if ($gamescornews['score'] <= 1) {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news_scor (scortext, scortype, scorgame, scoruserid, datescor) VALUES ('" . addslashes(construct_phrase($vbphrase['x_points_in_the_y_gamezero'], $vbulletin->userinfo['username'], $gamescornews['score'], $game['title'])) . "', 'auto', '$game[gameid]', " .$vbulletin->userinfo['userid']. ", " . TIMENOW . ")");
} else {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news_scor (scortext, scortype, scorgame, scoruserid, datescor) VALUES ('" . addslashes(construct_phrase($vbphrase['x_points_in_the_y_game'], $vbulletin->userinfo['username'], $gamescornews['score'], $game['title'])) . "', 'auto', '$game[gameid]', " .$vbulletin->userinfo['userid']. ", " . TIMENOW . ")");
}
// MioTraGuSa END Modification Last Scores
Updated .. sorry
test it ..