Advertisement:

Author Topic: [Instalação Manual] As Regras  (Read 4862 times)

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,639
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
[Instalação Manual] As Regras
« on: January 30, 2011, 02:31:20 AM »

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
[/size]
Code: [Select]
   // How about the [search] button?
 if ($context['allow_search'])


[/size]
Code: [Select]
   // 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 . '">&nbsp;</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 . '">&nbsp;</td>' : '';



./index.php
[/size]
Code: [Select]
      'search' => array('Search.php', 'PlushSearch1'),

[/size]
Code: [Select]
      'rules' => array('Rules.php', 'Rules'),


./Sources/ModSettings.php
[/size]
Code: [Select]
   $context['sub_template'] = 'show_settings';


 $subActions = array(
    'basic' => 'ModifyBasicSettings',
    'layout' => 'ModifyLayoutSettings',


[/size]
Code: [Select]
      'rules' => 'ModifyRulesSettings',

[/size]
Code: [Select]
         'layout' => array(
          'title' => $txt['mods_cat_layout'],
          'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
       ),


[/size]
Code: [Select]
         'rules' => array(
          'title' => $txt['mods_cat_rules'],
          'href' => $scripturl . '?action=featuresettings;sa=rules;sesc=' . $context['session_id'],
       ),


[/size]
Code: [Select]
   require_once($sourcedir . '/ManageServer.php');


 $subActions = array(
    'basic' => 'ModifyBasicSettings',
    'layout' => 'ModifyLayoutSettings',


[/size]
Code: [Select]
      'rules' => 'ModifyRulesSettings',

[/size]
Code: [Select]
?>

[/size]
Code: [Select]
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
[/size]
Code: [Select]
?>

[/size]
Code: [Select]
$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
[/size]
Code: [Select]
?>


[/size]
Code: [Select]
// MOD The Rules - Translation by Candidosa2
$txt['the_rules_not_configured'] = 'Este recurso ainda n&atilde;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&aacute;gina das regras:';
$txt['the_rules_agreement_display_name'] = 'Mostrar nome da p&aacute;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&aacute;gina adicional:';
$txt['the_rules_additional_text'] = 'O texto adicional para mostrar:';
$txt['the_rules_enable_additional'] = 'Activar para mostrar a p&aacute;gina adicional:';
$txt['rules_title_additional'] = 'Adicional';
$txt['rules_title_agreement'] = 'Acordo';
$txt['the_rules_enable_agreement'] = 'Activar para mostrar p&aacute;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.