Ban List Mod

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Ban List Mod Updating from 1.0.5a to 1.0.9

Post by RMcGirr83 »

parkstee wrote:
RMcGirr83 wrote:Purge the cache in the ACP and see if the 33 changes.

Parkstee...which version?
Currently I have 1.0.5a
Updating from 1.0.5a to 1.0.9

SQL

Code: Select all

ALTER TABLE phpbb_banlist ADD ban_banner mediumint(8) unsigned NOT NULL default '0';
Change above prefix (phpbb_) as necessary for your forum.

OPEN

includes/acp/acp_ban.php

FIND

Code: Select all

$ban_give_reason	=
AFTER ADD

Code: Select all

			// BEGIN Ban List Mod
			$ban_banner			= (int) $user->data['user_id'];
			// END Ban List Mod

FIND

Code: Select all

user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason
IN LINE FIND

Code: Select all

$ban_give_reason
IN LINE AFTER ADD

Code: Select all

, $ban_banner
FIND

Code: Select all

$cache->destroy('_total_banned_users');
REMOVE IT

OPEN

includes/acp/acp_board.php

FIND

Code: Select all

$user->add_lang('mods/ban_list');
REPLACE WITH

Code: Select all

				// BEGIN Ban List Mod
				$user->add_lang('mods/ban_list');
				// END Ban List Mod
FIND

Code: Select all

//-- mod: Ban List ----------------------------------------------------------//
'allow_ban_list'		=> array('lang' => 'ALLOW_BAN_LIST',		'validate' => 'int:0:3',  'type' => 'custom', 'method' => 'select_ban_list_check', 'explain' => true),
//-- end: Ban List ----------------------------------------------------------//
REPLACE WITH

Code: Select all

// BEGIN Ban List Mod
'allow_ban_list'		=> array('lang' => 'ALLOW_BAN_LIST',		'validate' => 'int:0:3',  'type' => 'custom', 'method' => 'select_ban_list_check', 'explain' => true),
// END Ban List Mod
FIND

Code: Select all

//-- mod: Ban List ----------------------------------------------------------//
	function select_ban_list_check($value, $key = '')
	{
		global $phpEx, $phpbb_root_path;

		include_once($phpbb_root_path . 'includes/ban_list.' . $phpEx);
		$radio_ary = array(ALLOW_BAN_LIST_ALL_USERS => 'ALLOW_BAN_LIST_ALL_USERS', ALLOW_BAN_LIST_MODS_ADMINS => 'ALLOW_BAN_LIST_MODS_ADMINS', ALLOW_BAN_LIST_ADMINS => 'ALLOW_BAN_LIST_ADMINS');

		return h_radio('config[allow_ban_list]', $radio_ary, $value, $key);
	}
//-- end: Ban List ----------------------------------------------------------//
REPLACE WITH

Code: Select all

// BEGIN Ban List Mod
	function select_ban_list_check($value, $key = '')
	{
		global $phpEx, $phpbb_root_path;

		include($phpbb_root_path . 'includes/constants_ban_list.' . $phpEx);
		$radio_ary = array(ALLOW_BAN_LIST_ALL_USERS => 'ALLOW_BAN_LIST_ALL_USERS', ALLOW_BAN_LIST_MODS_ADMINS => 'ALLOW_BAN_LIST_MODS_ADMINS', ALLOW_BAN_LIST_ADMINS => 'ALLOW_BAN_LIST_ADMINS');

		return h_radio('config[allow_ban_list]', $radio_ary, $value, $key);
	}
// END Ban List Mod
OPEN

includes/acp/acp_users.php

Code: Select all

$ban_give_reason = utf8_normalize_nfc(request_var('ban_give_reason', '', true));
AFTER ADD

Code: Select all

// BEGIN Ban List Mod
							$ban_banner = (int) $user->data['user_id'];
// END Ban List Mod
FIND

Code: Select all

$result = user_ban(substr($action, 3), $ban, 0, 0, 0, $ban_reason
IN LINE FIND

Code: Select all

$ban_give_reason
IN LINE AFTER ADD

Code: Select all

, $ban_banner
OPEN

includes/mcp/mcp_ban.php

FIND

Code: Select all

$ban_give_reason	= utf8_normalize_nfc(request_var('bangivereason', '', true));
AFTER ADD

Code: Select all

			// BEGIN Ban List Mod
			$ban_banner			= (int) $user->data['user_id'];
			// END Ban List Mod

FIND

Code: Select all

					user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason

IN LINE FIND

Code: Select all

$ban_give_reason
IN LINE AFTER ADD

Code: Select all

, $ban_banner
FIND

Code: Select all

					// Ban List MOD, destroy the cache
	                $cache->destroy('_total_banned_users');
REMOVE IT

FIND

Code: Select all

'bangivereason'		=> $ban_give_reason)));
BEFORE ADD

Code: Select all

						// BEGIN Ban List Mod						
						'ban_banner'		=> $ban_banner,
						// END Ban List Mod	

FIND

