![]() |
SuperMods can Unban from ModCP!
NOTE: Download the attached file and open in txt editor to see instructions!
--------------------------------------------------------------------- Supermods can unban users: by N9ne on 11th Feb 2003, Copyright 2003 --------------------------------------------------------------------- Files to modify: mod/user.php --------------------------------------------------------------------- For: 2.2.x --------------------------------------------------------------------- Description: This hack will add a link next to "View User" in the modCP after searching for a member. The link will read "Unban" and will only show if the user is banned. If the user isn't banned, the link will not show. --------------------------------------------------------------------- Modification: You probably have a usergroup created from the AdminCP in which you put banned users as an admin. You can modify this hack so supermods can unban users in that group too. You may even have more than 2 usergroups for banned users, this hack is fully customizable, just request any customizations you would like in the support thread at vb.org. The instructions in this file will only show you how to make it so supermods can unban users who were banned from the modCP. -------------------------------------------------------------------- |
screen 1.
|
screen 2.
|
screen 3.
|
Note: In screenshot 1, you see Stealth Ban and Parse Error Ban, they're part of other hacks ;). Parse error ban is something I made from my Blank page ban hack ;).
Ignore them, I forgot to take them out of the screen shot ;). |
Wow since DrShark didn't reply to this thread like he always does, I thought I would. Nice work, I may install it...
init |
Nifty :). I created a hack like this for my own forum, actually, since it didn't make sense super mods could ban but not unban if there were a mistake. But I was too lazy to realize it :D.
|
nice work n9ne :)
ok with my mods can edit users this is possible also (indirekt) so i don't need it, but nice :) |
Quote:
|
that's why i said indirect ;)
just move users out of banned group is like unbanning ^^ |
Quote:
__ Anyways, i like this hack the most i don't know why this wasn't in the default vbulletin but now people can easyly add it so good job. |
I did find it odd when I realised that if a supermod accidentally bans someone, they must wait until an admin can fix their silly mistake. Also, what if a user is to be unbanned! Only the admins could do it...what's the point of supermods if they're not going to do all the work hey :D
|
The script isn't working for me. I get parse errors around lines 69-72 or something like that. For a start, are those 'if's supposed to be spelt 'iif'?
|
Quote:
|
It's OK. I made a mistake. Sorry about that (it was first thing in the morning)!
However, I'm not getting the link for 'unban'. Also, if I type in the URL to unban from the mod cp it leads me nowhere (and yes I did check that the usergroup ID matched the hack). For the record, I'm using vB 2.2.9. |
You shouldn't be typing in a URL to unban users. That wouldn't work. As for the link to unban, you can only get the unban link in the modCP, regardless of usergroup, if the user was banned by moderators.
|
Yes, I tried it in the mod cp. No 'unban' link came up (which is why I tried to type in that 'action=unban&userid=xx').
Well, here's how I have the script (with those 'parse ban/stealth ban' links removed). EDIT: OK, I can now type in the url to unban and it will unban. I could make the 'unban' link a regular one and that would work but the 'conditional link' in this hack still doesn't. Also, after unbanning I am not redirected anywhere after the unban. I get the '[userid] has been unbanned' but I don't get taken off the 'unban confirm' screen. That aside, this is good. I've long wanted a mod-unban hack to be released. |
That's correct, the confirmation screen should stay, and a message appear below it stating they're unbanned.
I'll look into your problem. |
Ok, I've updated the instructions file. Please clear your temp internet files and download it again and repeat step 1.
|
The conditional link thing still isn't working for me. At the moment I've made it a permanent one seeing as I can't locate the problem. The code looks sound to me. Speaking of which, it's apparant that there's no error message when one attempts to unban someone not 'banned by moderators' even though I see such a message in your code. Of course, that wouldn't really matter considering the link is only supposed to show with users that fit the criteria for unbanning. For the record, the 'unban confirmation' table DOES only appear if the usergroupid is 8. Just not the unban link.
My 'banned by moderators' usergroup ID is actually 10. I don't know if that goes for everyone else or whether it depends what version of vBulletin you're using (I doubt it). This isn't the cause of any problems though. I suppose it's because my usergroup 8 is actually an admin ban which I created before moderators had banned anyone. Personally I reckon the hack would be better if the 'unban confirmation' table didn't remain after an unban but rather you got a blank screen with the 'unbanned' message, just like you get the 'banned' one when banning. The 'confirm ban' table doesn't remain. I just noticed that if you then try to unban again (just after already unbanning a user) it gives the 'unbanned' message again and this time the 'confirm unban' table disappears (just how I think it should). Nevertheless, the unban itself works fine. |
Quote:
|
Yeah, I did that. I tried it both ways. I mean, even with the '8's I should then be able to see the link for users in the other 'banned' group seeing as my usergroup 8 is another ban-group.
|
All numbers should match though. That's the way it works. Make sure that in my instructions, you replace all the 8s with 10. If you already did that though, that's fine, but i don't understand why it's not working...
|
Zelda-King-
I too had the same exact problem, that you had been expirencing, but when I tried this, it worked. unfortunately, i don't know enough yet, to figure out how to get the original code to work for just super mods. so instead, this will also work for any moderators, that have the "banning" permission enabled. anyway, here goes. :) Open mod/user.php FIND: PHP Code:
PHP Code:
for ex. in the original hack it has written, if ($banuser['usergroupid'] == 8) { you should replace the #8 with whatever usergroupid you have, for your "Banned by Moderators" usergroupid. Give that a try, and let me know if it works. :) Oh and BTW nice hack. Got it working on v2.2.9 Thanks, Metro. |
Yeah, I'm using pretty much that very code. It just makes the unban thing appear regardless. Seeing as there's an adequate error message if you try to unban someone not fitting the criteria I have no problems so far. :)
|
Glad it's worked out for you :).
|
When my SuperMods unBan someone, his/her user title remains as "Banned" ... Any idea how I can change that?
|
Er ... stoopid newbie question number 1.
ModCP ???? Is that a standard vBulletin feature ? Haven't notice one, and if it is standard wouldn't mind pointing it out to the mods :) Cheers and thanks in advance (hey what does this big red button do :gg:) |
Jethro. Not sure what your saying? Mod CP is just like an Admin CP, but for moderators. Your mods can access it through a link. Similar to how you would log into your Admin CP, but instead of typing in the text "admin" type in "mod". So, for example...
http://yousite.com/mod/ Any how, yes it is standard for vB. :) |
This one would be good for Filburt, because he can't unban me from vbT ... :o)
|
vBt uses vB 3.0.0...and it doesn't allow them to unban users? I'm sure it does :confused:
|
For those who've been having problems with the unban link not showing up, I've found the problem.
In /mod/user.php Find: PHP Code:
PHP Code:
|
Hmm, that's odd how it didn't select the usergroupid, thanks for posting up the fix though, I was clueless as I had it working on my forum, I probably did modify that query as you've posted in your post, but just forgotten to add it into the instructions!
|
i cant get this to work on 2.3.0
|
First of all, this was actually originally found HERE by n9ne
However the code was erroring, and it also had excess code in it and proved to be insufficient. I took the code and fiddled around with it, because i had been looking for something similar and didnt feel like writing my own hack, however i ended up doing it anyway ~_~ and also rewrote the instructions. Now anyway, this will replace the [ban] link in the MOD control panel, with [unban] for users which are banned when searching for them. Then it unbans (i bet you werent expecting that), similarly to the way in which you ban users in the first place. The instructions include information for things like changing the usergroupid which the banned users are in, and also for multiple banned groups, and for changing the usergroup the unbanned users go into. changing things is simple enough however if you need specific coding done just post it and ill post back the fix. Works for ALL 2.x.x boards, 4 edits to mod/user.php have fun... |
All times are GMT. The time now is 04:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|