Add option WEBSITE_ADD_CSS_TO_BODY to add a CSS on body tag
This commit is contained in:
parent
619014726e
commit
d4c18c79fb
@ -220,6 +220,8 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
|
|||||||
global $db, $langs, $conf, $user;
|
global $db, $langs, $conf, $user;
|
||||||
global $dolibarr_main_url_root, $dolibarr_main_data_root;
|
global $dolibarr_main_url_root, $dolibarr_main_data_root;
|
||||||
|
|
||||||
|
$nbrep = 0;
|
||||||
|
|
||||||
dol_syslog("dolWebsiteOutput start (contenttype=".$contenttype." containerid=".$containerid." USEDOLIBARREDITOR=".(defined('USEDOLIBARREDITOR') ? '1' : '')." USEDOLIBARRSERVER=".(defined('USEDOLIBARRSERVER') ? '1' : '').')');
|
dol_syslog("dolWebsiteOutput start (contenttype=".$contenttype." containerid=".$containerid." USEDOLIBARREDITOR=".(defined('USEDOLIBARREDITOR') ? '1' : '')." USEDOLIBARRSERVER=".(defined('USEDOLIBARRSERVER') ? '1' : '').')');
|
||||||
|
|
||||||
// Define $urlwithroot
|
// Define $urlwithroot
|
||||||
@ -300,7 +302,6 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
|
|||||||
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||||
// become
|
// become
|
||||||
// <img alt="" src="'.$urlwithroot.'/medias/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
// <img alt="" src="'.$urlwithroot.'/medias/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||||
$nbrep = 0;
|
|
||||||
if (!$symlinktomediaexists)
|
if (!$symlinktomediaexists)
|
||||||
{
|
{
|
||||||
// <img src="image.png... => <img src="medias/image.png...
|
// <img src="image.png... => <img src="medias/image.png...
|
||||||
@ -349,7 +350,11 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = preg_replace('/ contenteditable="true"/', ' contenteditable="false"', $content, -1, $nbrep);
|
$content = str_replace(' contenteditable="true"', ' contenteditable="false"', $content, -1, $nbrep);
|
||||||
|
|
||||||
|
if (! empty($conf->global->WEBSITE_ADD_CSS_TO_BODY)) {
|
||||||
|
$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.$conf->global->WEBSITE_ADD_CSS_TO_BODY, $content);
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog("dolWebsiteOutput end");
|
dol_syslog("dolWebsiteOutput end");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user