From 09991be2aad94becefee58547cf8691044dd5333 Mon Sep 17 00:00:00 2001 From: Bob Le Bricodeur Date: Tue, 11 Nov 2014 20:56:03 +0100 Subject: [PATCH] new variable $user_can_add_link_or_url to choose if the http link can be displayed during poll creation --- choix_autre.php | 17 +++++++++++------ config.inc.php | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/choix_autre.php b/choix_autre.php index 8c0b268..0ec091a 100644 --- a/choix_autre.php +++ b/choix_autre.php @@ -175,9 +175,11 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp echo '

'. _("To make a generic poll you need to propose at least two choices between differents subjects.") .'

-

'. _("You can add or remove additional choices with the buttons") .' '. _("Remove") .' '. _("Add") .'

-

'. _("It's possible to propose links or images by using "). ''. _("the Markdown syntax") .'.

-
'."\n"; +

'. _("You can add or remove additional choices with the buttons") .' '. _("Remove") .' '. _("Add") .'

'; + if(config_get('user_can_add_link_or_url')){ + echo '

'. _("It's possible to propose links or images by using "). ''. _("the Markdown syntax") .'.

'; + } + echo ' '."\n"; // Fields choices : 5 by default $nb_choices = (isset($_SESSION['choices'])) ? max(count($_SESSION['choices']), 5) : 5; @@ -187,9 +189,12 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
- -   -
+ '; + if(config_get('user_can_add_link_or_url')){ + echo ' '; + } + echo ' +
'."\n"; } diff --git a/config.inc.php b/config.inc.php index b9ef90d..824e92c 100644 --- a/config.inc.php +++ b/config.inc.php @@ -46,4 +46,7 @@ //default values for the new poll duration (number of days). $default_poll_duration = 180; + //user can add link or URL when creating his poll. + $user_can_add_link_or_url = false; + \ No newline at end of file