Code: Select all

					// Ban List MOD, destroy the cache
	                $cache->destroy('_total_banned_users');

REMOVE IT

OPEN

includes/functions.php

FIND

Code: Select all

//-- mod: Ban List ----------------------------------------------------------//
	include($phpbb_root_path . 'includes/ban_list.' . $phpEx);
	ban_list_set_template_vars();
//-- end: Ban List ----------------------------------------------------------//
REPLACE WITH

Code: Select all

// BEGIN Ban List Mod
	include($phpbb_root_path . 'includes/ban_list.' . $phpEx);
	ban_list_set_template_vars();
// END Ban List Mod
OPEN

includes/functions_user.php

FIND

Code: Select all

function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = ''
IN LINE FIND

Code: Select all

$ban_give_reason = ''
IN LINE AFTER ADD

Code: Select all

, $ban_banner
FIND

Code: Select all

				'ban_give_reason'	=> (string) $ban_give_reason,

AFTER ADD

Code: Select all

				// BEGIN Ban List Mod				
				'ban_banner'		=> (int) $ban_banner,
				// END Ban List Mod
FIND

Code: Select all

		$cache->destroy('sql', BANLIST_TABLE);
AFTER ADD

Code: Select all

// BEGIN Ban List Mod
		$cache->purge('_total_banned_users');
// END Ban List Mod
FIND

Code: Select all

	$cache->destroy('sql', BANLIST_TABLE);
AFTER ADD

Code: Select all

// BEGIN Ban List Mod
	$cache->purge('_total_banned_users');
// END Ban List Mod
FIND

Code: Select all

	$cache->destroy('sql', BANLIST_TABLE);
AFTER ADD

Code: Select all

// BEGIN Ban List Mod
	$cache->purge('_total_banned_users');
// END Ban List Mod
OPEN

styles/prosilver/template/index_body.html

FIND

Code: Select all

<!-- IF TOTAL_BANNED_USERS --> &bull; <a href="{U_BANLIST}">{TOTAL_BANNED_USERS}</a><!-- ENDIF -->
REPLACE WITH

Code: Select all

<!-- IF TOTAL_BANNED_USERS --> &bull; {L_BANNED_USERS} <a href="{U_BANLIST}">{TOTAL_BANNED_USERS}</a> <!-- ENDIF -->
OPEN

styles/subsilver2/template/index_body.html

FIND

Code: Select all

<!-- IF TOTAL_BANNED_USERS --> | <a href="{U_BANLIST}">{TOTAL_BANNED_USERS}</a><!-- ENDIF -->
REPLACE WTIH

Code: Select all

<!-- IF TOTAL_BANNED_USERS --> | {L_BANNED_USERS} <a href="{U_BANLIST}">{TOTAL_BANNED_USERS}</a><!-- ENDIF -->
Upload all files found in 1.0.9 download overwritting the ones on your forum. Purge the cache, refresh the template and that should do it.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Ban List Mod

Post by RMcGirr83 »

autinhyeu wrote:
RMcGirr83 wrote:Purge the cache in the ACP and see if the 33 changes.

Parkstee...which version?
I purge the cache everyday :D but it's not exactly still...
Tell me what the permissions are that are set on the cache directory...and I am assuming this is for version 1.0.9?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
autinhyeu
Registered User
Posts: 685
Joined: Mon Apr 14, 2008 6:34 am
Location: Vietnamese
Contact:

Re: Ban List Mod

Post by autinhyeu »

Yes, i using version 1.0.9 :)
cache directory was CHMOD 777
phpBB Community in Vietnamese: http://www.phpbbvn.com

Sorry, my English language is fine impossible
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Ban List Mod

Post by RMcGirr83 »

Go into your cache folder and delete the data_total_banned_users file.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
autinhyeu
Registered User
Posts: 685
Joined: Mon Apr 14, 2008 6:34 am
Location: Vietnamese
Contact:

Re: Ban List Mod

Post by autinhyeu »

i have done, but still so :|
phpBB Community in Vietnamese: http://www.phpbbvn.com

Sorry, my English language is fine impossible
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Ban List Mod

Post by RMcGirr83 »

Go into your ACP under user management and click on the ban user name link...how many show up and what version of phpbb are you using?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
autinhyeu
Registered User
Posts: 685
Joined: Mon Apr 14, 2008 6:34 am
Location: Vietnamese
Contact:

Re: Ban List Mod

Post by autinhyeu »

RMcGirr83 wrote:Go into your ACP under user management and click on the ban user name link...how many show up and what version of phpbb are you using?
number at it's 32 :roll:
i using phpBB3.0.5 :)
phpBB Community in Vietnamese: http://www.phpbbvn.com

Sorry, my English language is fine impossible
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Ban List Mod

Post by RMcGirr83 »

Okay, so you have 32 banned users in the ACP, the mod shows 33 as a count and you end up with a listing of 25?

Unfortunately I can not reproduce any of this.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
autinhyeu
Registered User
Posts: 685
Joined: Mon Apr 14, 2008 6:34 am
Location: Vietnamese
Contact:

Re: Ban List Mod

Post by autinhyeu »

RMcGirr83 wrote:Okay, so you have 32 banned users in the ACP, the mod shows 33 as a count and you end up with a listing of 25?
Yes.
RMcGirr83 wrote:Unfortunately I can not reproduce any of this.
:(
phpBB Community in Vietnamese: http://www.phpbbvn.com

Sorry, my English language is fine impossible
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: Ban List Mod Updating from 1.0.5a to 1.0.9

Post by DoYouSpeakWak »

RMcGirr83 wrote:
Updating from 1.0.5a to 1.0.9

SQL

Code: Select all

ALTER TABLE phpbb_banlist ADD ban_banner mediumint(8) unsigned NOT NULL default '0';
Change above prefix (phpbb_) as necessary for your forum.

OPEN

includes/acp/acp_ban.php

FIND

Code: Select all

$ban_give_reason	=
AFTER ADD

Code: Select all

			// BEGIN Ban List Mod
			$ban_banner			= (int) $user->data['user_id'];
			// END Ban List Mod

FIND

Code: Select all

$cache->destroy('_total_banned_users');
REMOVE IT

Upload all files found in 1.0.9 download overwritting the ones on your forum. Purge the cache, refresh the template and that should do it.
Hey i just wanted to ask about this update. iwe got a few problems, i hope they its just typos.

I dont have this in includes/acp/acp_ban.php

Code: Select all

$ban_give_reason	=
But i do have

Code: Select all

$ban_give_reasons =
Code around that line

Code: Select all

		$banned_options = '';
		$ban_length = $ban_reasons = $ban_give_reasons = array();
is it the correct edit ?

In the same file i have two of these.

Code: Select all

$cache->destroy('_total_banned_users');
Lines of code

Code: Select all

		// Ban submitted?
		if ($bansubmit)
		{
			// Grab the list of entries
			$ban				= utf8_normalize_nfc(request_var('ban', '', true));
			$ban_len			= request_var('banlength', 0);
			$ban_len_other		= request_var('banlengthother', '');
			$ban_exclude		= request_var('banexclude', 0);
			$ban_reason			= utf8_normalize_nfc(request_var('banreason', '', true));
			$ban_give_reason	= utf8_normalize_nfc(request_var('bangivereason', '', true));

			if ($ban)
			{
				user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
				// Ban List MOD, destroy the cache
	            $cache->destroy('_total_banned_users');				

				trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
			}
		}
		else if ($unbansubmit)
		{
			$ban = request_var('unban', array(''));

			if ($ban)
			{
				user_unban($mode, $ban);
				// Ban List MOD, destroy the cache
	            $cache->destroy('_total_banned_users');				

				trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
			}
		}
Should i just remove both ?

The rest of the edits are there and match. Thx for your time, i do appriciate it alot
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Ban List Mod Updating from 1.0.5a to 1.0.9

Post by RMcGirr83 »

DoYouSpeakWak wrote:
Hey i just wanted to ask about this update. iwe got a few problems, i hope they its just typos.

I dont have this in includes/acp/acp_ban.php

Code: Select all

$ban_give_reason	=
But i do have

Code: Select all

$ban_give_reasons =
Code around that line

Code: Select all

		$banned_options = '';
		$ban_length = $ban_reasons = $ban_give_reasons = array();
is it the correct edit ?
Yes.
In the same file i have two of these.

Code: Select all

$cache->destroy('_total_banned_users');
Should i just remove both ?
Yes, remove both of them...the destroying of the cache was moved to includes/functions_user.php.
The rest of the edits are there and match. Thx for your time, i do appriciate it alot
No problem.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: Ban List Mod Updating from 1.0.5a to 1.0.9

Post by DoYouSpeakWak »

Thx for your fast reply.
RMcGirr83 wrote: Upload all files found in 1.0.9 download overwritting the ones on your forum. Purge the cache, refresh the template and that should do it.
Do i have to run the db_update.php again ? if so were there any changes in this file from 1.0.5a to 1.0.9
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Ban List Mod

Post by RMcGirr83 »

No, you have to run the sql found in this post
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
brett05
Registered User
Posts: 93
Joined: Fri Jun 05, 2009 2:16 pm
Contact:

Re: Ban List Mod

Post by brett05 »

I've just installed v1.0.9 from the zip file in the first post of this thread, however I am getting an error in the ACP / Board settings. Being very new to phpBB, I'm not quite sure what to do here. I followed the install instructions from the 'install_mod.xml' file carefully and double checked my changes. Can you please help.

Cheers, Brett http://bertiestreet.com/phpBB


[phpBB Debug] PHP Notice: in file /adm/index.php on line 345: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'acp_board::select_ban_list_check' was given
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:6545)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:6545)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:6545)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:6545)
User avatar
edgar davids
Registered User
Posts: 376
Joined: Mon Jan 19, 2009 7:15 am

Re: Ban List Mod

Post by edgar davids »

8-)
Locked

Return to “[3.0.x] MOD Database Releases”