[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction


The mes_options.php file

June 2010

All the versions of this article:

The mes_options.php file (since SPIP 1.7, SPIP 1.7.2 ) offers the possibility of modifying SPIP’s default configuration [1].

If it has not already been created, this file must be created in the config/ directory (in versions of SPIP prior to 1.9.2, this file was located in the ecrire/ directory).

Whenever this file does exist, it is automatically included for the display of every page (both for the private and public zones of the web site); so be careful not fill it with useless junk.

mes_options.php is a PHP executable file, so it must start with <?php and end with ?> (be extremely vigilant here: there must not be any characters, spaces or blank lines before the opening tag <?php nor any after the closing tag ?>).

-  An example of the mes_options.php file:


// forbid upload documents that are bigger than 200 KB
define('_DOC_MAX_SIZE', 200);

// forbid the execution of all JavaScript scripts
// that are embedded in user-entered text
$filtrer_javascript = -1;

// force the display of the drop-down menu starting in 1998 for
// the "Date of previous publication" field
$debut_date_publication = '1998';

// never display the numeric prefix entered in a title
$table_des_traitements['TITRE'][]= 'typo(supprimer_numero(%s))';



[1refer to the section about personalisations

Show the template of this page Site powered by SPIP | Translation area | Private area