Its not only the number you have to change.
You need to change the entire code bit.
Request
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support
Request
Yes, replace the entire code on index.php with this:
Code: Select all
switch ($db->sql_layer)
{
case 'postgres':
$order_by = 'RANDOM()';
break;
case 'mssql':
case 'mssql_odbc':
$order_by = 'NEWID()';
break;
default:
$order_by = 'RAND()';
break;
}
$sql = 'SELECT user_id, user_type, username, user_colour
FROM ' . USERS_TABLE . ' WHERE group_id = 7
ORDER BY ' . $order_by;
$result = $db->sql_query_limit($sql, 1);
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('users', array(
'BOT_NAME' => $row['username'],
'BOT_COLOUR' => $row['user_colour'],
));
}
$db->sql_freeresult($result);
Request
I have done that, nothing shows up. I have to change the 7 back to a 2 and then i get bots again.Stoker wrote:Yes, replace the entire code on index.php with this:Code: Select all
switch ($db->sql_layer) { case 'postgres': $order_by = 'RANDOM()'; break; case 'mssql': case 'mssql_odbc': $order_by = 'NEWID()'; break; default: $order_by = 'RAND()'; break; } $sql = 'SELECT user_id, user_type, username, user_colour FROM ' . USERS_TABLE . ' WHERE group_id = 7 ORDER BY ' . $order_by; $result = $db->sql_query_limit($sql, 1); while ($row = $db->sql_fetchrow($result)) { $template->assign_block_vars('users', array( 'BOT_NAME' => $row['username'], 'BOT_COLOUR' => $row['user_colour'], )); } $db->sql_freeresult($result);