init_ihm.php can be set in each theme for specifics init

This commit is contained in:
Cyrille de Lambert 2011-08-18 23:16:07 +00:00
parent dcbc3c99f3
commit bed67a87bb
3 changed files with 30 additions and 10 deletions

View File

@ -20,7 +20,7 @@
/**
* \file htdocs/admin/ihm.php
* \brief Page to setup GUI display options
* \version $Id: ihm.php,v 1.131 2011/08/10 23:48:09 eldy Exp $
* \version $Id: ihm.php,v 1.132 2011/08/18 23:17:23 cdelambert Exp $
*/
require("../main.inc.php");
@ -67,6 +67,9 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/init_ihm.php')){
include_once (DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/init_ihm.php');
}
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity);
@ -406,5 +409,5 @@ else // Show
$db->close();
llxFooter('$Date: 2011/08/10 23:48:09 $ - $Revision: 1.131 $');
llxFooter('$Date: 2011/08/18 23:17:23 $ - $Revision: 1.132 $');
?>

View File

@ -25,7 +25,7 @@
* \file htdocs/main.inc.php
* \ingroup core
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
* \version $Id: main.inc.php,v 1.764 2011/08/18 21:09:48 eldy Exp $
* \version $Id: main.inc.php,v 1.765 2011/08/18 23:17:23 cdelambert Exp $
*/
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
@ -843,14 +843,12 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Displays meta
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
print '<meta name="author" content="Dolibarr Development Team">'."\n";
if (! empty($conf->global->MAIN_USEFAVICON_THEME) && file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico'))
{
print '<link rel="shortcut icon" type="image/x-icon" href="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico">'."\n";
}
else
{
print '<link rel="shortcut icon" type="image/x-icon" href="'.DOL_URL_ROOT.'/favicon.ico">'."\n";
if (!empty($conf->global->MAIN_FAVICON_THEME) ){
$favicon=$conf->global->MAIN_FAVICON_THEME;
}else{
$favicon=DOL_URL_ROOT.'/favicon.ico';
}
print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n";;
// Displays title
$appli='Dolibarr';
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE;

View File

@ -0,0 +1,19 @@
<?php
/* Copyright (C) 2011 Cyrille de Lambert <cyrille.delambert@auguria.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
dolibarr_set_const($db, "MAIN_FAVICON_THEME", DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico','chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_JS_ON_PAYMENT", 1,'chaine',0,'',$conf->entity);