Customizing SMF > Mod Requests
New member block
(1/1)
WasdMan:
I made a PHP block:
--- Code: ---<?php
// Created by WasdMan
// 2012
$url = 'http://yourforum.net/'; // Give me your exact address
$prefix = 'smf_'; // The table prefix in this forum
// All posts not based group
$result=mysql_query("SELECT id_group, group_name, online_color FROM `".$prefix."membergroups` WHERE min_posts = -1");
$accounts = 0;
while($row=mysql_fetch_array($result))
{
$count = 0;
echo '<b><font color="'.$row['online_color'].'">'.$row['group_name'].'</font></b><br>';
$result2=mysql_query('SELECT id_member, real_name FROM `'.$prefix.'members` WHERE id_group = '.$row['id_group']);
echo '<ul class="sp_list">';
while($row2=mysql_fetch_array($result2))
{
$username = $row2['real_name'];
echo '<li>'.sp_embed_image('dot').' <a href="'.$url.'index.php?action=profile;u='.$row2['id_member'].'"><font color="'.$row['online_color'].'">'.$row2['real_name'].'</font></a></li>';
$count++;
$accounts++;
}
if($count == 0) echo "<li><i><b>User not found ...</b></i></li>";
echo "</ul>";
}
echo "<br><center><i>(<b>".$accounts."</b> user)</i></center>";
?>
--- End code ---
Mod image:
Navigation
[0] Message Index
Go to full version