diff --git a/includes/config.local.php.sample b/includes/config.local.php.sample index bb363c6..d3b6385 100644 --- a/includes/config.local.php.sample +++ b/includes/config.local.php.sample @@ -142,3 +142,25 @@ define('PRIORITY_CATEGORIES', [ // Durée du cache en secondes // define('CACHE_DURATION', 3600); // 1 heure + +// ========================================= +// Configuration Mastodon +// ========================================= + +// URL de l'instance Mastodon +// define('MASTODON_INSTANCE_URL', 'https://mastodon.social'); + +// Format de date pour l'affichage des posts +// define('MASTODON_DATE_FORMAT', 'fr-FR'); + +// Texte du bouton "Voir plus" +// define('MASTODON_BTN_SEE_MORE', 'Voir plus de post'); + +// Texte du bouton "Rafraichir" +// define('MASTODON_BTN_RELOAD', 'Rafraichir'); + +// Nombre maximum de posts à récupérer +// define('MASTODON_MAX_POST_FETCH', '10'); + +// Nombre maximum de posts à afficher +// define('MASTODON_MAX_POST_SHOW', '10'); diff --git a/includes/config.php b/includes/config.php index 66bcbbd..f8fec74 100644 --- a/includes/config.php +++ b/includes/config.php @@ -38,6 +38,16 @@ if (!defined('PRIORITY_CATEGORIES')) { ]); } +// ========================================= +// Configuration Mastodon +// ========================================= +if (!defined('MASTODON_INSTANCE_URL')) define('MASTODON_INSTANCE_URL', 'https://mamot.fr'); +if (!defined('MASTODON_DATE_FORMAT')) define('MASTODON_DATE_FORMAT', 'fr-FR'); +if (!defined('MASTODON_BTN_SEE_MORE')) define('MASTODON_BTN_SEE_MORE', 'Voir plus de post'); +if (!defined('MASTODON_BTN_RELOAD')) define('MASTODON_BTN_RELOAD', 'Rafraichir'); +if (!defined('MASTODON_MAX_POST_FETCH')) define('MASTODON_MAX_POST_FETCH', '10'); +if (!defined('MASTODON_MAX_POST_SHOW')) define('MASTODON_MAX_POST_SHOW', '10'); + // Informations du site if (!defined('SITE_NAME')) define('SITE_NAME', 'Kaubuntu.re'); if (!defined('SITE_DESCRIPTION')) define('SITE_DESCRIPTION', 'Votre plateforme de médias libres'); diff --git a/index.php b/index.php index 3c3bb1f..b181d93 100644 --- a/index.php +++ b/index.php @@ -395,6 +395,6 @@ - + \ No newline at end of file diff --git a/js/mastodon-config.js b/js/mastodon-config.js deleted file mode 100644 index 27cec0d..0000000 --- a/js/mastodon-config.js +++ /dev/null @@ -1,10 +0,0 @@ -window.addEventListener("load", () => { - const myTimeline = new MastodonTimeline.Init({ - instanceUrl: 'https://mamot.fr', - dateFormatLocale: 'fr-FR', - btnSeeMore: "Voir plus de post", - btnReload: "Rafraichir", - maxNbPostFetch: '10', - maxNbPostShow: '10' - }); -}); diff --git a/js/mastodon-config.php b/js/mastodon-config.php new file mode 100644 index 0000000..d451f7f --- /dev/null +++ b/js/mastodon-config.php @@ -0,0 +1,17 @@ + +window.addEventListener("load", () => { + const mastodonTimeline = new MastodonTimeline.Init({ + instanceUrl: '', + dateFormatLocale: '', + btnSeeMore: "", + btnReload: "", + maxNbPostFetch: '', + maxNbPostShow: '' + }); +}); \ No newline at end of file