Erros após instalação phpBB Invite 2.0.1
Erros após instalação phpBB Invite 2.0.1
Qual a URL do seu fórum: http://friendsharept.org/phpbb/portal.php
Tipo de Hospedagem: Pago
Qual a versão do phpBB: phpBB 3.0.10
É um novo ou uma conversão: Update de uma versão phpBB3
Usuário de teste: Usuário: Nandao Senha: fender
Estilos instalados: prosilver - subsilber2
Modificações instaladas: phpBB Invite 2.0.1
Codegenerator
Qual seu nivel de experiência: Iniciante
Quando começou o problema: Após instalação do MOD phpBB Invite 2.0.1
Descreva seu problema: Ao entrar no Painel de controle Adm->registro de usuários, aparece as mensagens de erro:
[phpBB Debug] PHP Warning: in file [ROOT]/includes/meghivo/functions.php on line 485: Missing argument 1 for meghivo::select_acc_invite(), called in [ROOT]/includes/acp/acp_board.php on line 246 and defined
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Tipo de Hospedagem: Pago
Qual a versão do phpBB: phpBB 3.0.10
É um novo ou uma conversão: Update de uma versão phpBB3
Usuário de teste: Usuário: Nandao Senha: fender
Estilos instalados: prosilver - subsilber2
Modificações instaladas: phpBB Invite 2.0.1
Codegenerator
Qual seu nivel de experiência: Iniciante
Quando começou o problema: Após instalação do MOD phpBB Invite 2.0.1
Descreva seu problema: Ao entrar no Painel de controle Adm->registro de usuários, aparece as mensagens de erro:
[phpBB Debug] PHP Warning: in file [ROOT]/includes/meghivo/functions.php on line 485: Missing argument 1 for meghivo::select_acc_invite(), called in [ROOT]/includes/acp/acp_board.php on line 246 and defined
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Re: Erros após instalação phpBB Invite 2.0.1
Dê uma lida no artigo: kb.php?a=104
Tradução Português Brasileiro: https://www.phpbb.com/customise/db/translation/brazilian_portuguese/
Precisa de serviços phpBB? Me mande um mensagem privada ou visite https://vinny.quest
Precisa de serviços phpBB? Me mande um mensagem privada ou visite https://vinny.quest
Re: Erros após instalação phpBB Invite 2.0.1
Reeditei novamente todos os arquivos pedidos usando a codificação sem bom, mas não mudou, é só na página de configuração de registros de usuários que aparece o problema, no resto do Painel de controle está tudo bem.
Re: Erros após instalação phpBB Invite 2.0.1
Cara... que endereço é este :?:
Que diretório
Que eu saiba, deveria ser
Abraço.
[ROOT]/includes/meghivo/functions.php
Que diretório
/meghivo
é este dentro da pasta /includes
:?: Que eu saiba, deveria ser
[ROOT]/includes/functions.php
.Abraço.

[DICA] Antes de abrir um Novo Tópico, procure saber se a sua dúvida já foi respondida. Pesquise no Google por palavras(em inglês também) relacionadas à ela, somado à palavra "phpbb".
Re: Erros após instalação phpBB Invite 2.0.1
Poste aqui o link para download da MOD.
Tradução Português Brasileiro: https://www.phpbb.com/customise/db/translation/brazilian_portuguese/
Precisa de serviços phpBB? Me mande um mensagem privada ou visite https://vinny.quest
Precisa de serviços phpBB? Me mande um mensagem privada ou visite https://vinny.quest
Re: Erros após instalação phpBB Invite 2.0.1
Hummmmm !!robra escreveu:Cara... que endereço é este :?:
[ROOT]/includes/meghivo/functions.php
Que diretório/meghivo
é este dentro da pasta/includes
:?:
Que eu saiba, deveria ser[ROOT]/includes/functions.php
.

O diretório
/meghivo
pertence a MOD em questão e é para ser colocado na pasta /includes
mesmo. :lol: Vinny.
O link do download está na página https://www.phpbb.com/community/viewtop ... &t=2102972, só que da versão 2.0.2.
Abraço.

[DICA] Antes de abrir um Novo Tópico, procure saber se a sua dúvida já foi respondida. Pesquise no Google por palavras(em inglês também) relacionadas à ela, somado à palavra "phpbb".
Re: Erros após instalação phpBB Invite 2.0.1
Robra, eu segui o tutorial, e está certo mesmo a localização da pasta /meghido.
Eu tinha instalado um relogio no portal mff-clock.swf, agora para ajudar, o anti-virus cismou que é Malware, qualquer página que entrar, recebe um alerta do anti-virus.Rsrs
A bicho pegou agora.Rsrs
Eu tinha instalado um relogio no portal mff-clock.swf
Código: Selecionar todos
(http://assets.myflashfetish.com/swf/widgets/mff-clock.swf)
A bicho pegou agora.Rsrs
Re: Erros após instalação phpBB Invite 2.0.1
O relógio depois se vê, em um novo tópico.
Poste o conteúdo dos arquivos
Abraço.
Poste o conteúdo dos arquivos
/includes/meghivo/functions.php
e do /includes/acp/acp_board.php
pelo BBcode Code.Abraço.

[DICA] Antes de abrir um Novo Tópico, procure saber se a sua dúvida já foi respondida. Pesquise no Google por palavras(em inglês também) relacionadas à ela, somado à palavra "phpbb".
Re: Erros após instalação phpBB Invite 2.0.1
Os dois arquivos robra.
/includes/meghivo/functions.php
/includes/acp/acp_board.php
/includes/meghivo/functions.php
Código: Selecionar todos
<?php
/**
*
* @package Invite
* @version $Id: functions.php 61 2012-07-31 17:44:53Z killbill $
* @copyright (c) 2010-2011 http://jatek-vilag.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
class meghivo
{
var $points = array();
function meghivo($in_points = false)
{
global $cache, $meghivo_config;
if (($meghivo_config = $cache->get('_meghivo_config')) === false)
{
global $db;
$meghivo_config = array();
$sql = 'SELECT * FROM ' . INVITE_CONFIG_TABLE;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$meghivo_config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);
$cache->put('_meghivo_config', $meghivo_config);
}
if ($in_points === true)
{
$this->points_system_verify();
}
}
function ini(&$registration)
{
global $user, $auth, $config, $template, $phpbb_root_path, $phpEx, $meghivo_config;
$registration = ($meghivo_config['meghivo_enable'] && $config['require_ac_invite'] == ACC_INVITE_ENABLE) ? false : true;
if (!$user->data['is_registered'])
{
return;
}
$this->add_invite_lang();
if ($meghivo_config['verify_time'] <= time())
{
$this->expired();
}
if ($config['allow_birthdays'] && $meghivo_config['meghivo_birthdays'])
{
$this->birthday();
}
if($auth->acl_get('a_meghivo_igeny') || $auth->acl_get('m_meghivo_igeny'))
{
$petition_lang = $meghivo_config['total_petition'] > 1 ? 'MEGHIVO_PETITIONS' : 'MEGHIVO_PETITION';
$template->assign_vars(array(
'S_MEGHIVO_PETITION' => $meghivo_config['total_petition'] ? sprintf($user->lang[$petition_lang], $meghivo_config['total_petition']) : false,
'U_ACP_MEGHIVO_PETITION' => ($auth->acl_get('a_meghivo_igeny')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=meghivo&mode=igeny', true, $user->session_id) : false,
'U_MCP_MEGHIVO_PETITION' => ($auth->acl_get('m_meghivo_igeny')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=meghivo&mode=jovahagyas', true, $user->session_id) : false
));
}
$template->assign_vars(array(
'U_INVITE' => ($auth->acl_get('u_meghivo_kuld')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=meghivo&mode=adat#meghivo_adat') : false,
'L_INVITE' => $user->lang['MEGHIVO'] . (($meghivo_config['meghivo_db'] || $auth->acl_get('u_meghivo_max')) ? '' : ' (' . $user->data['user_meghivo'] . ')'),
'MEGHIVO_COPYRIGHT' => $meghivo_config['copyright']
));
}
function verify(&$meghivo_user)
{
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $meghivo_config;
$meghivo_uid = request_var('muid', 0);
$meghivo_key = request_var('mkey', '');
$delete = request_var('mdel', false);
$meghivo_keys = ($delete && strpos($meghivo_key, '|') !== false) ? explode('|', $meghivo_key) : array($meghivo_key);
$invite_disabled = (!$meghivo_config['meghivo_enable'] || $config['require_ac_invite'] == ACC_INVITE_DISABLE) ? true : false;
if ($invite_disabled && !$meghivo_uid && !sizeof($meghivo_keys) && !$delete)
{
return;
}
$this->add_invite_lang();
if ($meghivo_uid)
{
if (sizeof($meghivo_keys))
{
$delete_ids = array();
$sql = 'SELECT id, meghivo_email, user_id, meghivo_kod, friend
FROM ' . INVITE_TABLE . '
WHERE ' . $db->sql_in_set('meghivo_kod', $meghivo_keys) . '
AND user_id = ' . (int) $meghivo_uid;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if ($delete !== false)
{
$delete_ids[] = $row['id'];
}
else if ($meghivo_user === false)
{
$meghivo_user = array(
'mid' => $row['id'],
'mmail' => $row['meghivo_email'],
'muid' => $row['user_id'],
'mkey' => $row['meghivo_kod'],
'friend' => $row['friend']
);
$template->assign_var('S_MEGHIVO_EMAIL_BLOCK', (!$meghivo_config['email_address_change'] ? true : false));
}
}
$db->sql_freeresult($result);
if (sizeof($delete_ids))
{
$this->delete_key($delete_ids);
trigger_error('MEGHIVO_DELETE_SUCCES' . ((sizeof($delete_ids) > 1) ? 'S': ''));
}
}
if (!$meghivo_user)
{
trigger_error((($invite_disabled) ? 'MEGHIVO_DISABLED' : 'MEGHIVO_KEY_ERROR'));
}
else if ($invite_disabled)
{
trigger_error($user->lang['MEGHIVO_DISABLED'] . '<br /><br />' . sprintf($user->lang['MEGHIVO_DELETE_CONFIRM'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=register&muid={$meghivo_uid}&mkey={$meghivo_key}&mdel=yes") . '">', '</a>'));
}
}
if ($config['require_activation'] != USER_ACTIVATION_DISABLE && $config['require_ac_invite'] == ACC_INVITE_ENABLE && $meghivo_user == false)
{
trigger_error('MEGHIVO_REGISTRATION');
}
}
function set_invite_config($config_name, $config_value)
{
global $db, $cache, $meghivo_config;
$sql = 'UPDATE ' . INVITE_CONFIG_TABLE . "
SET config_value = '" . $db->sql_escape($config_value). "'
WHERE config_name = '" . $db->sql_escape($config_name) . "'";
$db->sql_query($sql);
if (!$db->sql_affectedrows() && !isset($meghivo_config[$config_name]))
{
$db->sql_query('INSERT INTO ' . INVITE_CONFIG_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'config_name' => $config_name,
'config_value' => $config_value)
));
}
$meghivo_config[$config_name] = $config_value;
$cache->destroy('_meghivo_config');
}
function delet($meghivo_user, $user_row, $user_id)
{
global $db, $meghivo_config;
$this->points_system_verify();
$sql = 'SELECT user_id, username, user_colour, user_lang, user_meghivo_member
FROM '. USERS_TABLE .'
WHERE user_id = '. (int) $meghivo_user['muid'];
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$sql = 'SELECT group_colour
FROM ' . GROUPS_TABLE . '
WHERE group_id = ' . (int) $user_row['group_id'];
$result = $db->sql_query_limit($sql, 1);
$group = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$sql_ary = array(
'user_id' => (int) $user_id,
'user_name' => $user_row['username'],
'user_colour' => $group['group_colour'],
'user_reg_email' => $user_row['user_email'],
'user_regdate' => (int) $user_row['user_regdate'],
'meghivo_uid' => (int) $row['user_id']
);
$db->sql_query('INSERT INTO ' . INVITE_USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$invited_users = intval($row['user_meghivo_member'] + 1);
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_meghivo_member = $invited_users
WHERE user_id = " . (int) $row['user_id'];
$db->sql_query($sql);
$sender_data = false;
if ($meghivo_config['gift_invited_users'] && $meghivo_config['gift_invited_users_invitation'])
{
$count = ($invited_users / $meghivo_config['gift_invited_users']);
if (is_int($count))
{
$sender_data = $this->pm_sender();
$this->send_gift($row, $sender_data, $count);
}
}
if ($meghivo_user['friend'])
{
$sql_ary = array(
'user_id' => (int) $row['user_id'],
'zebra_id' => (int) $user_id,
'friend' => 1
);
$sql = 'INSERT INTO ' . ZEBRA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
}
$this->delete_key($meghivo_user['mid']);
$this->set_invite_config('total_users', ($meghivo_config['total_users'] + 1));
if ($this->points['aktiv'] && $meghivo_config['meghivo_points'])
{
$this->set_points('add', $row['user_id'], $meghivo_config['meghivo_points']);
if (!$sender_data)
{
$sender_data = $this->pm_sender();
}
if ($sender_data)
{
$lang = $this->trans_lang('s', $row['user_lang']);
$subject = $lang['MEGHIVO_NOTI_SUBJECT'];
$user_name = get_username_string('full', $user_id, $user_row['username'], '');
$message = sprintf($lang['MEGHIVO_POINTS_PRESENT'], $user_name, $meghivo_config['meghivo_points'], $this->points['nev']);
$this->pm_message($row, $sender_data, $subject, $message);
}
}
}
function send_gift($user_data, $sender_data, $count)
{
global $db, $config, $meghivo_config;
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_meghivo = user_meghivo + ' . (int) $meghivo_config['gift_invited_users_invitation'] . '
WHERE user_id = ' . (int) $user_data['user_id'];
$db->sql_query($sql);
if ($sender_data)
{
$lang = $this->trans_lang('s', $user_data['user_lang']);
$subject = $lang['MEGHIVO_NOTI_SUBJECT'];
$lang_key = 'MEGHIVO_PM_GIFT_INVITED_USERS_' . (($count > 1) ? 'FURTHER' : 'FIRST');
$message = sprintf($lang[$lang_key], $meghivo_config['gift_invited_users'], $config['sitename'], $meghivo_config['gift_invited_users_invitation']);
$this->pm_message($user_data, $sender_data, $subject, $message);
}
}
function birthday()
{
global $db, $user, $config, $meghivo_config;
$now = phpbb_gmgetdate(time() + $user->timezone + $user->dst);
// Display birthdays of 29th february on 28th february in non-leap-years
$leap_year_birthdays = '';
if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L'))
{
$leap_year_birthdays = " OR user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
}
// cache 10 min.
$cache_ttl = 600;
$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday, u.user_lang, u.user_meghivo_block
FROM ' . USERS_TABLE . ' u
LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
WHERE (b.ban_id IS NULL
OR b.ban_exclude = 1)
AND (u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' $leap_year_birthdays)
AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql, $cache_ttl);
$load_data = false;
while ($row = $db->sql_fetchrow($result))
{
if ($row['user_meghivo_block'] < time())
{
continue;
}
if (!$load_data)
{
$load_data = true;
$sender_data = $this->pm_sender();
}
if ($sender_data)
{
$lang = $this->trans_lang('s', $row['user_lang']);
$subject = $lang['MEGHIVO_NOTI_SUBJECT'];
$message = sprintf($lang['MEGHIVO_BIRTHDAY'], $meghivo_config['meghivo_birthdays']);
$this->pm_message($row, $sender_data, $subject, $message);
}
// blocking 1 year - 1 day
$time = intval(time() + (86400*364));
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_meghivo = user_meghivo + ' . (int) $meghivo_config['meghivo_birthdays'] . " , user_meghivo_block = $time
WHERE user_id = " . (int) $row['user_id'];
$db->sql_query($sql);
}
$db->sql_freeresult($result);
}
function ac_user($user_id, $total_users)
{
if ($user_id == ANONYMOUS)
{
return;
}
global $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
$this->add_invite_lang();
$template->assign_vars(array(
'MEGHIVO_USER_DB' => sprintf($user->lang['MEGHIVO_PERSON'], '<b>'.$total_users.'</b>'),
'MEGHIVO_USERS_LIST' => ($total_users && $auth->acl_get('u_meghivo_users')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=meghivo_users_list&u={$user_id}") : false
));
$sql = 'SELECT u.user_id, u.username, u.user_colour
FROM '. INVITE_USERS_TABLE .' m
LEFT JOIN '. USERS_TABLE .' u ON m.meghivo_uid = u.user_id
WHERE m.user_id = ' . (int) $user_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$row['user_id'])
{
return;
}
$template->assign_var('MEGHIVO_USER_NAME', '<strong>'.get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']).'</strong>');
}
function members_list($mode, $user_id = false)
{
global $user, $auth, $config, $template, $phpbb_root_path, $phpEx, $meghivo_config;
if (!$auth->acl_get('u_meghivo_users') && ($mode == 'member'))
{
trigger_error('NOT_AUTHORISED');
}
$start = request_var('start', 0);
$sort_key = request_var('sk' ,'reg');
$sort_dir = request_var('sd' ,'d');
$list_meghivo = $meghivo_config['meghivo_oldal_list'];
$users_count = 0;
$sort_by_text = array('name' => $user->lang['SORT_USERNAME'], 'post' => $user->lang['POST'], 'reg' => $user->lang['JOINED']);
$sort_by_sql = array('name' => 'u.username_clean', 'post' => 'u.user_posts', 'reg' => 'u.user_regdate');
if ($auth->acl_get('u_viewonline'))
{
$sort_by_text['aktiv'] = $user->lang['UCP_MEGHIVO_LAST_ACTIVE'];
$sort_by_sql['aktiv'] = 'u.user_lastvisit';
}
$s_sort_key = $s_sort_dir = $u_sort_param = '';
$sort_days = 0;
gen_sort_selects($limit_days = array(), $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days = '', $s_sort_key, $s_sort_dir, $u_sort_param);
$sql_sort = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
$this->users($users_count, $list_meghivo, $start, $sql_sort, $data, $user_id);
$url_param = ($mode == 'ucp') ? append_sid("{$phpbb_root_path}ucp.$phpEx", "i=meghivo&mode=user&{$u_sort_param}") : append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=meghivo_users_list&u={$user_id}&{$u_sort_param}");
$template->assign_vars(array(
'S_MEGHIVO_USERS_LIST' => ($mode == 'member') ? true : false,
'UCP_MEGHIVO_USER' => ($mode == 'ucp') ? true : false,
'S_VIEWONLINE' => $auth->acl_get('u_viewonline') ? true : false,
'TOTAL_COUNT' => $users_count ? sprintf($user->lang['UCP_MEGHIVO_USERS_COUNT'], $users_count) : false,
'PM_IMG' => ($auth->acl_get('u_sendpm') && $mode == 'ucp') ? $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']) : false,
'EMAIL_IMG' => ($auth->acl_get('u_sendemail') && $mode == 'ucp') ? $user->img('icon_contact_email', $user->lang['EMAIL']) : false,
'S_ON_PAGE' => on_page($users_count, $list_meghivo, $start),
'S_SORT_KEY' => str_replace('<select', '<select onchange="this.form.submit();"', $s_sort_key),
'S_SORT_DIR' => str_replace('<select', '<select onchange="this.form.submit();"', $s_sort_dir),
'PAGINATION' => generate_pagination($url_param, $users_count, $list_meghivo, $start, true)
));
foreach ($data as $row)
{
$template->assign_block_vars('users', array(
'H_USERNAME' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'H_REG_TIME' => $user->format_date($row['user_regdate']),
'H_U_AKTIV' => ($row['user_lastvisit'] || !empty($row['most_time'])) ? $user->format_date($row[((!empty($row['most_time'])) ? 'most_time' : 'user_lastvisit')]) : '-',
'H_POSTS' => $row['user_posts'],
'U_POSTS' => ($auth->acl_get('u_search') && $config['load_search'] && $row['user_posts']) ? append_sid("{$phpbb_root_path}search.$phpEx", 'author_id='.$row['user_id'].'&sr=posts') : false,
'U_H_PM' => ($mode == 'ucp') ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $row['user_id']) : false,
'U_H_EMAIL' => ($mode == 'ucp') ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&u=' . $row['user_id']) : false
));
}
}
function users(&$users_count, $limit = 20, $offset = 0, $sort_by = 'u.user_regdate DESC', &$data, $user_id = false)
{
global $db, $user;
if ($user_id)
{
$sql = 'SELECT user_meghivo_member
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $user_id;
$result = $db->sql_query($sql);
$users_count = $db->sql_fetchfield('user_meghivo_member');
$db->sql_freeresult($result);
}
else
{
$users_count = $user->data['user_meghivo_member'];
$user_id = $user->data['user_id'];
}
if ($offset >= $users_count)
{
$offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
}
$sql_array = array(
'SELECT' => 'MAX(s.session_time) AS most_time, u.user_id, u.username, u.username_clean, u.user_colour, u.user_posts, u.user_lastvisit, u.user_regdate',
'FROM' => array(INVITE_USERS_TABLE => 'm'),
'LEFT_JOIN' => array(array(
'FROM' => array(USERS_TABLE => 'u'), 'ON' => 'm.user_id = u.user_id'),
array(
'FROM' => array(SESSIONS_TABLE => 's'), 'ON' => 'u.user_id = s.session_user_id'
)),
'WHERE' => 'm.meghivo_uid = '. (int) $user_id,
'GROUP_BY' => 'u.user_id, u.username, u.username_clean, u.user_colour, u.user_posts, u.user_lastvisit, u.user_regdate',
'ORDER_BY' => $sort_by
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, $limit, $offset);
$data = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
}
function select_acc_invite($value)
{
$radio_ary = array(ACC_INVITE_DISABLE => 'ACC_INVITE_DISABLE', ACC_INVITE_ENABLE => 'ACC_INVITE_ENABLE', ACC_INVITE_REGISTER => 'ACC_INVITE_REGISTER');
return array('lang' => 'ACP_INVITE_REGISTER', 'validate' => 'int', 'type' => 'custom', 'append' => h_radio('config[require_ac_invite]', $radio_ary, $value, 'require_ac_invite', false, '<br />'), 'explain' => true);
}
function invite_add_rows(&$additional_vars)
{
global $config, $meghivo_config;
$additional_vars += array(
'user_meghivo' => ($meghivo_config['meghivo_enable']) ? $meghivo_config['meghivo_uj_reg'] : 0,
'user_meghivo_member' => 0,
'user_meghivo_block' => 0
);
}
function delete_user($user_id)
{
global $db, $meghivo_config;
$users_count = 0;
$sql = 'SELECT meghivo_uid
FROM ' . INVITE_USERS_TABLE . '
WHERE user_id = ' . (int) $user_id;
$result = $db->sql_query($sql);
$uid = (int) $db->sql_fetchfield('meghivo_uid');
$db->sql_freeresult($result);
if ($uid)
{
$db->sql_query('UPDATE '. USERS_TABLE .' SET user_meghivo_member = user_meghivo_member - 1 WHERE user_id = ' . $uid);
$users_count++;
}
$sql = 'SELECT user_id
FROM ' . INVITE_USERS_TABLE . '
WHERE meghivo_uid = ' . (int) $user_id;
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$users_count++;
}
$db->sql_freeresult($result);
if ($users_count)
{
$this->set_invite_config('total_users', intval($meghivo_config['total_users'] - $users_count));
}
$db->sql_query('DELETE FROM ' . INVITE_USERS_TABLE . ' WHERE user_id = ' . (int) $user_id . ' OR meghivo_uid = ' . (int) $user_id);
$db->sql_query('DELETE FROM ' . INVITE_TABLE . ' WHERE user_id = ' . (int) $user_id);
$db->sql_query('DELETE FROM ' . INVITE_CLAIMED_TABLE . ' WHERE user_id = ' . (int) $user_id);
}
function pm_sender()
{
global $db, $meghivo_config;
$sender_data = false;
if ($meghivo_config['meghivo_pm_name'])
{
$sql = 'SELECT user_id, username, user_ip
FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($meghivo_config['meghivo_pm_name'])) . "'";
$result = $db->sql_query($sql);
$sender_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
if (!$meghivo_config['meghivo_pm_name'] || !$sender_data)
{
add_log('critical', 'LOG_MEGHIVO_ERROR_PM');
}
return $sender_data;
}
function pm_message($meghivo, $sender_data, $subject, $message)
{
global $db, $user, $phpbb_root_path, $phpEx, $meghivo_config;
if (!isset($user->lang['NO_RECIPIENT']))
{
$user->add_lang('ucp');
}
$subject = utf8_normalize_nfc($subject);
$message = utf8_normalize_nfc($message);
$uid = $bitfield = $options = '';
$enable_sig = false;
$allow_bbcode = $allow_urls = $allow_smilies = true;
generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
$pm_data = array(
'address_list' => array('u' => array($meghivo['user_id'] => 'to')),
'from_user_id' => (int) $sender_data['user_id'],
'from_user_ip' => $sender_data['user_ip'],
'from_username' => $sender_data['username'],
'reply_from_root_level' => 0,
'reply_from_msg_id' => 0,
'icon_id' => 0,
'enable_sig' => $enable_sig,
'enable_bbcode' => $allow_bbcode,
'enable_smilies' => $allow_smilies,
'enable_urls' => $allow_urls,
'bbcode_bitfield' => $bitfield,
'bbcode_uid' => $uid,
'message' => $message
);
if (!function_exists('submit_pm'))
{
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
}
submit_pm('post', $subject, $pm_data);
}
function delete_key($key_ids)
{
global $db, $meghivo_config;
if (!is_array($key_ids))
{
$key_ids = array((int) $key_ids);
}
$this->set_invite_config('total_pend', ($meghivo_config['total_pend'] - sizeof($key_ids)));
$db->sql_query('DELETE FROM '. INVITE_TABLE .' WHERE ' . $db->sql_in_set('id', array_map('intval', $key_ids)));
}
function points_system_verify()
{
global $db, $config, $phpbb_root_path, $phpEx, $meghivo_config;
$this->points = array(
'telepitve' => false,
'tipus' => false,
'bekapcsolva' => true,
'nev' => '',
'toke' => 0
);
if (defined('IN_ULTIMATE_POINTS') || defined('IN_JV_POINTS_SYSTEM'))
{
$this->points['tipus'] = (defined('IN_ULTIMATE_POINTS')) ? INVITE_ULTIMATE_POINTS_SYSTEM : INVITE_JV_POINTS_SYSTEM;
$this->points['telepitve'] = true;
$this->points['bekapcsolva'] = $config['points_enable'];
define('USER_POINTS', 'user_points');
}
else if (file_exists($phpbb_root_path . 'includes/mods/functions_points.' . $phpEx))
{
if (!function_exists('add_points'))
{
include($phpbb_root_path . 'includes/mods/functions_points.' . $phpEx);
}
if (!function_exists('set_bank'))
{
$this->points['tipus'] = INVITE_SIMPLE_POINTS_SYSTEM;
$this->points['telepitve'] = true;
$this->points['bekapcsolva'] = $config['points_enable'];
define('USER_POINTS', 'user_points');
}
else
{
$this->points['tipus'] = INVITE_POINTS_SYSTEM;
$this->points['telepitve'] = true;
$sql = 'SELECT points_enable FROM ' . POINTS_CONFIG_TABLE;
$result = $db->sql_query($sql);
$this->points['bekapcsolva'] = $db->sql_fetchfield('points_enable');
$db->sql_freeresult($result);
}
}
else if (file_exists($phpbb_root_path . 'includes/mods/cash/cash_class.' . $phpEx))
{
$this->points['tipus'] = INVITE_CASH_MOD;
$this->points['telepitve'] = true;
}
else if (file_exists($phpbb_root_path . 'includes/functions_points.' . $phpEx))
{
$this->points['tipus'] = ARCADE_POINTS_MOD;
$this->points['telepitve'] = true;
$this->points['bekapcsolva'] = $config['points_enable'];
define('USER_POINTS', 'user_points');
}
$this->points['aktiv'] = ($this->points['telepitve'] && $this->points['bekapcsolva'] && $meghivo_config['meghivo_points_enable']) ? true : false;
if ($this->points['aktiv'])
{
$points_array = $this->adat_points();
$this->points['nev'] = $points_array['nev'];
$this->points['toke'] = $points_array['toke'];
}
}
function adat_points($user_id = false)
{
global $user, $db, $config, $meghivo_config;
$adat = array(
'toke' => 0,
'nev' => ''
);
if ($this->points['tipus'] == INVITE_CASH_MOD)
{
$user_id = ($user_id) ? $user_id : $user->data['user_id'];
$sql_ary = array(
'SELECT' => 'c.cash_name, ca.cash_amt',
'FROM' => array(CASH_TABLE => 'c', CASH_AMOUNT_TABLE => 'ca'),
'WHERE' => 'ca.user_id = ' . (int) $user_id . '
AND c.cash_id = ' . (int) $meghivo_config['meghivo_cash_id'] . '
AND ca.cash_id = c.cash_id'
);
$sql = $db->sql_build_query('SELECT', $sql_ary);
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$adat = array(
'toke' => $row['cash_amt'],
'nev' => $row['cash_name']
);
}
else
{
if (in_array($this->points['tipus'], array(INVITE_SIMPLE_POINTS_SYSTEM, INVITE_ULTIMATE_POINTS_SYSTEM, INVITE_POINTS_MOD)))
{
$adat['nev'] = $config['points_name'];
}
else if ($this->points['tipus'] == INVITE_JV_POINTS_SYSTEM)
{
$adat['nev'] = $user->lang['JV_POINTS'];
}
else
{
$sql = 'SELECT points_name
FROM ' . POINTS_CONFIG_TABLE;
$result = $db->sql_query($sql);
$adat['nev'] = $db->sql_fetchfield('points_name');
$db->sql_freeresult($result);
}
if (!$user_id)
{
$adat['toke'] = $user->data[USER_POINTS];
}
else
{
$sql = 'SELECT ' . USER_POINTS . '
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $user_id;
$result = $db->sql_query($sql);
$adat['toke'] = (float) $db->sql_fetchfield(USER_POINTS);
$db->sql_freeresult($result);
}
}
return $adat;
}
function set_points($mode, $user_id, $amount, $update = true)
{
global $user, $db, $meghivo_config;
$result = false;
$mode = strtolower($mode);
switch ($mode)
{
case 'add':
if ($this->points['tipus'] == INVITE_CASH_MOD)
{
global $cash;
$result = $cash->give_cash($user_id, $amount, $meghivo_config['meghivo_cash_id']);
}
else
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . USER_POINTS . ' = ' . USER_POINTS . ' + ' . (float) $amount . '
WHERE user_id = ' . (int) $user_id;
$db->sql_query($sql);
$result = true;
}
break;
case 'subtract':
if ($this->points['tipus'] == INVITE_CASH_MOD)
{
global $cash;
$result = $cash->take_cash($user_id, $amount, $meghivo_config['meghivo_cash_id']);
}
else
{
if ($user->data[USER_POINTS] < $amount)
{
$result = false;
}
else
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . USER_POINTS . ' = ' . USER_POINTS . ' - ' . (float) $amount . '
WHERE user_id = ' . (int) $user_id;
$db->sql_query($sql);
$result = true;
}
}
break;
}
// If setting points was successful, update the users current total for display as well
if ($result && $user->data['user_id'] == $user_id)
{
if ($mode == 'add')
{
$this->points['total'] = $this->points['total'] + $amount;
}
else
{
$this->points['total'] = $this->points['total'] - $amount;
}
if ($update && defined('USER_POINTS'))
{
$user->data[USER_POINTS] = $this->points['total'];
}
}
return $result;
}
function number_format($num)
{
global $user;
$decimals = explode('.', $num);
if (isset($decimals[1]))
{
$decimals = strlen(rtrim($decimals[1], '0'));
}
else
{
$decimals = 0;
}
return number_format($num, $decimals, '.', ',');
}
function expired()
{
global $db, $meghivo_config;
$delete_ids = array();
$sql = 'SELECT id, meghivo_time_end FROM '. INVITE_TABLE .'
WHERE meghivo_time_end <= ' . (int) $meghivo_config['verify_time'] . '
ORDER BY meghivo_time_end DESC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$delete_ids[] = $row['id'];
$next_time = $row['meghivo_time_end'];
}
$db->sql_freeresult($result);
if (sizeof($delete_ids))
{
$this->delete_key($delete_ids);
$this->set_invite_config('verify_time', $next_time);
}
else
{
$next_time = (time() + 86400);
$this->set_invite_config('verify_time', $next_time);
}
}
function trans_lang($type, $dir)
{
global $user, $phpbb_root_path, $phpEx;
switch ($type)
{
case 'a':
$file = 'info_acp_meghivo';
break;
case 'u':
$file = 'info_ucp_meghivo';
break;
default:
$file = 'meghivo';
break;
}
$lang_file = $phpbb_root_path . 'language/' . $dir . "/mods/{$file}.{$phpEx}";
if($user->data['user_lang'] != $dir && file_exists($lang_file))
{
$lang = array();
include($lang_file);
}
else
{
$lang = $user->lang;
}
return $lang;
}
function default_group($user_id, &$user_new)
{
global $db, $config;
global $meghivo_config, $meghivo_user;
$invite_group_id = (int) $meghivo_config['invite_group'];
if ($meghivo_user == false || !$meghivo_config['invite_group_enabled'] || !$invite_group_id)
{
return;
}
if ($user_new && $meghivo_config['new_member_post_limit_ignored'] && $config['new_member_post_limit'])
{
$user_new = 0;
$config['new_member_post_limit'] = false;
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_new = 0
WHERE user_id = ' . (int) $user_id;
$db->sql_query($sql);
}
$sql = 'SELECT group_id, group_name
FROM ' . GROUPS_TABLE . "
WHERE group_id = $invite_group_id
AND group_type <> " . GROUP_SPECIAL;
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if ($row)
{
if (!in_array($row['group_name'], $this->disabled_groups(true)))
{
$add_group_id = (int) $row['group_id'];
if ($add_group_id)
{
// Because these actions only fill the log unneccessarily we skip the add_log() entry with a little hack. :/
$GLOBALS['skip_add_log'] = true;
if ($meghivo_config['default_group'])
{
group_user_add($add_group_id, $user_id, false, false, true);
$config['new_member_group_default'] = false;
}
else
{
group_user_add($add_group_id, $user_id);
}
unset($GLOBALS['skip_add_log']);
}
}
}
}
function add_invite_lang()
{
if (defined('INVITE_LANG_INC'))
{
return;
}
global $user;
define('INVITE_LANG_INC', true);
$user->add_lang('mods/meghivo');
}
function update_username($old_name, $new_name)
{
global $db;
$sql = 'UPDATE ' . INVITE_USERS_TABLE . "
SET user_name = '" . $db->sql_escape($new_name) . "'
WHERE user_name = '" . $db->sql_escape($old_name) . "'";
$db->sql_query($sql);
}
function disabled_groups($ary = false)
{
$return = "'BOTS', 'GUESTS', 'NEWLY_REGISTERED', 'REGISTERED_COPPA', 'REGISTERED', 'GLOBAL_MODERATORS', 'ADMINISTRATORS', 'ADMIN_CSOP'";
return ($ary) ? array($return) : $return;
}
}
?>
Código: Selecionar todos
<?php
/**
*
* @package acp
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
* @todo add cron intervals to server settings? (database_gc, queue_interval, session_gc, search_gc, cache_gc, warnings_gc)
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* @package acp
*/
class acp_board
{
var $u_action;
var $new_config = array();
function main($id, $mode)
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
// Invite Start
global $meghivo, $invite_install;
// Invite End
global $cache;
$user->add_lang('acp/board');
$action = request_var('action', '');
$submit = (isset($_POST['submit']) || isset($_POST['allow_quick_reply_enable'])) ? true : false;
$form_key = 'acp_board';
add_form_key($form_key);
/**
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable)
*/
switch ($mode)
{
case 'settings':
$display_vars = array(
'title' => 'ACP_BOARD_SETTINGS',
'vars' => array(
'legend1' => 'ACP_BOARD_SETTINGS',
'sitename' => array('lang' => 'SITE_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
'board_disable_msg' => false,
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => true),
'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'WARNINGS',
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'features':
$display_vars = array(
'title' => 'ACP_BOARD_FEATURES',
'vars' => array(
'legend1' => 'ACP_BOARD_FEATURES',
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_attachments' => array('lang' => 'ALLOW_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_report' => array('lang' => 'ALLOW_PM_REPORT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
'legend2' => 'ACP_LOAD_SETTINGS',
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'avatar':
$display_vars = array(
'title' => 'ACP_AVATAR_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AVATAR_SETTINGS',
'avatar_min_width' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'avatar_min_height' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'avatar_max_width' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'avatar_max_height' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => false, 'method' => false, 'explain' => false,),
'allow_avatar' => array('lang' => 'ALLOW_AVATARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_avatar_local' => array('lang' => 'ALLOW_LOCAL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_avatar_remote' => array('lang' => 'ALLOW_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_avatar_upload' => array('lang' => 'ALLOW_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_avatar_remote_upload'=> array('lang' => 'ALLOW_REMOTE_UPLOAD', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'avatar_filesize' => array('lang' => 'MAX_FILESIZE', 'validate' => 'int:0', 'type' => 'text:4:10', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'avatar_min' => array('lang' => 'MIN_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'avatar_max' => array('lang' => 'MAX_AVATAR_SIZE', 'validate' => 'int:0', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'avatar_path' => array('lang' => 'AVATAR_STORAGE_PATH', 'validate' => 'rwpath', 'type' => 'text:20:255', 'explain' => true),
'avatar_gallery_path' => array('lang' => 'AVATAR_GALLERY_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true)
)
);
break;
case 'message':
$display_vars = array(
'title' => 'ACP_MESSAGE_SETTINGS',
'lang' => 'ucp',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'allow_privmsg' => array('lang' => 'BOARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'pm_max_boxes' => array('lang' => 'BOXES_MAX', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'pm_max_msgs' => array('lang' => 'BOXES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'full_folder_action' => array('lang' => 'FULL_FOLDER_ACTION', 'validate' => 'int', 'type' => 'select', 'method' => 'full_folder_select', 'explain' => true),
'pm_edit_time' => array('lang' => 'PM_EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'pm_max_recipients' => array('lang' => 'PM_MAX_RECIPIENTS', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
'legend2' => 'GENERAL_OPTIONS',
'allow_mass_pm' => array('lang' => 'ALLOW_MASS_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_bbcode_pm' => array('lang' => 'ALLOW_BBCODE_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_smilies_pm' => array('lang' => 'ALLOW_SMILIES_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'post':
$display_vars = array(
'title' => 'ACP_POST_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_OPTIONS',
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_post_flash' => array('lang' => 'ALLOW_POST_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
'legend2' => 'POSTING',
'bump_type' => false,
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
'smilies_per_page' => array('lang' => 'SMILIES_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false),
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:1', 'type' => 'text:4:6', 'explain' => true),
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
);
//-- MOD : AOS Who Visited a Topic - Start -----------------------------------------------//
include($phpbb_root_path . 'includes/who_visited_a_topic.' . $phpEx);
aos_display_acp_options($display_vars);
//-- MOD : AOS Who Visited a Topic - End -------------------------------------------------//
break;
case 'signature':
$display_vars = array(
'title' => 'ACP_SIGNATURE_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_OPTIONS',
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'GENERAL_SETTINGS',
'max_sig_chars' => array('lang' => 'MAX_SIG_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'max_sig_urls' => array('lang' => 'MAX_SIG_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'max_sig_font_size' => array('lang' => 'MAX_SIG_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
'max_sig_smilies' => array('lang' => 'MAX_SIG_SMILIES', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
'max_sig_img_width' => array('lang' => 'MAX_SIG_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'max_sig_img_height' => array('lang' => 'MAX_SIG_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'registration':
$display_vars = array(
'title' => 'ACP_REGISTER_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
// Invite Start
'require_ac_invite' => ($invite_install) ? $meghivo->select_acc_invite() : '',
// Invite End
'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
'allow_name_chars' => array('lang' => 'USERNAME_CHARS', 'validate' => 'string', 'type' => 'select', 'method' => 'select_username_chars', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'legend2' => 'GENERAL_OPTIONS',
'allow_namechange' => array('lang' => 'ALLOW_NAME_CHANGE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'allow_emailreuse' => array('lang' => 'ALLOW_EMAIL_REUSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'enable_confirm' => array('lang' => 'VISUAL_CONFIRM_REG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
'max_reg_attempts' => array('lang' => 'REG_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'legend3' => 'COPPA',
'coppa_enable' => array('lang' => 'ENABLE_COPPA', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'coppa_mail' => array('lang' => 'COPPA_MAIL', 'validate' => 'string', 'type' => 'textarea:5:40', 'explain' => true),
'coppa_fax' => array('lang' => 'COPPA_FAX', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => false),
'legend4' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'feed':
$display_vars = array(
'title' => 'ACP_FEED_MANAGEMENT',
'vars' => array(
'legend1' => 'ACP_FEED_GENERAL',
'feed_enable' => array('lang' => 'ACP_FEED_ENABLE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'feed_http_auth' => array('lang' => 'ACP_FEED_HTTP_AUTH', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'legend2' => 'ACP_FEED_POST_BASED',
'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
'feed_overall' => array('lang' => 'ACP_FEED_OVERALL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'legend3' => 'ACP_FEED_TOPIC_BASED',
'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
'feed_topics_new' => array('lang' => 'ACP_FEED_TOPICS_NEW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_topics_active' => array('lang' => 'ACP_FEED_TOPICS_ACTIVE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
'legend4' => 'ACP_FEED_SETTINGS_OTHER',
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_exclude_id' => array('lang' => 'ACP_FEED_EXCLUDE_ID', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
)
);
break;
case 'cookie':
$display_vars = array(
'title' => 'ACP_COOKIE_SETTINGS',
'vars' => array(
'legend1' => 'ACP_COOKIE_SETTINGS',
'cookie_domain' => array('lang' => 'COOKIE_DOMAIN', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
'cookie_name' => array('lang' => 'COOKIE_NAME', 'validate' => 'string', 'type' => 'text::16', 'explain' => false),
'cookie_path' => array('lang' => 'COOKIE_PATH', 'validate' => 'string', 'type' => 'text::255', 'explain' => false),
'cookie_secure' => array('lang' => 'COOKIE_SECURE', 'validate' => 'bool', 'type' => 'radio:disabled_enabled', 'explain' => true)
)
);
break;
case 'load':
$display_vars = array(
'title' => 'ACP_LOAD_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'limit_load' => array('lang' => 'LIMIT_LOAD', 'validate' => 'string', 'type' => 'text:4:4', 'explain' => true),
'session_length' => array('lang' => 'SESSION_LENGTH', 'validate' => 'int:60', 'type' => 'text:5:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'active_sessions' => array('lang' => 'LIMIT_SESSIONS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
'load_online_time' => array('lang' => 'ONLINE_LENGTH', 'validate' => 'int:0', 'type' => 'text:4:3', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'legend2' => 'GENERAL_OPTIONS',
'load_db_track' => array('lang' => 'YES_POST_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_db_lastread' => array('lang' => 'YES_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_anon_lastread' => array('lang' => 'YES_ANON_READ_MARKING', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_online' => array('lang' => 'YES_ONLINE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_online_guests' => array('lang' => 'YES_ONLINE_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_onlinetrack' => array('lang' => 'YES_ONLINE_TRACK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_birthdays' => array('lang' => 'YES_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_unreads_search' => array('lang' => 'YES_UNREAD_SEARCH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'CUSTOM_PROFILE_FIELDS',
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'legend4' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'auth':
$display_vars = array(
'title' => 'ACP_AUTH_SETTINGS',
'vars' => array(
'legend1' => 'ACP_AUTH_SETTINGS',
'auth_method' => array('lang' => 'AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'select_auth_method', 'explain' => false)
)
);
break;
case 'server':
$display_vars = array(
'title' => 'ACP_SERVER_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SERVER_SETTINGS',
'gzip_compress' => array('lang' => 'ENABLE_GZIP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'PATH_SETTINGS',
'smilies_path' => array('lang' => 'SMILIES_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'icons_path' => array('lang' => 'ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'upload_icons_path' => array('lang' => 'UPLOAD_ICONS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'ranks_path' => array('lang' => 'RANKS_PATH', 'validate' => 'rpath', 'type' => 'text:20:255', 'explain' => true),
'legend3' => 'SERVER_URL_SETTINGS',
'force_server_vars' => array('lang' => 'FORCE_SERVER_VARS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
'legend4' => 'ACP_SUBMIT_CHANGES',
)
);
break;
case 'security':
$display_vars = array(
'title' => 'ACP_SECURITY_SETTINGS',
'vars' => array(
'legend1' => 'ACP_SECURITY_SETTINGS',
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
'ip_login_limit_max' => array('lang' => 'IP_LOGIN_LIMIT_MAX', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
'ip_login_limit_time' => array('lang' => 'IP_LOGIN_LIMIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'ip_login_limit_use_forwarded' => array('lang' => 'IP_LOGIN_LIMIT_USE_FORWARDED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'tpl_allow_php' => array('lang' => 'TPL_ALLOW_PHP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'form_token_lifetime' => array('lang' => 'FORM_TIME_MAX', 'validate' => 'int:-1', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
'form_token_sid_guests' => array('lang' => 'FORM_SID_GUESTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
)
);
break;
case 'email':
$display_vars = array(
'title' => 'ACP_EMAIL_SETTINGS',
'vars' => array(
'legend1' => 'GENERAL_SETTINGS',
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true),
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'string', 'type' => 'text:25:100', 'explain' => true),
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'SMTP_SETTINGS',
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0', 'type' => 'text:4:5', 'explain' => true),
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
'smtp_password' => array('lang' => 'SMTP_PASSWORD', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true),
'legend3' => 'ACP_SUBMIT_CHANGES',
)
);
break;
default:
trigger_error('NO_MODE', E_USER_ERROR);
break;
}
if (isset($display_vars['lang']))
{
$user->add_lang($display_vars['lang']);
}
$this->new_config = $config;
$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
$error = array();
// We validate the complete config if whished
validate_config_vars($display_vars['vars'], $cfg_array, $error);
if ($submit && !check_form_key($form_key))
{
$error[] = $user->lang['FORM_INVALID'];
}
// Do not write values if there is an error
if (sizeof($error))
{
$submit = false;
}
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
foreach ($display_vars['vars'] as $config_name => $null)
{
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
{
continue;
}
if ($config_name == 'auth_method' || $config_name == 'feed_news_id' || $config_name == 'feed_exclude_id')
{
continue;
}
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
if ($config_name == 'email_function_name')
{
$this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));
$this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];
$config_value = $this->new_config['email_function_name'];
}
if ($submit)
{
set_config($config_name, $config_value);
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
{
enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', log(FORUM_FLAG_QUICK_REPLY, 2));
}
}
}
// Store news and exclude ids
if ($mode == 'feed' && $submit)
{
$cache->destroy('_feed_news_forum_ids');
$cache->destroy('_feed_excluded_forum_ids');
$this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
$this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
}
if ($mode == 'auth')
{
// Retrieve a list of auth plugins and check their config values
$auth_plugins = array();
$dp = @opendir($phpbb_root_path . 'includes/auth');
if ($dp)
{
while (($file = readdir($dp)) !== false)
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
{
$auth_plugins[] = basename(preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file));
}
}
closedir($dp);
sort($auth_plugins);
}
$updated_auth_settings = false;
$old_auth_config = array();
foreach ($auth_plugins as $method)
{
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'acp_' . $method;
if (function_exists($method))
{
if ($fields = $method($this->new_config))
{
// Check if we need to create config fields for this plugin and save config when submit was pressed
foreach ($fields['config'] as $field)
{
if (!isset($config[$field]))
{
set_config($field, '');
}
if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
{
continue;
}
$old_auth_config[$field] = $this->new_config[$field];
$config_value = $cfg_array[$field];
$this->new_config[$field] = $config_value;
if ($submit)
{
$updated_auth_settings = true;
set_config($field, $config_value);
}
}
}
unset($fields);
}
}
}
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
{
$method = basename($cfg_array['auth_method']);
if ($method && in_array($method, $auth_plugins))
{
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
$method = 'init_' . $method;
if (function_exists($method))
{
if ($error = $method())
{
foreach ($old_auth_config as $config_name => $config_value)
{
set_config($config_name, $config_value);
}
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
}
}
set_config('auth_method', basename($cfg_array['auth_method']));
}
else
{
trigger_error('NO_AUTH_PLUGIN', E_USER_ERROR);
}
}
}
if ($submit)
{
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
$this->tpl_name = 'acp_board';
$this->page_title = $display_vars['title'];
$template->assign_vars(array(
'L_TITLE' => $user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('<br />', $error),
'U_ACTION' => $this->u_action)
);
// Output relevant page
foreach ($display_vars['vars'] as $config_key => $vars)
{
if (!is_array($vars) && strpos($config_key, 'legend') === false)
{
continue;
}
if (strpos($config_key, 'legend') !== false)
{
$template->assign_block_vars('options', array(
'S_LEGEND' => true,
'LEGEND' => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
);
continue;
}
$type = explode(':', $vars['type']);
$l_explain = '';
if ($vars['explain'] && isset($vars['lang_explain']))
{
$l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
}
else if ($vars['explain'])
{
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
}
$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
if (empty($content))
{
continue;
}
$template->assign_block_vars('options', array(
'KEY' => $config_key,
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
'S_EXPLAIN' => $vars['explain'],
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => $content,
)
);
unset($display_vars['vars'][$config_key]);
}
if ($mode == 'auth')
{
$template->assign_var('S_AUTH', true);
foreach ($auth_plugins as $method)
{
if ($method && file_exists($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx))
{
$method = 'acp_' . $method;
if (function_exists($method))
{
$fields = $method($this->new_config);
if ($fields['tpl'])
{
$template->assign_block_vars('auth_tpl', array(
'TPL' => $fields['tpl'])
);
}
unset($fields);
}
}
}
}
}
/**
* Select auth method
*/
function select_auth_method($selected_method, $key = '')
{
global $phpbb_root_path, $phpEx;
$auth_plugins = array();
$dp = @opendir($phpbb_root_path . 'includes/auth');
if (!$dp)
{
return '';
}
while (($file = readdir($dp)) !== false)
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
{
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
closedir($dp);
sort($auth_plugins);
$auth_select = '';
foreach ($auth_plugins as $method)
{
$selected = ($selected_method == $method) ? ' selected="selected"' : '';
$auth_select .= '<option value="' . $method . '"' . $selected . '>' . ucfirst($method) . '</option>';
}
return $auth_select;
}
/**
* Select mail authentication method
*/
function mail_auth_select($selected_method, $key = '')
{
global $user;
$auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP');
$s_smtp_auth_options = '';
foreach ($auth_methods as $method)
{
$s_smtp_auth_options .= '<option value="' . $method . '"' . (($selected_method == $method) ? ' selected="selected"' : '') . '>' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . '</option>';
}
return $s_smtp_auth_options;
}
/**
* Select full folder action
*/
function full_folder_select($value, $key = '')
{
global $user;
return '<option value="1"' . (($value == 1) ? ' selected="selected"' : '') . '>' . $user->lang['DELETE_OLDEST_MESSAGES'] . '</option><option value="2"' . (($value == 2) ? ' selected="selected"' : '') . '>' . $user->lang['HOLD_NEW_MESSAGES_SHORT'] . '</option>';
}
/**
* Select ip validation
*/
function select_ip_check($value, $key = '')
{
$radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NO_IP_VALIDATION');
return h_radio('config[ip_check]', $radio_ary, $value, $key);
}
/**
* Select referer validation
*/
function select_ref_check($value, $key = '')
{
$radio_ary = array(REFERER_VALIDATE_PATH => 'REF_PATH', REFERER_VALIDATE_HOST => 'REF_HOST', REFERER_VALIDATE_NONE => 'NO_REF_VALIDATION');
return h_radio('config[referer_validation]', $radio_ary, $value, $key);
}
/**
* Select account activation method
*/
function select_acc_activation($value, $key = '')
{
global $user, $config;
$radio_ary = array(
USER_ACTIVATION_DISABLE => 'ACC_DISABLE',
USER_ACTIVATION_NONE => 'ACC_NONE',
);
if ($config['email_enable'])
{
$radio_ary[USER_ACTIVATION_SELF] = 'ACC_USER';
$radio_ary[USER_ACTIVATION_ADMIN] = 'ACC_ADMIN';
}
$radio_text = h_radio('config[require_activation]', $radio_ary, $value, 'require_activation', $key, '<br />');
return $radio_text;
}
/**
* Maximum/Minimum username length
*/
function username_length($value, $key = '')
{
global $user;
return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="text" size="3" maxlength="3" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
* Allowed chars in usernames
*/
function select_username_chars($selected_value, $key)
{
global $user;
$user_char_ary = array('USERNAME_CHARS_ANY', 'USERNAME_ALPHA_ONLY', 'USERNAME_ALPHA_SPACERS', 'USERNAME_LETTER_NUM', 'USERNAME_LETTER_NUM_SPACERS', 'USERNAME_ASCII');
$user_char_options = '';
foreach ($user_char_ary as $user_type)
{
$selected = ($selected_value == $user_type) ? ' selected="selected"' : '';
$user_char_options .= '<option value="' . $user_type . '"' . $selected . '>' . $user->lang[$user_type] . '</option>';
}
return $user_char_options;
}
/**
* Maximum/Minimum password length
*/
function password_length($value, $key)
{
global $user;
return '<input id="' . $key . '" type="text" size="3" maxlength="3" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="text" size="3" maxlength="3" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];
}
/**
* Required chars in passwords
*/
function select_password_chars($selected_value, $key)
{
global $user;
$pass_type_ary = array('PASS_TYPE_ANY', 'PASS_TYPE_CASE', 'PASS_TYPE_ALPHA', 'PASS_TYPE_SYMBOL');
$pass_char_options = '';
foreach ($pass_type_ary as $pass_type)
{
$selected = ($selected_value == $pass_type) ? ' selected="selected"' : '';
$pass_char_options .= '<option value="' . $pass_type . '"' . $selected . '>' . $user->lang[$pass_type] . '</option>';
}
return $pass_char_options;
}
/**
* Select bump interval
*/
function bump_interval($value, $key)
{
global $user;
$s_bump_type = '';
$types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS');
foreach ($types as $type => $lang)
{
$selected = ($this->new_config['bump_type'] == $type) ? ' selected="selected"' : '';
$s_bump_type .= '<option value="' . $type . '"' . $selected . '>' . $user->lang[$lang] . '</option>';
}
return '<input id="' . $key . '" type="text" size="3" maxlength="4" name="config[bump_interval]" value="' . $value . '" /> <select name="config[bump_type]">' . $s_bump_type . '</select>';
}
/**
* Board disable option and message
*/
function board_disable($value, $key)
{
global $user;
$radio_ary = array(1 => 'YES', 0 => 'NO');
return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
}
/**
* Global quick reply enable/disable setting and button to enable in all forums
*/
function quick_reply($value, $key)
{
global $user;
$radio_ary = array(1 => 'YES', 0 => 'NO');
return h_radio('config[allow_quick_reply]', $radio_ary, $value) .
'<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
}
/**
* Select default dateformat
*/
function dateformat_select($value, $key)
{
global $user, $config;
// Let the format_date function operate with the acp values
$old_tz = $user->timezone;
$old_dst = $user->dst;
$user->timezone = $config['board_timezone'] * 3600;
$user->dst = $config['board_dst'] * 3600;
$dateformat_options = '';
foreach ($user->lang['dateformats'] as $format => $null)
{
$dateformat_options .= '<option value="' . $format . '"' . (($format == $value) ? ' selected="selected"' : '') . '>';
$dateformat_options .= $user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $user->lang['VARIANT_DATE_SEPARATOR'] . $user->format_date(time(), $format, true) : '');
$dateformat_options .= '</option>';
}
$dateformat_options .= '<option value="custom"';
if (!isset($user->lang['dateformats'][$value]))
{
$dateformat_options .= ' selected="selected"';
}
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
// Reset users date options
$user->timezone = $old_tz;
$user->dst = $old_dst;
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
}
/**
* Select multiple forums
*/
function select_news_forums($value, $key)
{
global $user, $config;
$forum_list = make_forum_select(false, false, true, true, true, false, true);
// Build forum options
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
foreach ($forum_list as $f_id => $f_row)
{
$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_NEWS, $f_row['forum_options']);
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
}
$s_forum_options .= '</select>';
return $s_forum_options;
}
function select_exclude_forums($value, $key)
{
global $user, $config;
$forum_list = make_forum_select(false, false, true, true, true, false, true);
// Build forum options
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
foreach ($forum_list as $f_id => $f_row)
{
$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $f_row['forum_options']);
$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
}
$s_forum_options .= '</select>';
return $s_forum_options;
}
function store_feed_forums($option, $key)
{
global $db, $cache;
// Get key
$values = request_var($key, array(0 => 0));
// Empty option bit for all forums
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_options = forum_options - ' . (1 << $option) . '
WHERE ' . $db->sql_bit_and('forum_options', $option, '<> 0');
$db->sql_query($sql);
// Already emptied for all...
if (sizeof($values))
{
// Set for selected forums
$sql = 'UPDATE ' . FORUMS_TABLE . '
SET forum_options = forum_options + ' . (1 << $option) . '
WHERE ' . $db->sql_in_set('forum_id', $values);
$db->sql_query($sql);
}
// Empty sql cache for forums table because options changed
$cache->destroy('sql', FORUMS_TABLE);
}
}
?>
Re: Erros após instalação phpBB Invite 2.0.1
Cara... baixe a versão 2.0.2 que é compatível com a versão 3.0.10 do phpBB e faça a instalação dele.
Eu estava comparando as edições no arquivo
Depois de baixar e descompactar o arquivo, abra em seu navegador o arquivo update.xml da pasta
Quanto a linguagem, os arquivos da pasta language/en da MOD você envia também para a pasta
Abraço.
Eu estava comparando as edições no arquivo
/includes/acp/acp_board.php
pelo install.xml e da versão 2.0.1 para a 2.0.2 todas estas edições são diferentes.Depois de baixar e descompactar o arquivo, abra em seu navegador o arquivo update.xml da pasta
\contrib\update\2.0.1-2.0.2\
, faça upload dos arquivos solicitados e acesse a pasta /install
para rodar a instalação.Quanto a linguagem, os arquivos da pasta language/en da MOD você envia também para a pasta
language/pt_br
de seu Fórum.Abraço.

[DICA] Antes de abrir um Novo Tópico, procure saber se a sua dúvida já foi respondida. Pesquise no Google por palavras(em inglês também) relacionadas à ela, somado à palavra "phpbb".