Markwick Posted April 2, 2009 Share Posted April 2, 2009 I would like a Mod that is a referals mod where all users are able to go to see how many people have been refered and by which player. Id also like to be able to reset this somehow as id like referal competitions at some point in time. Please help me. Quote Link to comment Share on other sites More sharing options...
cgrimes985 Posted April 2, 2009 Share Posted April 2, 2009 Re: Looking for a Referal Mod ... offering to pay for this mod? Quote Link to comment Share on other sites More sharing options...
_Ricky_ Posted April 3, 2009 Share Posted April 3, 2009 Re: Looking for a Referal Mod ... hey ah how about you fix the errors on your game first and oh yeah..shops...weapons...would probally be a plus...never seen a game without them.. Quote Link to comment Share on other sites More sharing options...
RazorBladerz Posted April 3, 2009 Share Posted April 3, 2009 Re: Looking for a Referal Mod ... lol t rue Quote Link to comment Share on other sites More sharing options...
BoGFx Posted April 3, 2009 Share Posted April 3, 2009 Re: Looking for a Referal Mod ... I'll add $10 to the creation fund :D Quote Link to comment Share on other sites More sharing options...
(((TOLK))) Posted April 4, 2009 Share Posted April 4, 2009 Re: Looking for a Referal Mod ... This is the one i made, i made it for hall of fame so you can change it a little if u want, function hof_referals() { global $db,$ir,$c,$userid, $myf; print "Showing the 6 users with the highest number of referals <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>User ID</th> <th>Number of referals</th> </tr>"; $p=0; $ar=$db->query("SELECT COUNT('refREFED') AS total,refREFER FROM referals GROUP BY refREFER ORDER BY COUNT('referred') DESC LIMIT 10"); while($s = $db->fetch_row($ar)) { echo '<tr style="background:brown">'; echo '<td>'.$s['refREFER'].'</td>'; echo '<td>'.$s['total'].'</td>'; echo '</tr>'; } print "</table>"; Quote Link to comment Share on other sites More sharing options...
ryzzo123 Posted April 6, 2009 Share Posted April 6, 2009 Re: Looking for a Referal Mod ... iv added that lil code and put the code case "referals": hof_referals(); break; init at the top and it still isnt working i get this error Parse error: syntax error, unexpected $end in /home/******/public_html/halloffame.php on line 223 Quote Link to comment Share on other sites More sharing options...
Neji_Hyuuga Posted April 7, 2009 Share Posted April 7, 2009 Re: Looking for a Referal Mod ... nice idea about this tolk but the one i added of urs dont work so i edited it and now it works on my game here is the edited version first of off find case "iq": hof_iq(); break; then under it add case "referal": hof_referals(); break; then find function hof_iq() { global $db,$ir,$c,$userid, $myf; print "Showing the 20 users with the highest IQ <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>Pos</th> <th>User</th> </tr>"; $q=$db->query("SELECT u.*,g.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN gangs g ON g.gangID=u.gang WHERE u.user_level != 0 $myf ORDER BY us.IQ DESC,u.userid ASC LIMIT 20"); $p=0; while($r=$db->fetch_row($q)) { $p++; if($r['userid'] == $ir['userid']) { $t="[b]";$et="[/b]"; } else { $t="";$et=""; } print "<tr> <td>$t$p$et</td> <td>$t{$r['gangPREF']} {$r['username']} [{$r['userid']}]$et</td> </tr>"; } print "</table>"; } under it add function hof_referals() { global $db,$ir,$c,$userid, $myf; print "Showing the 6 users with the highest number of referals <table width=75% cellspacing=1 class='table'><tr style='background:gray'> <th>User ID</th> <th>Number of referals</th> </tr>"; $p=0; $ar=$db->query("SELECT COUNT('refREFED') AS total,refREFER FROM referals GROUP BY refREFER ORDER BY COUNT('referred') DESC LIMIT 10"); while($s = $db->fetch_row($ar)) { echo '<tr style="background:brown">'; echo '<td>'.$s['refREFER'].'</td>'; echo '<td>'.$s['total'].'</td>'; echo '</tr>'; } also to add the link at the top of the page do the following find <td>[url='halloffame.php?action=crystals&filter={$filter}']CRYSTALS[/url]</td> directly after it add <td>[url='halloffame.php?action=referal&filter={$filter}']REFERALS[/url]</td> this is the working version its a good idea tolk not taking credit for it jsut wanting to help out by addin gthe verion i managed to get working because you forgot to add the case files and the link hope everyone liks the working version as its a good mod ill send a screenshot of it too so u can see the working version By Paul_Donna_Luke Quote Link to comment Share on other sites More sharing options...
(((TOLK))) Posted April 8, 2009 Share Posted April 8, 2009 Re: Looking for a Referal Mod ... yh sorry about not adding the cases and links i couldn't be bothered lol i thought u guyz could work it out lol. If i can anyone can. Quote Link to comment Share on other sites More sharing options...
gurpreet Posted April 8, 2009 Share Posted April 8, 2009 Re: Looking for a Referal Mod ... Showing the 6 users with the highest number of referals QUERY ERROR: Invalid use of group function Query was SELECT COUNT('refREFED') AS total,refREFER FROM referals GROUP BY refREFER ORDER BY COUNT('referred') DESC LIMIT 10 Quote Link to comment Share on other sites More sharing options...
(((TOLK))) Posted April 9, 2009 Share Posted April 9, 2009 Re: Looking for a Referal Mod ... Showing the 6 users with the highest number of referals QUERY ERROR: Invalid use of group function Query was SELECT COUNT('refREFED') AS total,refREFER FROM referals GROUP BY refREFER ORDER BY COUNT('referred') DESC LIMIT 10 If that's mine then it might not work because I got it off my computer not my FTP and that one may not work. Try Neji's it deffinately works Quote Link to comment Share on other sites More sharing options...
gurpreet Posted June 1, 2009 Share Posted June 1, 2009 Re: Looking for a Referal Mod ... That's Neji's....No idea why it isnt working! Quote Link to comment Share on other sites More sharing options...
(((TOLK))) Posted June 1, 2009 Share Posted June 1, 2009 Re: Looking for a Referal Mod ... Nejis 100% works as long as you follow the instructions. But on his post he did one thing wrong. In the last large chunk of code, add before not after ;) Quote Link to comment Share on other sites More sharing options...
Mike09 Posted June 1, 2009 Share Posted June 1, 2009 Re: Looking for a Referal Mod ... <?php include 'globals.php'; $ql = sprintf( "SELECT u.userid, u.username, u.laston, r.refTIME " . "FROM users u " . "LEFT JOIN referals r ON (u.userid = r.refREFED) " . "WHERE (r.refREFER = %u)", $ir['userid']); $ql = $db->query($ql); $st=$db->num_rows($ql); print "<h3>You have referred $st people.</h3>"; if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3>Referred Users</h3> <table border='0' cellspacing='0' cellpadding='0' width='100%' class='table'> <tr height='18'> <th>User</th> <th>Time refered</th> <th>Last Online</th> <th>Contact</th> <th>Status</th> </tr>"; while($r=$db->fetch_row($ql)) { print "<tr> <td> [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['refTIME']}</td> <td>".date('F j, Y, g:i:s a',$r['laston'])."</td> <td>[url='mailbox.php?action=compose&ID={$r[']Contact[/url]</td> <td>$on</td> </tr>"; } ?> Should work fine.. Quote Link to comment Share on other sites More sharing options...
fbiss Posted June 1, 2009 Share Posted June 1, 2009 Re: Looking for a Referal Mod ... Markwick , this category is for posting new mods, NOT Requesting mods. Please follow the board directions when posting here. Quote Link to comment Share on other sites More sharing options...
Macintrash Posted July 19, 2009 Share Posted July 19, 2009 Re: Looking for a Referal Mod ... Fatal error: Call to a member function on a non-object in /home/unive21/public_html/halloffame.php on line 155 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.