From b48d0ac7ca2b7ace1ee515b55978a070b7887a6d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 8 Jun 2021 10:17:44 +0200 Subject: [PATCH] Add options --- conf/configuration.ini | 4 ++-- manifest.json | 20 ++++++++++++++++++++ scripts/install | 2 ++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/conf/configuration.ini b/conf/configuration.ini index f3ec175..c991389 100644 --- a/conf/configuration.ini +++ b/conf/configuration.ini @@ -1,5 +1,5 @@ ; Titre de votre wiki -Title = ChuWiki For YunoHost +Title = __TITLE__ ; Permet de ne pas utiliser le PathInfo ; Si votre PHP fonctionne en mode CGI, vous devrez passez @@ -24,4 +24,4 @@ Renderer = wiki2xhtml ; Smileys, thème et langue à utiliser SmileyPath = smileys/dkmsn ThemePath = theme/default -LanguagePath = lang/en +LanguagePath = lang/__LANGUAGE__ diff --git a/manifest.json b/manifest.json index a9ebc54..6a313c2 100644 --- a/manifest.json +++ b/manifest.json @@ -42,6 +42,26 @@ "type": "path", "example": "/chuwiki", "default": "/chuwiki" + }, + { + "name": "titre", + "type": "string", + "ask": { + "en": "Choose a title for the wiki you want to create", + "fr": "Choisissez un titre pour le wiki que vous souhaitez créer" + }, + "example": "ChuWiki", + "default": "ChuWiki" + }, + { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["fr", "en"], + "default": "fr" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index 659f42a..d0fbaf1 100755 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +title=$YNH_APP_ARG_TITLE app=$YNH_APP_INSTANCE_NAME @@ -44,6 +45,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=title --value=$title #================================================= # CREATE DEDICATED USER