View Full Version : Profile Enhancements - Ban Info on User Profile
zappsan
09-28-2006, 10:00 PM
3.7 version can be found here: https://vborg.vbsupport.ru/showthread.php?t=188670
What does this hack do?
If a user has been banned it will display information about the ban (ban date, reason and the person who has banned the user) on the user's profile.
Demo: http://piforums.info/member.php?u=44
This is my first hack and I hope everything will work correctly :)
Don't redistribute it without my permission.
Updates:
[30/9/2006] Version 1.0.2: Added improvements posted by flash7 here (https://vborg.vbsupport.ru/showpost.php?p=1086845&postcount=21)
[30/9/2006] Version 1.0.1: Fixed the HTML bugs found by flash7 here (https://vborg.vbsupport.ru/showpost.php?p=1086473&postcount=16)
You need to reupload the baninfo.php if you want to apply the changes.
[29/9/2006] Version 1.0.0: First public release
zappsan
09-29-2006, 12:19 AM
Reserved.
Enigm@tic
09-29-2006, 01:08 AM
Thanks, i m installing...
Keyser S?ze
09-29-2006, 01:55 AM
man tthat is great! this needs to be motm ;p
Yorixz
09-29-2006, 04:48 AM
Thanks a lot, it's a shame vB doesn't have this by default.
Masiello
09-29-2006, 05:28 AM
That's great
Kuimera
09-29-2006, 07:25 AM
Tks for this m8.
TMM-TT
09-29-2006, 08:33 AM
I changed the code a bit to use vbphrases instead of static text.
Nice one! Thanks! :)
ecansel
09-29-2006, 09:40 AM
Thanks.. Working good..
Yorixz
09-29-2006, 11:59 AM
Doesn't seem to work here at all sadly, I'm receiving just this warning and no other data; "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ftpusers/otfans/html/baninfo.php on line 5"
Anyone has a clue on how to fix that? I'm using MySQL version 4.1.15.
lanc3lot
09-29-2006, 12:13 PM
Hello its worked like a charm. My only prob is that it doesnt do the line on the nickname as it shown on the demo page. Is there any way i can do this also?
Ty in advance, nice plugin :)
Snake
09-29-2006, 02:00 PM
Wow! Just want I needed. :) Thanks!
Neal-UK
09-29-2006, 02:34 PM
Hello its worked like a charm. My only prob is that it doesnt do the line on the nickname as it shown on the demo page. Is there any way i can do this also?
Ty in advance, nice plugin :)
You need to use the html markup box in the banned usergroup via admincp for that effect ;)
lanc3lot
09-29-2006, 03:00 PM
Oh, can u please tell me what to write there?:)
zappsan
09-29-2006, 09:53 PM
Thanks to everyone who has installed this, I didn't expect to get that many installs^^
Doesn't seem to work here at all sadly, I'm receiving just this warning and no other data; "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/ftpusers/otfans/html/baninfo.php on line 5"
Anyone has a clue on how to fix that? I'm using MySQL version 4.1.15.
Have you got any other hacks installed which could cause a problem?
Oh, can u please tell me what to write there?:)
Use <s> to strike out usernames.
flash7
09-29-2006, 10:25 PM
Hi, nice plugin :)
I found a small bag:
search:
echo 'Forever';
replace
echo 'Forever</td>';
search:
echo $bannedby['username'].'</dd></tr></table><br />';
replace:
echo $bannedby['username'].'</td></tr></table><br />';
zappsan
09-29-2006, 11:36 PM
Thanks, I just fixed it and re-uploaded it.
bada_bing
09-30-2006, 01:06 AM
Will this work for the vb 3.5.x versions
Keyser S?ze
09-30-2006, 08:08 AM
might want to update the mod info in the release, and i would think putting the ver. number in the zip title would be nice i always like that, so ppl know the zip has been updated
Yorixz
09-30-2006, 08:18 AM
Thanks to everyone who has installed this, I didn't expect to get that many installs^^
You're welcome :p
Have you got any other hacks installed which could cause a problem?
Such as? I haven't got a single hack that should do anything with the userprofile, so I'm afraid I wouldn't know what could possibly be causing this.
Edit;
flash7, you're my hero ;) That code indeed seems to fix my trouble (and the trouble of others, as this should be happening to everyone with 3.6.1 if I read your post), thanks a lot.
flash7
09-30-2006, 11:26 AM
Hello zappsan,
I've set a improvement of baninfo.php because $db->query is deprecated on vb 3.6.1
// Ban Info on User Profile Hack ? 2006 by zappsan (http://piforums.paulhq.com)
$baninfo = $db->query_first_slave("SELECT * FROM " . TABLE_PREFIX . "userban WHERE userid=" .$userinfo['userid']);
if ($baninfo['userid'])
{
echo '<table class="tborder" cellspacing="1" cellpadding="3" width="100%">
<tr>
<td class="tcat" colspan="3">Ban Information</td>
</tr>
<tr>
<td class="alt1"><b>Time banned: </b>';
if ($baninfo['liftdate'] == '0')
{
echo 'Forever</td>';
}
else
{
$bandate = vbdate($vbulletin->options['dateformat'], $baninfo['bandate'], false);
$liftdate = vbdate($vbulletin->options['dateformat'], $baninfo['liftdate'], false);
echo 'From '.$bandate.' to '.$liftdate.'</td>';
}
if (empty($baninfo['reason']))
{
echo '<td class="alt1"><b>Reason:</b> None</td>';
}
else
{
echo '<td class="alt1"><b>Reason:</b> '.$baninfo['reason'].'</td>';
}
echo '<td class="alt1"><b>Banned by: </b>';
$bannedby = $db->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid=" .$baninfo['adminid']);
echo $bannedby['username'].'</td></tr></table><br />';
}
let me know if all right :)
zappsan
09-30-2006, 07:21 PM
Will this work for the vb 3.5.x versions
I didn't test it with 3.5.x yet.
I might try it later.
might want to update the mod info in the release, and i would think putting the ver. number in the zip title would be nice i always like that, so ppl know the zip has been updated
I updated the info and added the version number to the zip file now :)
Edit;
flash7, you're my hero ;) That code indeed seems to fix my trouble (and the trouble of others, as this should be happening to everyone with 3.6.1 if I read your post), thanks a lot.
It worked fine for me with 3.6.1, strange.
But good to see you haven't got problems anymore :)
Hello zappsan,
I've set a improvement of baninfo.php because $db->query is deprecated on vb 3.6.1
....let me know if all right :)
I added it, thanks :)
Keyser S?ze
10-01-2006, 02:38 AM
can this be made into a product?
SportsZone
10-01-2006, 10:28 AM
Nice hack, thanks :)
Medina
10-05-2006, 11:57 AM
How to change the English text to your own language? I'v tried the Language manager by searching for "Time Banned:" But with no results.
Can you help me please.
zappsan
10-05-2006, 07:43 PM
can this be made into a product?
Why would you want it to be a product?
Well, I'm probably going to do some changes/updates and I'll look into it.
I can't promise anything though.
How to change the English text to your own language? I'v tried the Language manager by searching for "Time Banned:" But with no results.
Can you help me please.
I didn't add any phrases to this hack, so you won't find them.
If you want different words to be displayed, edit the "baninfo.php" and replace the bold words with your own ones.
I'm planing to add phrases though.
if ($baninfo['userid'])
{
echo '<table class="tborder" cellspacing="1" cellpadding="3" width="100%">
<tr>
<td class="tcat" colspan="3">Ban Information</td>
</tr>
<tr>
<td class="alt1"><b>Time banned: </b>';
if ($baninfo['liftdate'] == '0')
{
echo 'Forever</td>';
}
else
{
$bandate = vbdate($vbulletin->options['dateformat'], $baninfo['bandate'], false);
$liftdate = vbdate($vbulletin->options['dateformat'], $baninfo['liftdate'], false);
echo 'From '.$bandate.' to '.$liftdate.'</td>';
}
if (empty($baninfo['reason']))
{
echo '<td class="alt1"><b>Reason:</b> None</td>';
}
else
{
echo '<td class="alt1"><b>Reason:</b> '.$baninfo['reason'].'</td>';
}
echo '<td class="alt1"><b>Banned by: </b>';
$bannedby = $db->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid=" .$baninfo['adminid']);
echo $bannedby['username'].'</td></tr></table><br />';
}
bonjurkes
10-14-2006, 04:46 PM
when i try to visit baninfo.php
domainname.com/forum/baninfo.php i am getting an error like
Fatal error: Call to a member function on a non-object in /home/bonjurke/public_html/forum/baninfo.php on line 4
zappsan
10-14-2006, 05:59 PM
when i try to visit baninfo.php
domainname.com/forum/baninfo.php i am getting an error like
Well, the ban info will only work when you view the profile of a banned user, trying to visit the file alone wont work.
That's how it's meant to be.
Wild-Wing
11-04-2006, 09:06 PM
this is a cool idea.
Bounce
12-31-2006, 03:45 PM
how do you take the info off ....for instance if you reinstate someone..
it still shows them as banned :tired:
ajschamps
01-02-2007, 03:05 PM
Is the info able to be shown to all members? Or just mod/admins?
zappsan
01-02-2007, 04:53 PM
how do you take the info off ....for instance if you reinstate someone..
it still shows them as banned :tired:
It shouldn't.
The ban info is only disp?layed when someone is banned.
If you still see it, them person must still be banned.
Is the info able to be shown to all members? Or just mod/admins?
Everyone can see it, but you could hide/display it for certain usergroups using conditionals in the templates.
Bounce
01-04-2007, 07:35 PM
It shouldn't.
The ban info is only disp?layed when someone is banned.
If you still see it, them person must still be banned.
Well there posting lol, I banned someone then reinstated them and the info was still there :confused:
Had to uninstall as they complained that they could see they were banned when they were not
dc pringle
01-11-2007, 11:22 AM
Is this meant to work on 3.6.0?
I dont think it is working for me :(
Excellent plugin my friend
Just checked and it only works on people banned after the plugin was installed :(
Still a great plugin tho, excellent :D
Just a suggestion.. An option for showing a record of the banning even if they have been unbanned? I reckon this'd be useful for other mods to see how many times someone has been banned & what for
zappsan
01-11-2007, 11:41 AM
Well there posting lol, I banned someone then reinstated them and the info was still there :confused:
Had to uninstall as they complained that they could see they were banned when they were not
Strange...
The file actually looks for an entry in the banned users table and only displays the banned info when an entry is found.
Are you sure you there isn't any ban info in the table anymore?
I just tried out banning someone and then unbanning them and everything is working fine.
Is this meant to work on 3.6.0?
I dont think it is working for me :(
Excellent plugin my friend
Just checked and it only works on people banned after the plugin was installed :(
Still a great plugin tho, excellent :D
Just a suggestion.. An option for showing a record of the banning even if they have been unbanned? I reckon this'd be useful for other mods to see how many times someone has been banned & what for
You mean that it's only showing up when you banned someone after you installed the plugin and not for people who have been banned before (and are still banned)?
That's strange, if they are still banned it should be showing up...
And concerning your idea: I actually already thought about adding something like that.
I actually plan to as well, I hope I'll have the time to make an update to this soon since there are also other things the hack needs (using phrases and templates for example...).
Mr_Snob
01-13-2007, 04:19 PM
That's great idea Thank You Man
Terminatoronly
02-03-2007, 04:27 PM
Nice Mod Installed :D
BobbyBig
02-04-2007, 02:34 PM
This Mod is full of bugs.
Users which got banned through the Warningsystem are not shown.
Also Users which got removed from Ban list still get shown the Ban Info.
Deinstalled.
Keyser S?ze
03-05-2007, 10:39 AM
ya this hack is in major need of an update, i would suggest seting it in the admincp to defined user groups, like if usergroup 15 then it shows up, let there be an option or something
is good hack tho
flash7
06-07-2007, 02:45 PM
tested on vb 3.6.4 work like a charm :)
cristinag
08-20-2008, 12:36 PM
Is this going to be updated for use with 3.7.xx? I just upgraded and now this mod doesn't work. Thanks!
zappsan
08-20-2008, 10:00 PM
I just finished the 3.7 version.
https://vborg.vbsupport.ru/showthread.php?t=188670
Mateusz0307zk
03-09-2011, 04:23 PM
Does anyone learns this in vB4 ?
Good question. I'm still looking for a vb4 equivalent as well. Any suggestions?
zappsan
05-30-2011, 07:19 PM
I would make a version for vB4, but the problem is that I don't own a vB4 license so I have no way to work on it.
Zappsan, I might be able to help. I've got an expired vb3 license with access up to vb4.1.2 PL1 (forum). I wouldn't mind giving you that license if you can update this mod. Does anyone know if vb allows expired vb3 licenses to be transferred?
I also have a spare vb4 Publishing license. It's already been transferred once, so I can't give you that license permanently, but I don't have any plans to use it for the next 6 months. I'd be happy to let you use it temporarily.
Which would you prefer?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.