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)

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:


All times are GMT. The time now is 03:13 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.01293 seconds
  • Memory Usage 1,758KB
  • 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
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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