作者 lyh

gx

... ... @@ -277,7 +277,8 @@ class BTemplateLogic extends BaseLogic
'footer_html'=>$param['footer_html'],
'footer_css'=>$param['footer_css'],
];
$other = str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link".*?<header/s'));
$footer_other = str_replace('<header','',characterTruncation($param['html'],'/<style id="globalsojs-footer">(.*?)<header/s'));
$other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
if($info === false){
$data['template_id'] = $param['template_id'];
$data['project_id'] = $this->user['project_id'];
... ... @@ -335,8 +336,9 @@ class BTemplateLogic extends BaseLogic
'main_css'=>$param['main_css'],
'footer_html'=>$param['footer_html'],
'footer_css'=>$param['footer_css'],
'other'=> str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link".*?<header/s'))
];
$footer_other = str_replace('<header','',characterTruncation($param['html'],'/<style id="globalsojs-footer">(.*?)<header/s'));
$data['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
$bTemplateLogModel = new BTemplateLog();
return $bTemplateLogModel->add($data);
}
... ...
... ... @@ -136,8 +136,9 @@ class CustomTemplateLogic extends BaseLogic
'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'),
'main_html' => characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s'),
'main_css' => characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s'),
'other'=> str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s"))
];
$footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s'));
$data['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
$bTemplateLogModel = new BTemplateLog();
return $bTemplateLogModel->add($data);
}
... ... @@ -160,7 +161,8 @@ class CustomTemplateLogic extends BaseLogic
'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'),
'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'),
];
$other = str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s"));
$footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s'));
$other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
if($info === false){
$data['template_id'] = $template_id;
$data['project_id'] = $this->user['project_id'];
... ...
... ... @@ -341,6 +341,8 @@ class VisualizationLogic extends BaseLogic
'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'),
'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'),
];
$footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s'));
$data['other'] = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
$bTemplateLogModel = new BTemplateLog();
return $bTemplateLogModel->add($data);
}
... ... @@ -362,7 +364,8 @@ class VisualizationLogic extends BaseLogic
'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'),
'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'),
];
$other = str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s"));
$footer_other = str_replace('<header','',characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<header/s'));
$other = preg_replace('/<style id="globalsojs-footer">(.*?)<\/style>/s', '', $footer_other);
if($info === false){
$data['template_id'] = $template_id;
$data['project_id'] = $this->user['project_id'];
... ...