Work on website module
This commit is contained in:
parent
e6be047178
commit
eff1d1c89e
@ -107,7 +107,8 @@ function dolWebsiteOutput($content)
|
|||||||
{
|
{
|
||||||
// We remove the <head> part of content
|
// We remove the <head> part of content
|
||||||
$content = preg_replace('/<head>.*<\/head>/ims', '', $content);
|
$content = preg_replace('/<head>.*<\/head>/ims', '', $content);
|
||||||
|
$content = preg_replace('/^.*<body(\s[^>]*)*>/ims', '', $content);
|
||||||
|
$content = preg_replace('/<\/body(\s[^>]*)*>.*$/ims', '', $content);
|
||||||
}
|
}
|
||||||
elseif (defined('USEDOLIBARRSERVER')) // REPLACEMENT OF LINKS When page called from Dolibarr server
|
elseif (defined('USEDOLIBARRSERVER')) // REPLACEMENT OF LINKS When page called from Dolibarr server
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2017-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,10 +19,11 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/core/website.inc.php
|
* \file htdocs/core/website.inc.php
|
||||||
* \brief Common file loaded used by all website pages (after master.inc.php)
|
* \brief Common file loaded used by all website pages (after master.inc.php)
|
||||||
* The global variable $website must be defined.
|
* The global variable $websitekey must be defined.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
||||||
$website=new Website($db);
|
$website=new Website($db);
|
||||||
$website->fetch(0,$websitekey);
|
$website->fetch(0,$websitekey);
|
||||||
|
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
||||||
|
|||||||
@ -2618,7 +2618,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
$objectpage->fetch($pageid);
|
$objectpage->fetch($pageid);
|
||||||
$jscontent = @file_get_contents($filejs);
|
$jscontent = @file_get_contents($filejs);
|
||||||
|
|
||||||
$out = '<!-- Page content '.$filetpl.' : Div with (CSS Of website from file + Style/htmlheader of page from database + Page content from database) -->'."\n";
|
$out = '<!-- Page content '.$filetpl.' : Div with (CSS Of website from file + Style/htmlheader of page from database + Page content from database or by include if WEBSITE_SUBCONTAINERSINLINE is on) -->'."\n";
|
||||||
|
|
||||||
// Include a html so we can benefit of the header of page.
|
// Include a html so we can benefit of the header of page.
|
||||||
// Note: We can't use iframe as it can be used to include another external html file
|
// Note: We can't use iframe as it can be used to include another external html file
|
||||||
@ -2666,7 +2666,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
|
|
||||||
// Do not enable the contenteditable when page was grabbed, ckeditor is removing span and adding borders,
|
// Do not enable the contenteditable when page was grabbed, ckeditor is removing span and adding borders,
|
||||||
// so editable will be available only from container created from scratch
|
// so editable will be available only from container created from scratch
|
||||||
//$out.='<div id="divbodywebsite" class="bodywebsite"'.($objectpage->grabbed_from ? ' contenteditable="true"' : '').'>'."\n";
|
//$out.='<div id="bodywebsite" class="bodywebsite"'.($objectpage->grabbed_from ? ' contenteditable="true"' : '').'>'."\n";
|
||||||
$out.='<div id="divbodywebsite" class="bodywebsite">'."\n";
|
$out.='<div id="divbodywebsite" class="bodywebsite">'."\n";
|
||||||
|
|
||||||
$newcontent = $objectpage->content;
|
$newcontent = $objectpage->content;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user