Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2005, 05:04 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Public Ban List

I am requesting a Public Ban list to be created.

Basically it would list all user banned, their ban reason, ban length, and the person who banned them.

Or if this exists already, then please let me know

Thanks!
Reply With Quote
  #2  
Old 09-04-2005, 07:17 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With a few minor changes to make the code 3.5 friendly I was able to get this to function on my forum:

https://vborg.vbsupport.ru/showthread.php?t=70293

Don't know if it was the best way to do it but it worked for me.
Reply With Quote
  #3  
Old 09-04-2005, 07:45 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by .Tim
With a few minor changes to make the code 3.5 friendly I was able to get this to function on my forum:

https://vborg.vbsupport.ru/showthread.php?t=70293

Don't know if it was the best way to do it but it worked for me.
Could you please post the changed code version in this thread (not as a new release thread) or contact the original author to ask for permission to release it as your own (the 3.5 version) or ask him to release it?
Reply With Quote
  #4  
Old 09-04-2005, 07:57 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, don't know if it was done in the best way, I just played with the code until it worked. Anyways, here it is:


Step One:

Upload the files contained within the zip to your forums directory. (use the files in my zip, not the ones from the original thread)

Step Two:

Run file admincp/install_showbans.php.

Step Three:

Open modcp/banning.php and make the following file edits:

Find:

Code:
'period'      => TYPE_STR,
After it add:

Code:
'bannedpost' => TYP_STR,
Then Find:

Code:
// insert a record into the userban table
		/*insert query*/
		$db->query_write("
			INSERT INTO " . TABLE_PREFIX . "userban
			(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate, reason)
			VALUES
			($user[userid], $user[usergroupid], $user[displaygroupid], $user[customtitle], '" . $db->escape_string($user['usertitle']) . "', " . $vbulletin->userinfo['userid'] . ", " . TIMENOW . ", $liftdate, '" . $db->escape_string($vbulletin->GPC['reason']) . "')
		");
	}
Replace it with:

Code:
// insert a record into the userban table
		/*insert query*/
		$db->query_write("
			INSERT INTO " . TABLE_PREFIX . "banlist
			(userid, username, dateline, bannedpost, sentbywhom, howlong, reason)
			VALUES
			($user[userid], '" . $db->escape_string($user[username]) . "', " . TIMENOW . ", '" . $db->escape_string($vbulletin->GPC['bannedpost']) . "', '" . $db->escape_string($vbulletin->userinfo[username]) . "', $liftdate, '" . $db->escape_string($vbulletin->GPC['reason']) . "')
		");

	}
Then find:

Code:
print_input_row($vbphrase['user_ban_reason'], 'reason', '', true, 50, 250);
Replace it with:

Code:
print_input_row($vbphrase['user_ban_reason'], 'reason', '', true, 50, 250, 8, 45, 1, 0);
Step 4:

Add the following new templates

banlist_main

Code:
$stylevar[htmldoctype]
<html id="form" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>Banned Users</title>
$headinclude
</head>
<body>
$header
$navbar
<table align="center" border="0" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
		<tr>
	
			<td class="tcat" colspan="6"><div align="center"><STRONG>$vbphrase[banlist_banlist]</STRONG></div></td>
</tr>
<td class="alt1" colspan="6"><div align="center">$vbphrase[banlist_description] </div></td>
</tr><tr>
<td class="thead">&nbsp;</td>
<td nowrap class="thead">$vbphrase[username] / $vbphrase[banlist_bannedby]</td>
<td nowrap class="thead" align="center">$vbphrase[banlist_datebanned]</td>
<td nowrap class="thead" align="center">$vbphrase[banlist_bannedpost]</td>
<td nowrap class="thead">Reason</td>
<td nowrap class="thead" align="center">$vbphrase[banlist_releasedate]</td>
</tr>
$bannedbit
</table>

$footer
</body>
</html>
banlist_banbit

Code:
<tr>
<td nowrap class="alt2"><div align="center"><img src="images/icons/icon4.gif"></</div></td>
<td nowrap class="alt1"><a href="member.php?u=$banned[userid]" target="_blank"><strong>$banned[username]</strong></a><br>
<div class="smallfont">$vbphrase[banlist_bannedby]: $banned[sentbywhom]</div></td>
<td nowrap class="alt2" align="center">$banned[date]</td>
<if condition="$banned['bannedpost']">
<td nowrap class="alt1"><div align="center"><a href="$banned[bannedpost]" target="_blank">$vbphrase[banlist_link]</a></div></td>
<else />
<td nowrap class="alt1"><div align="center">$vbphrase[banlist_nolink]</div></td>
</if>
<td class="alt2">$banned[reason]</td>
<td nowrap class="alt1" align="center">$banned[releasedate] at $banned[releasetime] </td>
</tr>
Attached Files
File Type: zip bannedlist.zip (2.7 KB, 38 views)
Reply With Quote
  #5  
Old 09-04-2005, 08:33 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I installed. It only logs new bans and not current existing ones, right?
Reply With Quote
  #6  
Old 09-04-2005, 08:34 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, I don't know how to get old ones to show up. I just unbanned and re-banned my banned users. :ermm:
Reply With Quote
  #7  
Old 09-04-2005, 08:40 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The temp banned users in the admin cp show up as perm banned users now. Does this happen to you? And is it a problem? Or are the temp banned users still only temp banned?
Reply With Quote
  #8  
Old 09-04-2005, 08:44 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the showbans.php list they show up properly. On the admin/mod side it says permanent but that's not the case I don't think. I have a fake user temp banned for a day. So I guess tomorrow I can let you know if it functions properly.
Reply With Quote
  #9  
Old 09-05-2005, 09:46 PM
.Tim's Avatar
.Tim .Tim is offline
 
Join Date: Jan 2005
Location: Oklahoma City
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, it doesn't appear to work on temp bans. A user I temp banned until 2pm today is still banned. I'll try and figure out a fix for that.
Reply With Quote
  #10  
Old 09-07-2005, 12:24 AM
Maniaman Maniaman is offline
 
Join Date: Nov 2004
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe I have fixed the bug. I will need to wait 1 day to find for sure though

Quote:
Originally Posted by .Tim
Step Three:

Open modcp/banning.php and make the following file edits:

Code:
// insert a record into the userban table
		/*insert query*/
		$db->query_write("
			INSERT INTO " . TABLE_PREFIX . "userban
			(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate, reason)
			VALUES
			($user[userid], $user[usergroupid], $user[displaygroupid], $user[customtitle], '" . $db->escape_string($user['usertitle']) . "', " . $vbulletin->userinfo['userid'] . ", " . TIMENOW . ", $liftdate, '" . $db->escape_string($vbulletin->GPC['reason']) . "')
		");
	}
Replace it with:

Code:
// insert a record into the userban table
		/*insert query*/
		$db->query_write("
			INSERT INTO " . TABLE_PREFIX . "banlist
			(userid, username, dateline, bannedpost, sentbywhom, howlong, reason)
			VALUES
			($user[userid], '" . $db->escape_string($user[username]) . "', " . TIMENOW . ", '" . $db->escape_string($vbulletin->GPC['bannedpost']) . "', '" . $db->escape_string($vbulletin->userinfo[username]) . "', $liftdate, '" . $db->escape_string($vbulletin->GPC['reason']) . "')
		");

	}
I fixed it by readding
Code:
// insert a record into the userban table
		/*insert query*/
		$db->query_write("
			INSERT INTO " . TABLE_PREFIX . "userban
			(userid, usergroupid, displaygroupid, customtitle, usertitle, adminid, bandate, liftdate, reason)
			VALUES
			($user[userid], $user[usergroupid], $user[displaygroupid], $user[customtitle], '" . $db->escape_string($user['usertitle']) . "', " . $vbulletin->userinfo['userid'] . ", " . TIMENOW . ", $liftdate, '" . $db->escape_string($vbulletin->GPC['reason']) . "')
		");
above
Code:
// insert a record into the userban table
		/*insert query*/
		$db->query_write("
			INSERT INTO " . TABLE_PREFIX . "banlist
			(userid, username, dateline, bannedpost, sentbywhom, howlong, reason)
			VALUES
			($user[userid], '" . $db->escape_string($user[username]) . "', " . TIMENOW . ", '" . $db->escape_string($vbulletin->GPC['bannedpost']) . "', '" . $db->escape_string($vbulletin->userinfo[username]) . "', $liftdate, '" . $db->escape_string($vbulletin->GPC['reason']) . "')
		");

	}
Not sure if this is the best way to do it though.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04682 seconds
  • Memory Usage 2,299KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (12)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete