Back to vBulletin 3.6 Add-ons

Ban Info on User Profile
Mod Version: 1.0.2, by zappsan

This modification is in the archives.
vB Version: 3.6.1 Rating: (4 votes - 4.75 average) Installs: 65
Released: 29 Sep 2006 Last Update: 30 Sep 2006 Downloads: 238
Not Supported Uses Plugins Template Edits Additional Files  

3.7 version can be found here: Ban Info on User Profile

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

Spoiler (click to open)


Hello zappsan,
I've set a improvement of baninfo.php because $db->query is deprecated on vb 3.6.1

PHP Code:
// 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

Close

[30/9/2006] Version 1.0.1: Fixed the HTML bugs found by flash7 here

Spoiler (click to open)


Hi, nice plugin

I found a small bag:
search:
PHP Code:
echo 'Forever'
replace
PHP Code:
echo 'Forever</td>'
search:
PHP Code:
echo $bannedby['username'].'</dd></tr></table><br />'
replace:
PHP Code:
echo $bannedby['username'].'</td></tr></table><br />'

Close

You need to reupload the baninfo.php if you want to apply the changes.
[29/9/2006] Version 1.0.0: First public release

Download

This modification is archived, downloads are still allowed.

File Type: %1$s baninfo_on_userprofile_1_0_2.zip (1.3 KB, 418 downloads)

Similar Mods

Profile Enhancements Ban Info on User Profile vBulletin 3.7 Add-ons

vblts.ru supports vBulletin®, 2022-2024