Oo-Savage-oO Posted February 19, 2011 Posted February 19, 2011 I am trying to make my own honor awards mod, but I want it to auto credit the user he doesnt hav to click on a link. One option is too add the queries in the header.php file. But is it advisable to run 20-30 queries every click Quote
LegendFTW Posted February 20, 2011 Posted February 20, 2011 [align=right][/align]u can just make a if function for examplethis is the one i use for my ranks: if($r['level']<3) { $rank="Private [img=Ranks/rank1.png]"; } else if($r['level']<5 AND $r['level']>=3) { $rank="Corporal [img=Ranks/rank2.png]"; } else if($r['level']<10 AND $r['level']>=5) { $rank="Sergeant [img=Ranks/rank3.png]"; } this ensures everytime they reach a certain level their rank will change with the picture and name of rank :) its basically the same principle this would be added to the viewuser under if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } Quote
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.