cvs: pear /Translation2/docs/examples settings.php
| From: | Lorenzo Alberton | Date: | Fri, 12 Mar 2004 14:41:52 +0000 |
| Subject: | cvs: pear /Translation2/docs/examples settings.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17342@lists.php.net to get a copy of this message | ||
quipo Fri Mar 12 09:41:52 2004 EDT
Added files:
/pear/Translation2/docs/examples settings.php
Log:
forgot to commit the file yesterday...
http://cvs.php.net/co.php/pear/Translation2/docs/examples/settings.php?r=1.1&p=1
Index: pear/Translation2/docs/examples/settings.php
+++ pear/Translation2/docs/examples/settings.php
<?php
/****************************************************
* helper methods:
* debug(), writeTitle(), writeValue() and getValue()
****************************************************/
function debug($str='')
{
echo '<pre><div style="background-color: #ccffcc; border: 1px solid red;
padding-left: 4px;">';
print_r($str);
echo '</div></pre>';
}
function writeTitle($str='')
{
echo '<br /> <h2 style="padding: 5px; background-color: #ccccff; border: 1px
solid black;">'.$str.'</h2>';
}
function writeValue($desc='', $var)
{
echo '<div style="background-color: #f8f8f8; border: 1px solid #ccc; margin: 4px;
padding: 4px;">'. $desc .' = ';
var_dump($var);
echo '</div>';
}
function getValue($var, $color='red')
{
if (is_null($var)) {
$str = 'NULL';
} elseif (empty($var)) {
$str = 'EMPTY';
} else {
$str = $var;
}
return '<span style="background-color: '.$color.'; color: white; border:
1px solid black;">'.$str.'</span>';
}
define('TABLE_PREFIX', 'mytable_');
$dbinfo = array(
'hostspec' => 'host',
'database' => 'dbname',
'phptype' => 'mysql',
'username' => 'user',
'password' => 'pwd'
);
$params = array(
'langs_avail_table' => TABLE_PREFIX.'langs_avail',
'lang_id_col' => 'ID',
'lang_name_col' => 'name',
'lang_meta_col' => 'meta',
'lang_errmsg_col' => 'error_text',
'strings_tables' => array(
'en' => TABLE_PREFIX.'i18n',
'it' => TABLE_PREFIX.'i18n',
'de' => TABLE_PREFIX.'i18n',
//'es' => TABLE_PREFIX.'i18n',
//'fr' => TABLE_PREFIX.'i18n'
),
'string_id_col' => 'ID',
'string_page_id_col' => 'pageID',
'string_text_col' => '%s',
//'prefetch' => false //more queries, smaller result sets
//(use when db load is cheaper than network load)
);
/*
$cache_options = array(
'cacheDir' => 'cache/',
'lifeTime' => 3600*24 //one day
);
*/
?>