vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Profile Enhancements - Ban user since their profile (Quick Ban) (https://vborg.vbsupport.ru/showthread.php?t=232682)

Allan 01-09-2010 10:00 PM

Ban user since their profile (Quick Ban)
 
1 Attachment(s)
This mod add a link in the user profile for the banish.
  • In the "MEMBERINFO" temlate, find:
Code:

<span id="userinfo">
  • Add above:
Code:

<a href="modcp/banning.php?do=banuser&amp;u={vb:raw userinfo.userid}" class="textcontrol imagecontrol">
                <img src="{vb:stylevar imgdir_misc}/cross.png" alt="Ban User" />
            </a>

PS: Usergroups permissions are respected

Candostum 01-13-2010 10:48 AM

Thanks installed.

Alecsmith 01-14-2010 05:43 AM

Thanks installed working fine :)

tini_lam 01-20-2010 09:27 AM

thank :)

Michael1337 01-20-2010 10:18 AM

Thanks Installed

yilmaz68 01-21-2010 02:00 PM

Allan thx bro, installed.

cagbaazee 02-06-2010 01:31 PM

what about moderators, can they banned user or not.

COL NIL SATIS 02-16-2010 09:52 PM

tagged ..looks good

malas2007 02-19-2010 07:53 PM

thanks

Allan 02-19-2010 07:58 PM

Click on Installed i you use it ;)

aouni_tahech 02-22-2010 05:54 PM

Thank you Allan mod. Allow me to mention this. Placing the code immediately above <span id="userinfo"> will make the ban button viewable by everybody. This means that they will be also able to figure out the folder names of Mod CP (In my case, I'm using a custom name different from modcp)

So, the correct place to add the code is BEFORE
Code:

</vb:if>
<span id="userinfo">

This will make the button only apparent to moderators.
Please correct me if I'm wrong. I'm not a professional coder btw.

P.S. I'm using 4.0.2
Thanks!

rooster99ss 02-22-2010 08:16 PM

installed. thank you for the mod

Quote:

Originally Posted by aouni_tahech (Post 1988956)
This will make the button only apparent to moderators.
Please correct me if I'm wrong. I'm not a professional coder btw.

P.S. I'm using 4.0.2
Thanks!

yes, that's the way it worked for me, I double checked it.

whitedd 02-22-2010 09:16 PM

...installed...great mod...

Whtetrashwarrio 03-01-2010 01:13 PM

Thanks installed !

TimberFloorAu 05-21-2010 06:59 AM

Better code would be:

Code:

<vb:if condition="is_member_of($bbuserinfo, 5,6,7)">
<a href="modcp/banning.php?do=banuser&amp;u={vb:raw userinfo.userid}" target="_blank" class="textcontrol imagecontrol">
                <img src="{vb:stylevar imgdir_misc}/cross.png" alt="Ban User" />
            </a></vb:if>

Very good tho, using it :)

merk_aus 06-27-2010 10:36 AM

Wow this is awesome thanks!

joomla 07-01-2010 09:41 PM

Good job

kabir 08-27-2010 01:26 PM

Not Work on 4.0.5

myarmy 09-11-2010 09:31 AM

installed. thx

aspen1018 09-16-2010 01:12 PM

thanks

aspen1018 09-21-2010 07:12 PM

found the problem

vblove 11-07-2010 01:42 PM

very useful mod, thank you

freeoffline 11-30-2010 12:38 PM

10q

COL NIL SATIS 12-09-2010 11:19 AM

tagged

MatiasCandy 12-13-2010 05:36 PM

I like this but can we use a variable for modcp so we do not have to hard code it?

Code:

<a href="modcp/banning.php?.......
What would the vari be?

I know it gets it from the config file:
Code:

$config['Misc']['modcpdir'] = 'modcp';

elwachiman 03-20-2011 10:40 PM

Work In Vb 4.1.2 Perfect

JasonP38 03-25-2011 10:11 PM

installed.


thanks, it works and looks great. :)

akibui 11-18-2011 08:16 AM

tested with 4.1.8 and works great.

hazem_aliraqi 11-18-2011 04:27 PM

nice , thank you installed

hazem_aliraqi 11-18-2011 06:27 PM

With your code will be visible to all members and visitors

What do you think of this code ?? that the admin only can see it and not for all, as is the case with edit profile for user ?

this is the code




PHP Code:

<vb:if condition="$show['edit_profile']"><a href="modcp/banning.php?do=banuser&amp;u={vb:raw userinfo.userid}" class="textcontrol imagecontrol">
                <
img src="{vb:stylevar imgdir_misc}/cross.png" alt="Ban user" />
</
a></vb:if> 


Dante848 11-25-2011 06:22 AM

Here is one for quick infraction
Code:

<a class="redcard" href="infraction.php?{vb:raw userinfo.userid}do=report&amp;u={vb:raw userinfo.userid}" rel="nofollow" title="{vb:rawphrase received_infraction}">
                <img src="{vb:stylevar imgdir_button}/red-card_sm.png" alt="Give Infraction" />
            </a>


Droptop 12-27-2011 06:57 AM

Quote:

Originally Posted by hazem_aliraqi (Post 2269311)
With your code will be visible to all members and visitors

What do you think of this code ?? that the admin only can see it and not for all, as is the case with edit profile for user ?

this is the code




PHP Code:

<vb:if condition="$show['edit_profile']"><a href="modcp/banning.php?do=banuser&amp;u={vb:raw userinfo.userid}" class="textcontrol imagecontrol">
                <
img src="{vb:stylevar imgdir_misc}/cross.png" alt="Ban user" />
</
a></vb:if> 


Thanks, works great! :up:

cjwinternet 07-02-2012 04:22 PM

Quote:

PS: Usergroups permissions are respected


Yeah if you mean that a member can't actually ban someone. They can see the X and it does take them to the control panel.


This mod should be deleted. There's clearly no permissions applied where there should be. Thank god the replies are better than the mod.

aouni_tahech 07-08-2012 10:55 AM

I agree.



Quote:

Originally Posted by TimberFloorAu (Post 2041129)
Better code would be:

Code:

<vb:if condition="is_member_of($bbuserinfo, 5,6,7)">
<a href="modcp/banning.php?do=banuser&amp;u={vb:raw userinfo.userid}" target="_blank" class="textcontrol imagecontrol">
                <img src="{vb:stylevar imgdir_misc}/cross.png" alt="Ban User" />
            </a></vb:if>

Very good tho, using it :)


Hakan39 07-08-2012 12:09 PM

thank you.

Menno11 07-09-2012 12:39 PM

thx installed

Arrogant-One 08-16-2012 07:00 PM

Quote:

Originally Posted by Candostum (Post 1954300)
Thanks installed.

This mod does not work for vB 4.1.12

pasta186 11-01-2012 09:28 AM

This might sound crazy, But is there a search button? Cuz i can't find " <span id="userinfo">"

Stan993 04-27-2014 03:01 PM

wow... tanks


All times are GMT. The time now is 03: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.02522 seconds
  • Memory Usage 1,785KB
  • 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
  • (8)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (39)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