View Full Version : Ban reason field?
Luggruff
05-03-2005, 04:05 PM
Is there a hack for the ability to add a reason to why someone is banned?
We are three admins and it's hard having to explain why each person is banned -_-
mholtum
05-03-2005, 04:43 PM
Just create a Admin Only accessable forum and place the info there. That is what I do.
Luggruff
05-03-2005, 04:55 PM
used to do that.. hard when you're stressed or on the run. Gotta be some way to add a text field just as the field with the number of days.. I have no clue in this scripting language and I don't wanna try and risk something
why-not
05-03-2005, 05:25 PM
used to do that.. hard when you're stressed or on the run. Gotta be some way to add a text field just as the field with the number of days.. I have no clue in this scripting language and I don't wanna try and risk something
Is that all you want is info on the ban?
If so why not just add a table that contains the userid and the ban information <= why they were ban. Then do a join when listing the bans so you can see that information. I try not to add columns to the default db when it's something that is as trival as this. If this is ok I will show you how to do it!
Sonia
Luggruff
05-03-2005, 08:02 PM
yes.. I'd love that!
why-not
05-03-2005, 10:40 PM
yes.. I'd love that!
Hi
Just check back in a few hours I just starting on it now!
Sonia
Dennis Olson
05-03-2005, 11:00 PM
Look - want the easy way? Do what I did. Add a custom profile field (private), labelled "Ban Reason". I also have a template conditional in the header template that will display that reason to the banned user if they attempt to use the board. Took 5 minutes. Simple and easy. I also have an "administrator comments" text-field where staff can add whatever comments they like. Again, a private field.
mholtum
05-03-2005, 11:32 PM
Look - want the easy way? Do what I did. Add a custom profile field (private), labelled "Ban Reason". I also have a template conditional in the header template that will display that reason to the banned user if they attempt to use the board. Took 5 minutes. Simple and easy. I also have an "administrator comments" text-field where staff can add whatever comments they like. Again, a private field.Mind sharing the conditional?
Dennis Olson
05-04-2005, 12:17 AM
I'll share the code. Here you go... Header template, just above
$_phpinclude_output
Add:
<if condition="$bbuserinfo[usergroupid] == 8">
<div align="left" style="color: red; background-color: white; border: 1px solid black; padding:2px">
<b>Your membership has been terminated.<br /><br />
<if condition="$bbuserinfo[fieldX]">
Reason: $bbuserinfo[fieldX]
</if>
</b>
</div>
</if>
Where "fieldX" is the assigned name of your custom private user field.
Also assuming usergroup 8 = your BANNED usergroup.
mholtum
05-04-2005, 12:25 AM
sweet thanks
asianboi
05-04-2005, 03:20 AM
how can i make it show in the banning.php?do=modify instead of the user profile?
Example:
User Name Banned By Banned On Ban Period Ban Will Be Lifted On Ban Time Remaining Lift Ban Reason
Kila_Bite
05-04-2005, 12:45 PM
Yeah this hack would be useful for me too. Asianboi hit it right on the head. If someone could code this it'd be kinda cool. Sorry to be sponging off good coders but im clueless when it comes to PHP lol.
why-not
05-04-2005, 02:12 PM
how can i make it show in the banning.php?do=modify instead of the user profile?
Example:
User Name Banned By Banned On Ban Period Ban Will Be Lifted On Ban Time Remaining Lift Ban Reason
That's how I was going to do it, but I figured the person was happy with the profile field method so I did not post mine. My idea is to have it in the admin panel and have a text field that you can input the reason for the ban and also have a select (radio) option that allows you to have the reason show up on the forum as a error message to the ban user, with full details of the ban! (Yes or No) option!
No extra query, done doing a stright join instead of a select on a single table!
Sonia
asianboi
05-04-2005, 02:27 PM
I like that idea and that's what I need WHY-NOT
Can you share it with us? or at least with me?
wrongful
05-04-2005, 03:59 PM
There are two hacks that I am aware of that have a reason field built into them. The first would be the Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105) and the second would be Terry's Show Banned Users List Hack (https://vborg.vbsupport.ru/showthread.php?t=70293), which is mine and pretty much serves the purpose of informing people who banned who and why. Hope this helps.
asianboi
05-04-2005, 04:20 PM
somehow my navbar does not work with AWS so i gotta let that go...
Kila_Bite
05-05-2005, 12:31 PM
That's how I was going to do it, but I figured the person was happy with the profile field method so I did not post mine. My idea is to have it in the admin panel and have a text field that you can input the reason for the ban and also have a select (radio) option that allows you to have the reason show up on the forum as a error message to the ban user, with full details of the ban! (Yes or No) option!
No extra query, done doing a stright join instead of a select on a single table!
Sonia
Now that sounds cool. Would it be possible to release it? Or at least provide me with the code? A release'd be better though. I think it could really bennefir the Vb community ;)
Dennis Olson
05-05-2005, 04:09 PM
All you'd have to do is add a custom private radio-button pair under the Ban Reason field, then add an additional conditional to the header template add-in. Should take about 30 seconds.
asianboi
05-07-2005, 04:11 AM
All you'd have to do is add a custom private radio-button pair under the Ban Reason field, then add an additional conditional to the header template add-in. Should take about 30 seconds.
if we were that goood we would not even post for help... Thanks Mr. Olson. It would be much better if you can tell us how to do it.
Dennis Olson
05-09-2005, 03:14 PM
Sorry, not thinking.
AdminCP, USER PROFILE FIELDS, Add New User Profile Field.
You will be prvided with a Field number. The name of your new field will be "field" + that number.
MAKE SURE the field is set to PRIVATE, the user can NOT edit it, and it does NOT appear in the Memberlist. Then just add the conditional I outlined above, and replace "fieldX" with your field name.
BTW, this is NOT a hack; it's a new profile field + the addition of a template conditional. You can ask for help on this ovfer at vB.com also.
asianboi
05-11-2005, 05:06 PM
oh no.. i've done this already, but that is not what I want...
That's how I was going to do it, but I figured the person was happy with the profile field method so I did not post mine. My idea is to have it in the admin panel and have a text field that you can input the reason for the ban and also have a select (radio) option that allows you to have the reason show up on the forum as a error message to the ban user, with full details of the ban! (Yes or No) option!
No extra query, done doing a stright join instead of a select on a single table!
Sonia
this is what I need
Jenta
05-11-2005, 06:23 PM
I like that idea and that's what I need WHY-NOT
Can you share it with us? or at least with me?
share it with all of us :)
this should be standard vb stuff
Dennis Olson
05-12-2005, 01:37 PM
It's just as easy using the method I posted earlier. Instead of one field, you create two - one is a text entry field, and one is a radio-button select. Both are private, non-user-editable fields. Then change the condition in the header from if there's anything in the reason field, to if the desired radio button is checked.
All done. Takes an extra minute or so to create that second field....
;)
It would be coded like this:
<if condition="$bbuserinfo[usergroupid] == 8">
<div align="left" style="color: red; background-color: white; border: 1px solid black; padding:2px">
<b>Your membership has been terminated.<br /><br />
<if condition="$bbuserinfo['fieldY'] == 'show'">
Reason: $bbuserinfo[fieldX]
</if>
</b>
</div>
</if>
Assuming "fieldY" is your radio-button field, and "show" is one of the options.
Again, this method is NOT A HACK. It's the addition of 2 custom user-profile fields, and a change to the header template.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.