From 53e6d5fde32a917718a0658fb95f366dc7dfc248 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 26 Apr 2020 15:41:48 +0200 Subject: user bookmarks use new object + shortcuts visible in backtopbar --- app/class/Modelrender.php | 66 ++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 30 deletions(-) (limited to 'app/class/Modelrender.php') diff --git a/app/class/Modelrender.php b/app/class/Modelrender.php index 7322955..1ad9e20 100644 --- a/app/class/Modelrender.php +++ b/app/class/Modelrender.php @@ -89,7 +89,7 @@ class Modelrender extends Modelpage $body = $this->getbody($this->readbody()); $parsebody = $this->bodyparser($body); - $html = '\n\n\n' . $head . '\n\n' . $parsebody . '\N'; + $html = "\n\n\n' . $head . '\n\n' . $parsebody . '\N"; return $html; } @@ -164,7 +164,7 @@ class Modelrender extends Modelpage if ($subcontent !== false) { if (empty($subcontent && self::RENDER_VERBOSE > 0)) { $message = 'The ' . strtoupper($type) . ' from page "' . $source . '" is currently empty !'; - $subcontent = '\n\n'; + $subcontent = "\n\n"; } } else { $read = '

Rendering error :

'; @@ -231,45 +231,51 @@ class Modelrender extends Modelpage public function gethead() { + $id = $this->page->id(); + $globalpath = Model::globalpath(); + $renderpath = Model::renderpath(); + $description = $this->page->description(); + $title = $this->page->title(); + $url = Config::url(); $head = ''; - $head .= '\n'; - $head .= '' . $this->page->title() . '\n'; + $head .= "\n"; + $head .= "$title\n"; if (!empty($this->page->favicon())) { $href = Model::faviconpath() . $this->page->favicon(); - $head .= ''; + $head .= ""; } elseif (!empty(Config::defaultfavicon())) { $href = Model::faviconpath() . Config::defaultfavicon(); - $head .= ''; + $head .= ""; } - $head .= '\n'; - $head .= '\n'; + $head .= "\n"; + $head .= "\n"; - $head .= '\n'; - $head .= '\n'; + $head .= "\n"; + $head .= "\n"; if (!empty($this->page->thumbnail())) { $content = Config::domain() . self::thumbnailpath() . $this->page->thumbnail(); - $head .= '\n'; + $head .= "\n"; } elseif (!empty(Config::defaultthumbnail())) { $content = Config::domain() . self::thumbnailpath() . Config::defaultthumbnail(); - $head .= '\n'; + $head .= "\n"; } - $head .= '\n'; + $head .= "\n"; foreach ($this->page->externalcss() as $externalcss) { - $head .= '\n'; + $head .= "\n"; } if (!empty($this->page->templatecss() && in_array('externalcss', $this->page->templateoptions()))) { $templatecss = $this->get($this->page->templatecss()); if ($templatecss !== false) { foreach ($templatecss->externalcss() as $externalcss) { - $head .= '\n'; + $head .= "\n"; } } } @@ -277,45 +283,45 @@ class Modelrender extends Modelpage $head .= PHP_EOL . $this->page->customhead() . PHP_EOL; - $head .= '\n'; - $head .= '\n'; + $head .= "\n"; + $head .= "\n"; if (!empty($this->page->templatecss())) { $tempaltecsspage = $this->page->templatecss(); - $head .= '\n'; + $head .= "\n"; } - $head .= '\n'; + $head .= "\n"; if (!empty($this->page->templatejavascript())) { $templatejspage = $this->page->templatejavascript(); - $head .= '\n'; + $head .= "\n"; } if (!empty($this->page->javascript())) { - $head .= '\n'; + $head .= "\n"; } if (!empty(Config::analytics())) { - $head .= '\n - - + $analitycs = Config::analytics(); + $head .= "\n + + - \n'; + \n"; } if (!empty($this->page->redirection())) { if (preg_match('%https?:\/\/\S*%', $this->page->redirection(), $out)) { $url = $out[0]; - $head .= '\n'; } elseif (key_exists($this->page->redirection(), $this->pagelist())) { $url = $this->upage($this->page->redirection()); - $head .= '\n'; } + $head .= "\npage->refresh()}; URL=$url\" />"; } @@ -503,7 +509,7 @@ class Modelrender extends Modelpage } else { $id = ' '; } - return '
\n\n' . $matches[3] . '\n\n
\n\n'; + return "
\n\n$matches[3]\n\n
\n\n"; }, $text); $text = preg_replace('/\R\R[=]{3,}([\w-]*)\R/', '', $text); return $text; -- cgit v1.2.3