Website module
This commit is contained in:
parent
174394c476
commit
a1bdc6022d
@ -48,6 +48,10 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart=0)
|
|||||||
if ($removephppart) $replacewith='';
|
if ($removephppart) $replacewith='';
|
||||||
$content = preg_replace('/"mailto:<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
|
$content = preg_replace('/"mailto:<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
|
||||||
|
|
||||||
|
$replacewith='src="php';
|
||||||
|
if ($removephppart) $replacewith='';
|
||||||
|
$content = preg_replace('/src="<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
|
||||||
|
|
||||||
$replacewith='<span class="phptag">...php...</span>';
|
$replacewith='<span class="phptag">...php...</span>';
|
||||||
if ($removephppart) $replacewith='';
|
if ($removephppart) $replacewith='';
|
||||||
$content = preg_replace('/<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
|
$content = preg_replace('/<\?php((?!\?>).)*\?>\n*/ims', $replacewith, $content);
|
||||||
|
|||||||
@ -2319,6 +2319,10 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
{
|
{
|
||||||
if ($pageid > 0)
|
if ($pageid > 0)
|
||||||
{
|
{
|
||||||
|
// $filejs
|
||||||
|
// $filecss
|
||||||
|
// $filephp
|
||||||
|
|
||||||
// Ouput page under the Dolibarr top menu
|
// Ouput page under the Dolibarr top menu
|
||||||
$objectpage->fetch($pageid);
|
$objectpage->fetch($pageid);
|
||||||
$jscontent = @file_get_contents($filejs);
|
$jscontent = @file_get_contents($filejs);
|
||||||
@ -2380,6 +2384,14 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
$filephp = $objectpage->
|
||||||
|
ob_start();
|
||||||
|
include $filephp;
|
||||||
|
$newcontent = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
*/
|
||||||
|
|
||||||
$out.=dolWebsiteReplacementOfLinks($object, $newcontent)."\n";
|
$out.=dolWebsiteReplacementOfLinks($object, $newcontent)."\n";
|
||||||
|
|
||||||
$out.='</div>';
|
$out.='</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user