Translation2
[ class tree: Translation2 ] [ index: Translation2 ] [ all elements ]

Source for file settings.php

Documentation is available at settings.php

  1. <?php
  2. /****************************************************
  3.  * helper methods:
  4.  * debug(), writeTitle(), writeValue() and getValue()
  5.  ****************************************************/
  6. function debug($str='')
  7. {
  8.     echo '<pre><div style="background-color: #ccffcc; border: 1px solid red; padding-left: 4px;">';
  9.     print_r($str);
  10.     echo '</div></pre>';
  11. }
  12. function writeTitle($str='')
  13. {
  14.     echo '<br /> <h2 style="padding: 5px; background-color: #ccccff; border: 1px solid black;">'.$str.'</h2>';
  15. }
  16. function writeValue($desc=''$var)
  17. {
  18.     echo '<div style="background-color: #f8f8f8; border: 1px solid #ccc; margin: 4px; padding: 4px;">'$desc .' = ';
  19.     var_dump($var);
  20.     echo '</div>';
  21. }
  22. function getValue($var$color='red')
  23. {
  24.     if (is_null($var)) {
  25.         $str 'NULL';
  26.     elseif (empty($var)) {
  27.         $str 'EMPTY';
  28.     else {
  29.         $str $var;
  30.     }
  31.     return '<span style="background-color: '.$color.'; color: white; border: 1px solid black;">'.$str.'</span>';
  32. }
  33.  
  34. define('TABLE_PREFIX''mytable_');
  35.  
  36. $dbinfo = array(
  37.     'hostspec' => 'host',
  38.     'database' => 'dbname',
  39.     'phptype'  => 'mysql',
  40.     'username' => 'user',
  41.     'password' => 'pwd'
  42. );
  43.  
  44. $params = array(
  45.     'langs_avail_table' => TABLE_PREFIX.'langs_avail',
  46.     'lang_id_col'       => 'id',
  47.     'lang_name_col'     => 'name',
  48.     'lang_meta_col'     => 'meta',
  49.     'lang_errmsg_col'   => 'error_text',
  50.     'lang_encoding_col' => 'encoding',
  51.     /*
  52.     'strings_tables'  => array(
  53.                             'en' => TABLE_PREFIX.'i18n',
  54.                             'it' => TABLE_PREFIX.'i18n',
  55.                             'de' => TABLE_PREFIX.'i18n',
  56.                          ),
  57.     */
  58.     'strings_default_table' => TABLE_PREFIX.'i18n',  //if you only use one table for all langs, set it here
  59.     'string_id_col'         => 'id',
  60.     'string_page_id_col'    => 'page_id',
  61.     'string_text_col'       => '%s',
  62.     //'prefetch' => false  //more queries, smaller result sets
  63.                            //(use when db load is cheaper than network load)
  64. );
  65.  
  66. $driver 'MDB2';
  67.  
  68. $cache_options = array(
  69.     'cacheDir' => 'cache/'//default is /tmp/
  70.     'lifeTime' => 3600*24,  //default is 3600 (1 minute)
  71. );

Documentation generated on Mon, 11 Mar 2019 15:41:51 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.