7
i added an hack to this block to show a list of users that invited a friend
i simply modify misc.php in this way:
row 190
echo "<div style=\"padding:10px\"><h4>"._MSC_REFERENCESENT."</h4></div>";
$sql = sprintf("UPDATE %s SET invite = '%s' WHERE uid = %u", $xoopsDB->prefix('users'), $xoopsUser->getVar('invite')+1, $xoopsUser->getVar('uid'));
$xoopsDB->query($sql);
you have to add "invite" to members table
to show the list i add a case to switch in misc.php
case "invited":
echo '</head><body style="padding:10px">
<table width="100%" class="outer" cellpadding="3">
<tr>
<th colspan="2">Ecco chi ci sostiene</th>
</tr>
<tr class="head">
<td align="left">Nick</td>
<td align="right">Amici invitati</td>
</tr>';
if ($getinvited = $xoopsDB->query("SELECT uname,invited FROM ".$xoopsDB->prefix("users")." where invited!=0 order by invited desc")) {
$rcolor = 'even';
while ( $row = $xoopsDB->fetchArray($getinvited) ) {
echo "<tr class='$rcolor'><td align=\"left\">".$row['uname']."</td><td align=\"right\">".$row['invited']."</td></tr>";
$rcolor = ($rcolor == 'even') ? 'odd' : 'even';
}
} else {
echo "Nessun abitante ha invitato amici in Pixaelcity";
}
echo '</table>';
break;
sorry for code's formatting