vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Profile Enhancements - Ban Info on User Profile (https://vborg.vbsupport.ru/showthread.php?t=127809)

zappsan 09-28-2006 10:00 PM

Ban Info on User Profile
 
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
[30/9/2006] Version 1.0.1: Fixed the HTML bugs found by flash7 here
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

Quote:

Originally Posted by lanc3lot
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^^

Quote:

Originally Posted by Yorixz
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?
Quote:

Originally Posted by lanc3lot
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:
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 />'


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

Quote:

Originally Posted by zappsan
Thanks to everyone who has installed this, I didn't expect to get that many installs^^

You're welcome :p

Quote:

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

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 :)

zappsan 09-30-2006 07:21 PM

Quote:

Originally Posted by bada_bing
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.
Quote:

Originally Posted by Keyser S?ze
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 :)
Quote:

Originally Posted by Yorixz
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 :)
Quote:

Originally Posted by flash7
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

Quote:

Originally Posted by Keyser S?ze
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.
Quote:

Originally Posted by Medina
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.
Quote:

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

Quote:

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

Quote:

Originally Posted by bonjurkes
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

Quote:

Originally Posted by hIBEES (Post 1148113)
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.
Quote:

Originally Posted by ajschamps (Post 1149182)
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

Quote:

Originally Posted by zappsan (Post 1149246)
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

Quote:

Originally Posted by hIBEES (Post 1150837)
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.

Quote:

Originally Posted by dc pringle (Post 1156153)
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 :)


All times are GMT. The time now is 05:32 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.01488 seconds
  • Memory Usage 1,845KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete