*

Recent

Author Topic: MOD - Show newest member block.  (Read 4384 times)

Frank

  • Sr. Member
  • ****
  • Posts: 257
  • Force: +4/-0
MOD - Show newest member block.
« on: October 15, 2011, 01:04:01 AM »
GoTo: includes/functions.php

At the bottom BEFORE the ?>

Add:

Code: [Select]
function get_random_color()
{
for ($i = 0; $i<6; $i++)
{
$c .=  dechex(rand(0,15));
}
return "#$c";
}
___________________________________________________________________________________


template.php

If FAS used template blocks instead of table rows this would be a lot easier. But it doesn't - So you'll have to work it in the best you can with whatever template you're using. :(

Code: [Select]
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="header2">New Members</td>
</tr>
<tr>
<td class="content2">
<?php
$tur1 'SELECT username, userid FROM dd_users WHERE userid!="1" ORDER BY userid DESC LIMIT 0,6';
$resultt mysql_query($tur1);
if (!$resultt) { echo 'Cannot connect to the databese';
}
else
{
$tur sqlcache('newmembers'$cachelife$tur1);
foreach($tur as $r){
echo '
<span style="color:'
.get_random_color().'">'.$r['username'].'</span><br />';
}}
?>

</td>
</tr>
</table>

Demo: http://ozigames.net/arcade/

Stats are at the bottom of the page - - - - - - - Boom!
« Last Edit: October 15, 2011, 01:06:11 AM by mort »