This is an old revision of the document!


Editor de configurações locais (LocalFiles Editor)

O que é isso?

O LocalFiles Editor é um plugin que vem pré instalado no Piwigo e pode ser ativado acessando [ Administração » Plugins » Gerenciar ] e clicando em ativar o LocalFiles Editor. Uma vez ativado, o acesso é feito em [ Administração » Plugins » LocalFiles Editor]

O Piwigo tem um painel de administração gráfico onde muitas opções podem ser modificas em poucos cliques. Mas o Piwigo permite muito mais customização. Para manter as opções essenciais facilmente identificáveis, todas as demais opções estão disponíveis em um arquivo de configuração. O arquivo de configuração padrão, que NUNCA deve ser modificado, está em include/config_default.inc.php: ele é um arquivo essencial e deve ser consultado para saber o que são as opções adicionais mas nunca modificado!

How to change it?

The best way is to use the plugin LocalFiles Editor, available as a default plugin in any Piwigo installation :

  • Go to [ Administration » Plugins » Manage ] and activate LocalFiles Editor : if you don't find it, click on the tab [ Other Plugins available ], and install it
  • Go to [ Administration » Plugins » LocalFiles Editor ] : the Local Config page is directly displayed, because that's the first of the five tabs of this plugin.
  • There you can
    • check the default config file, by clicking on Display reference file: “config_default.inc.php” : it contains almost all the variables you can change
    • change these variables by typing inside the text field where you currently see something like “File does not exist and will be created by LocalFiles Editor”


The Local Config uses a PHP syntax:
$conf['NAME OF THE VARIABLE'] = VALUE_OF_THE_VARIABLE;
For example
$conf['top_number'] = 15;
$conf['comment_spam_reject'] = true;
$conf['newcat_default_status'] = 'public';

The workflow:

  • find the variable you need or about which you want explanation by displaying and searching (Ctrl+F) inside the reference file, “config_default.inc.php”.
  • copy the reference variable or the one given on the forum/doc, like

// newcat_default_visible : at creation, must a category be visible or not ?
// Warning : if the parent category is invisible, the category is
// automatically create invisible. (invisible = locked)
$conf['newcat_default_visible'] = true;\\

  • paste it inside the text field, where you currently see something like “File does not exist and will be created by LocalFiles Editor” if you have never changed the local config
  • change the value according to explanotory text (above each variable), like $conf['newcat_default_visible'] = false;
  • click Save File
  • it should display
  File written successfully.
  Backup file created (local/config/config.inc.bak.php)

You can revert your changes by restoring the backup file.

Additional info

The plugin itself handle the php tags: <?php at the beginning and ?> at the end.
The file location is local/config/config.inc.php.

 
Back to top
conf_locale.1393357595.txt.gz · Last modified: 2014/02/25 19:46 by msakik
 
 
github twitter newsletter Doar Piwigo.org © 2002-2024 · Contato