diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-09-02 16:19:13 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-09-02 16:19:13 +0200 |
commit | cbecc0dfc819febf4c2b36791d5a2a7e69d842af (patch) | |
tree | c181eb875cef9ca6a48f0b807905d7a2c15bee98 /class/class.w.art.php | |
parent | e9b2ca7c06875069fa03379258625490872cc33d (diff) | |
download | wcms-cbecc0dfc819febf4c2b36791d5a2a7e69d842af.tar.gz wcms-cbecc0dfc819febf4c2b36791d5a2a7e69d842af.zip |
2.5 mobile update + minor upgrades and fixes
Diffstat (limited to 'class/class.w.art.php')
-rw-r--r-- | class/class.w.art.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/class/class.w.art.php b/class/class.w.art.php index d757e0d..ffdb670 100644 --- a/class/class.w.art.php +++ b/class/class.w.art.php @@ -73,7 +73,7 @@ class Art public function updatelien() { - $this->lien = search($this->md(), self::DEBUT, self::FIN); + $this->lien = search($this->md(true), self::DEBUT, self::FIN); } public static function classvarlist() @@ -179,9 +179,14 @@ class Art return $temp . $this->css; } - public function md() + public function md($expand = false) { - return $this->html; + if($expand == true) { + $md = str_replace('](=', '](?id=', $this->html); + } else { + $md = $this->html; + } + return $md; } public function html(App $app) @@ -200,6 +205,7 @@ class Art $html = str_replace($lien, $titlelien, $html); } + $html = str_replace('href="=', 'href="?id=', $html); $html = str_replace('href="http', ' class="external" target="_blank" href="http', $html); $html = str_replace('<img src="/', '<img src="../media/', $html); $html = str_replace('<iframe', '<div class="iframe"><div class="container"><iframe class="video" ', $html); |