vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Reason for banning (https://vborg.vbsupport.ru/showthread.php?t=67829)

Slybone 07-31-2004 02:19 PM

Reason for banning
 
When Banning a user I want to have a area where the admin/smod/mod can enter a reason for banning that user. then when you go to View Banned Users it displays the reason after Ban Period and Before Ban Will be Lifted on.

If anyone could help me out on this It would be greatly apreaciated

Thanks
-Slybone

nexialys 07-31-2004 08:33 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=59540" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=59540</a>

Slybone 07-31-2004 10:36 PM

Quote:

Originally Posted by nexialys

Yes, I had seen that however what I am looking for is different... I want it to actually display the reason on the "View Banned Users"

Andreas 07-31-2004 10:41 PM

https://vborg.vbsupport.ru/showpost....48&postcount=3
Let me know if it does work :)

Slybone 08-01-2004 01:18 AM

Hmmm, Lets see here...
After applying this Mod after banning a user I get a SQL error...

Quote:

Database error in vBulletin 3.0.3:

Invalid SQL:
SELECT user.userid, user.username, user.usergroupid AS busergroupid,
userban.usergroupid AS ousergroupid,
IF(userban.displaygroupid = 0, userban.usergroupid, userban.displaygroupid) AS odisplaygroupid,
bandate, liftdate, userban.banreason
adminuser.userid AS adminid, adminuser.username AS adminname
FROM user AS user
LEFT JOIN userban AS userban ON(userban.userid = user.userid)
LEFT JOIN user AS adminuser ON(adminuser.userid = userban.adminid)
WHERE user.usergroupid IN(8)
ORDER BY userban.liftdate ASC, user.username

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '.userid AS adminid, adminuser.username AS adminname
FROM use

mysql error number: 1064

Date: Saturday 31st of July 2004 10:15:00 PM
Script: http://www.neotek-networks.com/forums/modcp/banning.php
Referer: http://www.neotek-networks.com/forum...Dedit%26u%3D26
Username: Slybone
IP Address: 68.105.64.197

Andreas 08-01-2004 10:07 AM

There is a , missing after banreason.

Slybone 08-01-2004 03:40 PM

I see, works perfectly thanks

*EDIT* Is there anyway I can make it mandatory to enter a reason when banning a user?

Andreas 08-01-2004 08:30 PM

Quote:

Originally Posted by Slybone
*EDIT* Is there anyway I can make it mandatory to enter a reason when banning a user?

Yes, this is possible.

Slybone 08-02-2004 01:35 AM

how would that be done?

Andreas 08-02-2004 01:49 AM

  1. Add the following phrase to phrasegroup Control Panel Stop Messages:
    varname=no_reason_given
    text=You must enter a reason why you are going to ban this user
    (Or any other text you would like to have as an error message if no reason is given)
  2. In modcp/banning.php FIND
    PHP Code:

    // check that the target usergroup is valid 

    ABOVE that ADD
    PHP Code:

    if (!$banreason) {
      
    print_stop_message('no_reason_given');




All times are GMT. The time now is 02:25 PM.

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.01160 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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