MyBB Community Forums

Full Version: Need help with simple php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, I saw today a small php snippet that ads an option to do a whois lookup on a user next to their ip address in the "who's online" of the forum. I'm trying to add an optino that does a permaban.

I just want to be able to click a link that just permanently bans the member i click the link on. I'm going to be putting this link next to every username everywhere on the forum (need to make sure only mods and admins can see it).

here's what i got so far:

<span class="smalltext">{$lang->ip} {$user['ip']} <a href="modcp.php?action=banuser&amp;search_users=1">[PermaBan]</a></span>

I haven't finished it yet, but i've been trying to click on the link to see if it'll at least just fill out the form for me in the modcp, but it doesn't even do that.

anyone have any ideas on how to do this?
nevermind. I found a plugin that does it for me somewhere and took the link in the plugin and pasted it in the whois file. if you get this plugin and paste the following into the whois templates -> online_row_ip template you'll have a quick ban button straight from there.

http://www.mybbcentral.com/thread-1656-page-1.html

<span class="smalltext"><a href="ban.php?uid=$uid&amp;action=do_ban&amp;my_post_key=$mybb->post_code">[Banage]</a></span>