From a596436548fe8cbca9a1b5a17d06feab41755d3c Mon Sep 17 00:00:00 2001 From: Bob Le Bricodeur Date: Mon, 10 Nov 2014 20:09:47 +0100 Subject: [PATCH] use config options in index.php file --- config.inc.php | 8 ++++++-- index.php | 32 +++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/config.inc.php b/config.inc.php index a537d56..508c1a9 100644 --- a/config.inc.php +++ b/config.inc.php @@ -17,5 +17,9 @@ * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft) */ - $my_option = "test"; - $your_option = "test2"; \ No newline at end of file + /** + * index.php + */ + $show_what_is_that = true; + $show_the_software = true; + $show_cultivate_your_garden = true; \ No newline at end of file diff --git a/index.php b/index.php index 228a842..fce10cc 100644 --- a/index.php +++ b/index.php @@ -21,6 +21,7 @@ namespace Framadate; use Framadate\Utils; include_once __DIR__ . '/app/inc/init.php'; +include_once __DIR__ . '/app/inc/functions.inc.php'; if (is_readable('bandeaux_local.php')) { include_once('bandeaux_local.php'); @@ -33,7 +34,7 @@ session_start(); // affichage de la page Utils::print_header( _("Home") ); bandeau_titre(_("Make your polls")); -echo "test"; + echo '
@@ -52,8 +53,14 @@ echo '

-
-
+
'; + $nbcol = config_get('show_what_is_that') + config_get('show_the_software') + config_get('show_cultivate_your_garden'); + if ($nbcol > 0){ + $colmd = 12/$nbcol; // 3 =>col-md-4, 2 =>col-md-6, 1 =>col-md-12. + //echo "mon test : ".$nbActivation; + } + if(config_get('show_what_is_that') == true){ + echo '

'. _('What is that?') . '

'. _('Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'

@@ -65,8 +72,11 @@ echo '
  • '. _('Discuss and make a decision') . '
  • '. _('Do you want to ') . ''. _("view an example?") .'

    -
    -
    +
    '; + } + + if(config_get('show_the_software') == true){ + echo '

    '. _('The software') .'

    '. _('Framadate was initially based on '). 'Studs'. _(' a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.

    @@ -79,15 +89,19 @@ echo '
  • Opera 11+
  • '. _('It is governed by the ').''. _('CeCILL-B license').'.

    -
    -
    +
    '; + } + + if(config_get('show_cultivate_your_garden') == true){ + echo '

    '. _('Cultivate your garden') .'

    '. _('To participate in the software development, suggest improvements or simply download it, please visit ') .''._('the development site').'.


    '. _('If you want to install the software for your own use and thus increase your independence, we help you on:') .'

    framacloud.org

    -
    -
    '."\n"; +
    '; + } + echo '
    '."\n"; bandeau_pied();