Config update
This commit is contained in:
parent
848a7b9559
commit
c613b5da50
4 changed files with 59 additions and 55 deletions
|
@ -21,10 +21,15 @@ libxml_disable_entity_loader(true);
|
|||
|
||||
// Config and data file locations
|
||||
|
||||
if (file_exists(__DIR__ . '/config.php'))
|
||||
{
|
||||
if (file_exists(__DIR__ . '/config.php')) {
|
||||
require_once __DIR__ . '/config.php';
|
||||
}
|
||||
else die("Configuration file not found.");
|
||||
|
||||
if (file_exists(__DIR__ . '/functions.php')){
|
||||
require_once __DIR__ . '/functions.php';
|
||||
}
|
||||
else die("Functions file not found.");
|
||||
|
||||
if (!defined('ROOT_DIR'))
|
||||
define('ROOT_DIR', __DIR__);
|
||||
|
|
|
@ -7,46 +7,6 @@ define('LOCAL_URI', '');
|
|||
date_default_timezone_set('Europe/Paris');
|
||||
setlocale(LC_TIME, 'fr_FR.UTF-8', 'fr_FR', 'fr');
|
||||
|
||||
function __($str)
|
||||
{
|
||||
switch ($str)
|
||||
{
|
||||
case 'Search':
|
||||
return 'Recherche';
|
||||
case 'Update':
|
||||
return 'Mise à jour';
|
||||
case 'Updating database... Please wait.':
|
||||
return 'Mise à jour de la base de données, veuillez patienter...';
|
||||
case '<b>%d</b> results for <i>%s</i>':
|
||||
return '<b>%d</b> résultats pour la recherche <i>%s</i>';
|
||||
case 'Not Found':
|
||||
return 'Introuvable';
|
||||
case 'Article not found.':
|
||||
return 'Cet article n\'a pas été trouvé.';
|
||||
case 'Older':
|
||||
return 'Plus anciens';
|
||||
case 'Newer':
|
||||
return 'Plus récents';
|
||||
case 'RSS Feed':
|
||||
return 'Flux RSS';
|
||||
case 'Update complete!':
|
||||
return 'Mise à jour terminée !';
|
||||
case 'Click here to reload this webpage.':
|
||||
return 'Cliquez ici pour recharger cette page.';
|
||||
case 'Source:':
|
||||
return 'Source :';
|
||||
case '_date_format':
|
||||
return '%A %e %B %Y à %H:%M';
|
||||
case 'configuration':
|
||||
case 'articles':
|
||||
return $str;
|
||||
case 'Media export':
|
||||
return 'Export fichiers media';
|
||||
default:
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
define( 'ALLOW_FULL_UPDATE', TRUE );
|
||||
// Check new version on Github
|
||||
define( 'ALLOW_CHECK_UPDATE', TRUE );
|
||||
|
@ -78,4 +38,12 @@ $logo="./icon-logo.svg";
|
|||
$HTML_footer='D\'après les premières versions de <a href="http://sebsauvage.net">SebSauvage</a> et <a href="http://bohwaz.net/">Bohwaz</a>.';
|
||||
|
||||
$head_title = "";
|
||||
|
||||
/* And now, the XSAF links to be imported, with maximal execusion time for import in second !
|
||||
You should add only trusted sources. */
|
||||
$autoblog_farm = array(
|
||||
'https://raw.github.com/mitsukarenai/xsaf-bootstrap/master/3.json' /*,
|
||||
'https://www.ecirtam.net/autoblogs/?export',
|
||||
'https://autoblog.suumitsu.eu/?export', */
|
||||
);
|
||||
?>
|
||||
|
|
|
@ -157,4 +157,44 @@ function debug($data)
|
|||
var_dump($data);
|
||||
echo '</pre>';
|
||||
}
|
||||
|
||||
function __($str)
|
||||
{
|
||||
switch ($str)
|
||||
{
|
||||
case 'Search':
|
||||
return 'Recherche';
|
||||
case 'Update':
|
||||
return 'Mise à jour';
|
||||
case 'Updating database... Please wait.':
|
||||
return 'Mise à jour de la base de données, veuillez patienter...';
|
||||
case '<b>%d</b> results for <i>%s</i>':
|
||||
return '<b>%d</b> résultats pour la recherche <i>%s</i>';
|
||||
case 'Not Found':
|
||||
return 'Introuvable';
|
||||
case 'Article not found.':
|
||||
return 'Cet article n\'a pas été trouvé.';
|
||||
case 'Older':
|
||||
return 'Plus anciens';
|
||||
case 'Newer':
|
||||
return 'Plus récents';
|
||||
case 'RSS Feed':
|
||||
return 'Flux RSS';
|
||||
case 'Update complete!':
|
||||
return 'Mise à jour terminée !';
|
||||
case 'Click here to reload this webpage.':
|
||||
return 'Cliquez ici pour recharger cette page.';
|
||||
case 'Source:':
|
||||
return 'Source :';
|
||||
case '_date_format':
|
||||
return '%A %e %B %Y à %H:%M';
|
||||
case 'configuration':
|
||||
case 'articles':
|
||||
return $str;
|
||||
case 'Media export':
|
||||
return 'Export fichiers media';
|
||||
default:
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define('DEBUG', true);
|
||||
define('DEBUG', false);
|
||||
define('XSAF_VERSION', 3);
|
||||
define('AUTOBLOG_FILE_NAME', 'autoblog.php');
|
||||
define('ALLOW_REMOTE_DB_DL', false);
|
||||
|
@ -154,25 +154,16 @@ function xsafimport($xsafremote, $max_exec_time) {
|
|||
return;
|
||||
}
|
||||
|
||||
/* And now, the XSAF links to be imported, with maximal execusion time for import in second !
|
||||
You should add only trusted sources. */
|
||||
$autoblog_farm = array(
|
||||
'https://raw.github.com/mitsukarenai/xsaf-bootstrap/master/3.json' /*,
|
||||
'https://www.ecirtam.net/autoblogs/?export',
|
||||
'https://autoblog.suumitsu.eu/?export', */
|
||||
);
|
||||
if( DEBUG ) echo '<html><body>';
|
||||
if( ALLOW_NEW_AUTOBLOGS and ALLOW_NEW_AUTOBLOGS_BY_XSAF ) {
|
||||
foreach( $autoblog_farm AS $value ) {
|
||||
if( ALLOW_NEW_AUTOBLOGS and ALLOW_NEW_AUTOBLOGS_BY_XSAF && !empty($xsaf_farm) ) {
|
||||
foreach( $xsaf_farm AS $value ) {
|
||||
if( !empty($value) )
|
||||
xsafimport($value, EXEC_TIME);
|
||||
}
|
||||
if(DEBUG) echo "<p>XSAF import finished</p>";
|
||||
}
|
||||
elseif( DEBUG )
|
||||
echo "<p>XSAF désactivé. Positionnez les variables ALLOW_NEW_AUTOBLOGS et ALLOW_NEW_AUTOBLOGS_BY_XSAF à TRUE dans le fichier config.php pour l'activer.</p>";
|
||||
|
||||
if(DEBUG) {
|
||||
echo "<p>XSAF import finished</p>";
|
||||
}
|
||||
if( DEBUG ) echo '</body></html>';
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue