aboutsummaryrefslogtreecommitdiff
path: root/app/class/modelrender.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/modelrender.php')
-rw-r--r--app/class/modelrender.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/class/modelrender.php b/app/class/modelrender.php
index 4eab655..829c132 100644
--- a/app/class/modelrender.php
+++ b/app/class/modelrender.php
@@ -89,6 +89,8 @@ class Modelrender extends Modelart
return $body;
}
+
+
public function write()
{
file_put_contents(Model::RENDER_DIR . $this->art->id() . '.css', $this->art->css());
@@ -96,6 +98,8 @@ class Modelrender extends Modelart
file_put_contents(Model::RENDER_DIR . $this->art->id() . '.js', $this->art->javascript());
}
+
+
public function writetemplates()
{
if (array_key_exists('css', $this->art->template('array'))) {
@@ -158,6 +162,8 @@ class Modelrender extends Modelart
public function parser(string $text)
{
+ $text = str_replace('<a href="/', '<a class="media" target="_blank" href="'. Model::mediapath(), $text);
+ $text = str_replace('<img src="/', '<img class="local" src="'. Model::mediapath(), $text);
$text = $this->headerid($text);
@@ -170,8 +176,6 @@ class Modelrender extends Modelart
$text = str_replace('href="http', ' class="external" target="_blank" href="http', $text);
- $text = str_replace('<img src="/', '<img class="local" src="'. Model::mediapath(), $text);
- $text = str_replace('<a href="/', '<a class="media" target="_blank" href="'. Model::mediapath(), $text);
$text = $this->autourl($text);