diff --git a/0.3/autoblog.php b/0.3/autoblog.php index d87db58..52a7870 100755 --- a/0.3/autoblog.php +++ b/0.3/autoblog.php @@ -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__); diff --git a/0.3/config.php b/0.3/config.php index 11524c9..33978c0 100755 --- a/0.3/config.php +++ b/0.3/config.php @@ -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 '%d results for %s': - return '%d résultats pour la recherche %s'; - 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 SebSauvage et Bohwaz.'; $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', */ +); ?> diff --git a/0.3/functions.php b/0.3/functions.php index c14c11e..e1d8f38 100755 --- a/0.3/functions.php +++ b/0.3/functions.php @@ -157,4 +157,44 @@ function debug($data) var_dump($data); echo ''; } + +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 '%d results for %s': + return '%d résultats pour la recherche %s'; + 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; + } +} ?> diff --git a/0.3/xsaf3.php b/0.3/xsaf3.php index 48de197..67a6215 100755 --- a/0.3/xsaf3.php +++ b/0.3/xsaf3.php @@ -1,6 +1,6 @@ '; -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 "

XSAF import finished

"; } elseif( DEBUG ) echo "

XSAF désactivé. Positionnez les variables ALLOW_NEW_AUTOBLOGS et ALLOW_NEW_AUTOBLOGS_BY_XSAF à TRUE dans le fichier config.php pour l'activer.

"; -if(DEBUG) { - echo "

XSAF import finished

"; -} if( DEBUG ) echo ''; ?>