diff --git a/htdocs/admin/website.php b/htdocs/admin/websites.php similarity index 100% rename from htdocs/admin/website.php rename to htdocs/admin/websites.php diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsites.class.php similarity index 75% rename from htdocs/core/modules/modWebsite.class.php rename to htdocs/core/modules/modWebsites.class.php index 90ffc7df6fa64450904357cfbdd61695f50e60c7..8e019fabed82368c13b31c3aa8e5961240041936 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsites.class.php @@ -16,19 +16,19 @@ */ /** - * \defgroup website Module website - * \brief Website module descriptor. - * \file htdocs/core/modules/modWebsite.class.php - * \ingroup website - * \brief Description and activation file for module Website + * \defgroup websites Module websites + * \brief Websites module descriptor. + * \file htdocs/core/modules/modWebsites.class.php + * \ingroup websites + * \brief Description and activation file for module Websites */ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; /** - * Class to describe Website module + * Class to describe Websites module */ -class modWebsite extends DolibarrModules +class modWebsites extends DolibarrModules { /** @@ -63,7 +63,7 @@ class modWebsite extends DolibarrModules // Config pages //------------- - $this->config_page_url = array('website.php'); + $this->config_page_url = array('websites.php'); // Dependancies //------------- @@ -71,7 +71,7 @@ class modWebsite extends DolibarrModules $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->langfiles = array("website"); + $this->langfiles = array("websites"); // Constants //----------- @@ -87,7 +87,7 @@ class modWebsite extends DolibarrModules // Permissions $this->rights = array(); // Permission array used by this module - $this->rights_class = 'website'; + $this->rights_class = 'websites'; $r=0; $this->rights[$r][0] = 10001; @@ -110,14 +110,15 @@ class modWebsite extends DolibarrModules // Main menu entries $r=0; - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + $this->menu[$r]=array( 'fk_menu'=>'0', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'top', // This is a Left menu entry - 'titre'=>'Website', - 'url'=>'/website/index.php', - 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'titre'=>'Websites', + 'mainmenu'=>'websites', + 'url'=>'/websites/index.php', + 'langs'=>'websites', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>100, - 'enabled'=>'$conf->website->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'$user->rights->website->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules + 'enabled'=>'$conf->websites->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'perms'=>'$user->rights->websites->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both $r++; diff --git a/htdocs/websites/frametop.php b/htdocs/websites/frametop.php new file mode 100644 index 0000000000000000000000000000000000000000..f33c8ae61a2287a673c434b1fb2d6d67cb8ae55d --- /dev/null +++ b/htdocs/websites/frametop.php @@ -0,0 +1,31 @@ +<?php +/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.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 3 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/>. + */ + +/** + * \file htdocs/externalsite/frametop.php + * \ingroup externalsite + * \brief Top frame to show external web application + */ + +require ("../main.inc.php"); + +$langs->load("externalsite"); + +top_htmlhead("",""); +top_menu("","","_top"); + diff --git a/htdocs/websites/index.html b/htdocs/websites/index.html new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php new file mode 100644 index 0000000000000000000000000000000000000000..b007725ec3cdd9ddf0bb8d727558623c402a6440 --- /dev/null +++ b/htdocs/websites/index.php @@ -0,0 +1,71 @@ +<?php +/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.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 3 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/>. + * + */ + +/** + * \file htdocs/externalsite/frames.php + * \ingroup externalsite + * \brief Page that build two frames: One for menu, the other for the target page to show + * \author Laurent Destailleur + */ + +require '../main.inc.php'; + +$langs->load("externalsite"); + +if (empty($conf->global->EXTERNALSITE_URL)) +{ + llxHeader(); + print '<div class="error">'.$langs->trans('ExternalSiteModuleNotComplete').'</div>'; + llxFooter(); +} + +$mainmenu=GETPOST('mainmenu', 'alpha'); +$leftmenu=GETPOST('leftmenu', 'alpha'); +$idmenu=GETPOST('idmenu', 'int'); +$theme=GETPOST('theme', 'alpha'); +$codelang=GETPOST('lang', 'alpha'); + +print " +<html> +<head> +<title>Dolibarr frame for external web site</title> +</head> + +<frameset ".(empty($conf->global->MAIN_MENU_INVERT)?"rows":"cols")."=\"".($heightforframes+50).",*\" border=0 framespacing=0 frameborder=0> + <frame name=\"barre\" src=\"frametop.php?mainmenu=".$mainmenu."&leftmenu=".$leftmenu."&idmenu=".$idmenu.($theme?'&theme='.$theme:'').($codelang?'&lang='.$codelang:'')."&nobackground=1\" noresize scrolling=\"NO\" noborder> + <frame name=\"main\" src=\"".$conf->global->EXTERNALSITE_URL."\"> + <noframes> + <body> + + </body> + </noframes> +</frameset> + +<noframes> +<body> + <br><div class=\"center\"> + Sorry, your browser is too old or not correctly configured to view this area.<br> + Your browser must support frames.<br> + </div> +</body> +</noframes> + +</html> +"; + +