vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - afterfl0w's Advanced Banlist (https://vborg.vbsupport.ru/showthread.php?t=123800)

SportsZone 08-27-2006 08:08 AM

I have banned 2 members after in stalling the hack and they don't show in the banlist
http://www.sportszonefanatics.com/showbans.php

edit: I figured it out.

Is there any chance this hack could be coded so the last banned member shows up on the forum home page, please?

Also, when you edit the postbit template for the ban link, is it possible to somehow have the ban link appear in the profile drop downlink.

Great hack :)

b6gm6n 08-27-2006 05:59 PM

I like this mod... but i believe showing a [ ban user ] link for everyone shouldnt be the case... i think a drop down from a users profile upon clicking thier username would be much better and would tidy the postbits up a bit

-b6

EasyTarget 08-29-2006 03:55 PM

great mod/idea. I added it to the dropdown by editting the postbit and postbit legacy templates after the
HTML Code:

        <if condition="$post['userid'] AND $show['member']">
        <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
        </if>

I added:
HTML Code:

<!-- afterflows banlist -->
<if condition="$bbusergroup[usergroupid]==6 OR can_moderate($forum[forumid], '', $bbuserinfo[userid])">
<if condition="$post[usergroupid]!=8">
 
<tr><td class="vbmenu_option"><a href="javascript:void(0);" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]&bannedpost=showthread.php?p=$post[postid]&postid=$post[postid]','ban','width=500,height=375,scrollbars=yes')">Ban User</a></td></tr>

</if> 
<if condition="$post[usergroupid]==8">

<tr><td class="vbmenu_option"><a href="javascript:void(0);" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')">Unban User</a></td></tr>
 
</if>
</if>
        <!-- /end afterflows banlist -->

I'm guessing usergroup id 20 is a custom banned usergroup for afterflow?

I love how you can select which bans to have shown on the page but this bug occurred for me:
I was trying to remove a ban from the ban list in the admincp. I ticked the box for the most recent ban and then clicked delete bans. It then removed the oldest ban instead of the ban I was trying to remove.. each time I repeated it would do the same thing.

also, possible bug, but maybe its supposed to behave like this. I banned a user to test the banlist, it showed up find and the post was edited fine, however when I unbanned the user by clicking unban then the user still showed up on the banlist and the bantime was empty, just had ().

Suggestion:
make it so you can administer the bans from the showbans.php itself if you're in the appropriate usergroups.
make the admin pages match the admincp style.
add a section where you can edit the bans reason + link.
I like how you let us decide whether to edit the post or not, maybe as well you can let us choose the text/format which is added to the post.

SportsZone 08-29-2006 04:09 PM

EasyTarget: Awesome stuff! Thanks :)

Is there any chance this hack could be coded so the last banned member shows up on the forum home page, please?

b6gm6n 08-29-2006 06:30 PM

Nice one ET!

-b6

EasyTarget 08-30-2006 09:10 PM

I found there were a few bugs in that code still and I think this will fix it[html]
Code:

<!-- afterflows banlist -->
<if condition="$bbusergroup[usergroupid]==6 OR can_moderate($forum[forumid], '', $bbuserinfo[userid])">
<if condition="$post[usergroupid]!=8">
 
<tr><td class="vbmenu_option"><a href="javascript:void(0);" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]&bannedpost=showthread.php?p=$post[postid]&postid=$post[postid]','ban','width=500,height=375,scrollbars=yes')">Ban User</a></td></tr>

</if> 
<if condition="$post[usergroupid]==8">

<tr><td class="vbmenu_option"><a href="javascript:void(0);" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')">Unban User</a></td></tr>
 
</if>
</if>
        <!-- /end afterflows banlist -->

Now when you ban a user and you click on their name in the postbit you'll see the unban option but not the ban one anymore.

SportsZone 08-30-2006 09:26 PM

So I am presuming we just remove the previous code you wrote and add this new code instead?

EasyTarget 08-30-2006 10:48 PM

yeah, I edited my previous post as well.

SportsZone 08-30-2006 11:10 PM

Awesome, thanks :)

EasyTarget 08-31-2006 11:22 PM

haha sorry guys, that code I posted still let everyone see the ban user option (of course they couldn't really ban a user, but they could still see the option). Got some help and this is verified to work.

This is the new code.. you only see ban/unban if you're an admin and you only see ban when a user isn't banned yet and only unban if they're already banned.

Code:

<!-- afterflows banlist -->
<if condition="$bbusergroup[usergroupid]==6 OR can_moderate($forum[forumid], '', $bbuserinfo[userid])">
 
<if condition="$post[usergroupid]!=8">
 
<tr><td class="vbmenu_option"><a href="javascript:void(0);" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]&bannedpost=showthread.php?p=$post[postid]&postid=$post[postid]','ban','width=500,height=375,scrollbars=yes')">Ban User</a></td></tr>

</if>
 
<if condition="$post[usergroupid]==8">

<tr><td class="vbmenu_option"><a href="javascript:void(0);" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')">Unban User</a></td></tr>
 
</if>

</if>
        <!-- /end afterflows banlist -->



All times are GMT. The time now is 11:11 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.01208 seconds
  • Memory Usage 1,751KB
  • 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_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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