Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2004, 02:19 PM
Slybone Slybone is offline
 
Join Date: Sep 2003
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 07-31-2004, 08:33 PM
nexialys
Guest
 
Posts: n/a
Default

<a href="https://vborg.vbsupport.ru/showthread.php?t=59540" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=59540</a>
Reply With Quote
  #3  
Old 07-31-2004, 10:36 PM
Slybone Slybone is offline
 
Join Date: Sep 2003
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"
Reply With Quote
  #4  
Old 07-31-2004, 10:41 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

https://vborg.vbsupport.ru/showpost....48&postcount=3
Let me know if it does work
Reply With Quote
  #5  
Old 08-01-2004, 01:18 AM
Slybone Slybone is offline
 
Join Date: Sep 2003
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 08-01-2004, 10:07 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a , missing after banreason.
Reply With Quote
  #7  
Old 08-01-2004, 03:40 PM
Slybone Slybone is offline
 
Join Date: Sep 2003
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see, works perfectly thanks

*EDIT* Is there anyway I can make it mandatory to enter a reason when banning a user?
Reply With Quote
  #8  
Old 08-01-2004, 08:30 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 08-02-2004, 01:35 AM
Slybone Slybone is offline
 
Join Date: Sep 2003
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would that be done?
Reply With Quote
  #10  
Old 08-02-2004, 01:49 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

  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');

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:48 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.04289 seconds
  • Memory Usage 2,254KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete