Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
Prev Previous Post   Next Post Next
  #4  
Old 09-04-2005, 06: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
 

Thread Tools
Display Modes

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 01:35 AM.


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.07412 seconds
  • Memory Usage 2,694KB
  • Queries Executed 13 (?)
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
  • (14)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (15)post_thanks_box
  • (15)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (15)post_thanks_postbit_info
  • (15)postbit
  • (2)postbit_attachment
  • (15)postbit_onlinestatus
  • (15)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete