From 6f909bb32ae7a203ba10f61f355a3aa96b48abcc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Feb 2021 12:32:03 +0100 Subject: [PATCH] Fix tooltip on permissions of website --- htdocs/langs/en_US/website.lang | 2 +- htdocs/website/index.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 7793fa5dead..aaef19b7824 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -51,7 +51,7 @@ ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=Preview %s in a new tab.

The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:
%s
URL served by external server:
%s -PreviewSiteServedByDolibarr=Preview %s in a new tab.

The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.
The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr.
URL served by Dolibarr:
%s

To use your own external web server to serve this web site, create a virtual host on your web server that point on directory
%s
then enter the name of this virtual server and click on the other preview button. +PreviewSiteServedByDolibarr=Preview %s in a new tab.

The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.
The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.
URL served by Dolibarr:
%s

To use your own external web server to serve this web site, create a virtual host on your web server that points on directory
%s
then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template diff --git a/htdocs/website/index.php b/htdocs/website/index.php index ebcf31ad2c5..1c9c234db9f 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2853,9 +2853,10 @@ if (!GETPOST('hide_websitemenu')) $pagealias = $websitepage->pageurl; $htmltext = $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $dataroot); - $htmltext .= '
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT); - $htmltext .= '
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); - $htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website
'.DOL_DATA_ROOT.'/medias', $htmltext); + $htmltext .= '
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), '{s1}'); + $htmltext = str_replace('{s1}', $dataroot.'
'.DOL_DATA_ROOT.'/medias'.'
'.DOL_DOCUMENT_ROOT, $htmltext); + //$htmltext .= '
'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); + //$htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/medias', $htmltext); print '
'; print '';