vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Ban member from post (https://vborg.vbsupport.ru/showthread.php?t=132016)

Alfa1 11-20-2006 10:25 AM

Ban member from post
 
I have searched for a hack to do this, but couldn't find it. If there is such a hack please direct me to it.
How can I enable my mods to ban a member straight from the members it's post without having to go from the post to: member profile -> modcp -> ban member

bashy 11-23-2006 06:16 PM

Hi

Add this to the username (menu) in the postbit template

After this
Code:

    <if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
    <tr><td class="vbmenu_option"><a

href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase

1="$post[username]">Edit User</phrase></a></td></tr>
    </if>

Add this....

Code:

<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><b>Ban or Suspend $post[username]</b></span></td></tr>
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')"><b>Lift Ban on $post[username]</b></span></td></tr>
</if>

I cannot remember if it was part of another hack but i dont think so!!
This is what i have and it works, Sorry i cannot help any further though!

Alfa1 11-23-2006 09:27 PM

Where can I find this template? I have searched my postbit template, but can not find the text you refer to.
I went to: adminCP -> styles & templates -> style manager -> default style -> postbit templates -> postbit

Alfa1 12-28-2006 11:32 PM

The above works, but Bashy made an error and I'm glad he/she did :)

The above should be placed after this:
Quote:

<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>
And this:
Quote:

<if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
<tr><td class="vbmenu_option"><a

href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase

1="$post[username]">Edit User</phrase></a></td></tr>
</if>
Should be:

Quote:

<if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
<tr><td class="vbmenu_option"><a
href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase 1="$post[username]">Edit User</phrase></a></td></tr>
</if>
This code does not exist in the template, but if you add this, your admins will be able to edit the users profile directly from the post. (without logging into the adminCP) I have very happy admins now.

And after that this should be added:
Quote:

<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><b >Ban or Suspend $post[username]</b></span></td></tr>
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes') "><b>Lift Ban on $post[username]</b></span></td></tr>
</if>
Since we almost never unban members, I did not find any sense in adding the last part. So I only did this:
Quote:

<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><b >Ban or Suspend $post[username]</b></span></td></tr>
</if>
So now I have happy mods as well.

Smoothie 12-29-2006 01:51 AM

Very nice!


All times are GMT. The time now is 10:41 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.01110 seconds
  • Memory Usage 1,729KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete