vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   SuperMods can Unban from ModCP! (https://vborg.vbsupport.ru/showthread.php?t=48814)

N9ne 02-16-2003 04:45 PM

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.

Zelda-King 02-16-2003 04:47 PM

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.

N9ne 02-16-2003 04:58 PM

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

MetroSports82 02-28-2003 07:37 PM

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.

Zelda-King 02-28-2003 08:56 PM

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

N9ne 02-28-2003 09:15 PM

Glad it's worked out for you :).

Robink 03-15-2003 09:16 AM

When my SuperMods unBan someone, his/her user title remains as "Banned" ... Any idea how I can change that?

Jethro 03-15-2003 05:05 PM

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:)

MetroSports82 03-16-2003 03:36 AM

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

gmarik 03-16-2003 06:13 AM

This one would be good for Filburt, because he can't unban me from vbT ... :o)


All times are GMT. The time now is 07:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01127 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete