Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
SuperMods can Unban from ModCP! Details »»
SuperMods can Unban from ModCP!
Version: 1.00, by N9ne N9ne is offline
Developer Last Online: Jul 2019 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-10-2003 Last Update: Never Installs: 14
 
No support by the author.

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.
--------------------------------------------------------------------

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 02-16-2003, 04:45 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Zelda-King
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.
There's your problem. Replace all 8s with 10s.
Reply With Quote
  #23  
Old 02-16-2003, 04:47 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #24  
Old 02-16-2003, 04:58 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #25  
Old 02-28-2003, 07:37 PM
MetroSports82's Avatar
MetroSports82 MetroSports82 is offline
 
Join Date: Nov 2002
Location: NJ
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1"<td nowrap><a href="user.php?action=ban&userid=$user[userid]"><p>[ban]</p></a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href="user.php?action=viewuser&userid=$user[userid]"><p>[view profile]</p></a></td>""").iif($user['usergroupid'] == 8"<td nowrap><a href="user.php?action=unban&userid=$user[userid]"><p>[<b>unban</b>]</p></a></td>""")."</tr>\n"
REPLACE WITH:
PHP Code:
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1"<td nowrap><a href="user.php?action=ban&userid=$user[userid]"><p>[ban]</p></a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href="user.php?action=viewuser&userid=$user[userid]"><p>[view profile]</p></a></td>""").iif($perms[ismoderator] or $ismod['canviewprofile']==1"<td nowrap><a href="user.php?action=unban&userid=$user[userid]"><p>[unban]</p></a></td>""")."</tr>\n"
also, whatever your "Banned by Moderators" usergroupid is, it should be replaced by that.

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.
Reply With Quote
  #26  
Old 02-28-2003, 08:56 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #27  
Old 02-28-2003, 09:15 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad it's worked out for you .
Reply With Quote
  #28  
Old 03-15-2003, 09:16 AM
Robink Robink is offline
 
Join Date: Feb 2003
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When my SuperMods unBan someone, his/her user title remains as "Banned" ... Any idea how I can change that?
Reply With Quote
  #29  
Old 03-15-2003, 05:05 PM
Jethro
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #30  
Old 03-16-2003, 03:36 AM
MetroSports82's Avatar
MetroSports82 MetroSports82 is offline
 
Join Date: Nov 2002
Location: NJ
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #31  
Old 03-16-2003, 06:13 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This one would be good for Filburt, because he can't unban me from vbT ... )
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05019 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete