Original e Download Link:http://custom.simplemachines.org/mods/index.php?mod=1343
Modo Nome: The Rules
Criado por: Deprecated
Última versão: 1.3
Compatível com: 1.1.x, 2.0 rc4
Pacote de instalação: O link original
Instalação Manual: Sim / Por Candidosa2
./Themes/default/index.template.php
// How about the [search] button?
if ($context['allow_search'])
// Show the [rules] button.
global $user_info, $modSettings;
if (!$user_info['is_guest'] || !empty($modSettings['rules_enable_guest_access']))
echo ($current_action == 'rules' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'rules' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=rules">' , $txt['rules'] , '</a>
</td>' , $current_action == 'rules' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
./index.php
'search' => array('Search.php', 'PlushSearch1'),
'rules' => array('Rules.php', 'Rules'),
./Sources/ModSettings.php
$context['sub_template'] = 'show_settings';
$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'rules' => 'ModifyRulesSettings',
'layout' => array(
'title' => $txt['mods_cat_layout'],
'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
),
'rules' => array(
'title' => $txt['mods_cat_rules'],
'href' => $scripturl . '?action=featuresettings;sa=rules;sesc=' . $context['session_id'],
),
require_once($sourcedir . '/ManageServer.php');
$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'rules' => 'ModifyRulesSettings',
?>
function ModifyRulesSettings()
{
global $txt, $scripturl, $context, $settings, $sc;
$config_vars = array(
array('check', 'rules_enable_guest_access'),
'',
array('text', 'the_rules_display_name', '20'),
array('large_text', 'the_rules_text', '12'),
'',
array('check', 'the_rules_enable_agreement'),
array('text', 'the_rules_agreement_display_name'),
'',
array('check', 'the_rules_enable_additional'),
array('text', 'the_rules_additional_display_name', '20'),
array('large_text', 'the_rules_additional_text', '12'),
);
if (isset($_GET['save']))
{
checkSession();
saveDBSettings($config_vars);
writeLog();
redirectexit('action=featuresettings;sa=rules');
}
$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=rules';
$context['settings_title'] = $txt['rules_title'];
prepareDBSettingContext($config_vars);
}
./Themes/default/languages/Modifications.english.php
?>
$txt['the_rules_not_configured'] = 'This feature has not yet been configured by the administrator.';
$txt['agreement'] = 'Agreement';
$txt['rules_enable_guest_access'] = 'Enable guest access:';
$txt['the_rules_display_name'] = 'Display name of rules page:';
$txt['the_rules_agreement_display_name'] = 'Display name of agreement page:';
$txt['mods_cat_rules'] = 'The Rules';
$txt['rules'] = 'Rules';
$txt['rules_title']='The Rules';
$txt['rules_title_rules'] = 'Rules';
$txt['the_rules_text'] = 'Text to display:';
$txt['additional'] = 'Additional';
$txt['the_rules_additional_display_name'] = 'Display name of additional page:';
$txt['the_rules_additional_text'] = 'Additional text to display:';
$txt['the_rules_enable_additional'] = 'Enable display of additional page:';
$txt['rules_title_additional'] = 'Additional';
$txt['rules_title_agreement'] = 'Agreement';
$txt['the_rules_enable_agreement'] = 'Enable display of agreement.txt page:';
$txt['the_rules_edit_name'] = 'Edit agreement.txt';
./Themes/default/languages/Modifications.teuidioma.php
?>
// MOD The Rules - Translation by Candidosa2
$txt['the_rules_not_configured'] = 'Este recurso ainda não foi configurado pelo administrador.';
$txt['agreement'] = 'Acordo';
$txt['rules_enable_guest_access'] = 'Activar o acesso para os visitantes:';
$txt['rules_enable_member_access'] = 'Activar o acesso para os membros:';
$txt['the_rules_display_name'] = 'Mostrar o nome da página das regras:';
$txt['the_rules_agreement_display_name'] = 'Mostrar nome da página do acordo:';
$txt['mods_cat_rules'] = 'As Regras';
$txt['rules'] = 'Regras';
$txt['rules_tab_label'] = 'Regras etiqueta separador:';
$txt['rules_title']='As Regras';
$txt['rules_title_rules'] = 'Regras';
$txt['the_rules_text'] = 'Mostrar o Texto:';
$txt['additional'] = 'Adicional';
$txt['the_rules_additional_display_name'] = 'Mostra o nome da página adicional:';
$txt['the_rules_additional_text'] = 'O texto adicional para mostrar:';
$txt['the_rules_enable_additional'] = 'Activar para mostrar a página adicional:';
$txt['rules_title_additional'] = 'Adicional';
$txt['rules_title_agreement'] = 'Acordo';
$txt['the_rules_enable_agreement'] = 'Activar para mostrar página agreement.txt:';
$txt['the_rules_edit_name'] = 'Editar agreement.txt';
Ficheiro Rules.php tem que colocar na pas ". / Sources".
O ficheiro Rules.template.php tem que colocar nas ". /Themes/default" ou do teu themes personalizado.