Welcome to Box

Modifications for phpBB3.
Try the Mods here and share Your own Mods
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

Welcome to Box

Post by Rhyno »

Heya All

How do i get the donator section in my welcome box?

e.g.

A special thanks goes to themission
One of our most valued donators
Your donation is greatly appreciated

Welcome to Box

Post by Stoker »

Open index.php
Find:

Code: Select all

// Assign index specific vars
Add before:

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 = 10
		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);
Change this part to your own group id for donators

Code: Select all

WHERE group_id = 10
Open index_body.html
Find:

Code: Select all

<!-- IF S_DISPLAY_ONLINE_LIST --><br /><br />{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<!-- ENDIF -->
Replace with:

Code: Select all

<!-- BEGIN users --><br /><br />A special thanks goes to <strong style="font-weight:bold; color:#{users.BOT_COLOUR};">{users.BOT_NAME}</strong><br />One of our most valued donators<br />Your donation is greatly appreciated<!-- END users -->