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