diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-09-21 00:17:11 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-09-21 00:17:11 +0200 |
commit | 701c4637294fc9b63d53a8eeb26d46ef94af1941 (patch) | |
tree | ee5b4fb38cc3a023590dfa3c127e1cf989ffaaab /class/class.w.art.php | |
parent | cbecc0dfc819febf4c2b36791d5a2a7e69d842af (diff) | |
download | wcms-701c4637294fc9b63d53a8eeb26d46ef94af1941.tar.gz wcms-701c4637294fc9b63d53a8eeb26d46ef94af1941.zip |
2.6 media update + new skin + lot of bugs fixies
Diffstat (limited to 'class/class.w.art.php')
-rw-r--r-- | class/class.w.art.php | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/class/class.w.art.php b/class/class.w.art.php index ffdb670..2238f71 100644 --- a/class/class.w.art.php +++ b/class/class.w.art.php @@ -56,12 +56,12 @@ class Art $now = new DateTimeImmutable(null, timezone_open("Europe/Paris")); $this->settitre($this->id()); - $this->setsoustitre($this->id()); - $this->setintro('resumé'); - $this->settag('sans tag,'); + $this->setsoustitre(''); + $this->setintro(''); + $this->settag(''); $this->setdatecreation($now); $this->setcss(''); - $this->sethtml('contenu'); + $this->sethtml(''); $this->setsecure(2); $this->setcouleurtext('#000000'); $this->setcouleurbkg('#FFFFFF'); @@ -206,6 +206,7 @@ class Art } $html = str_replace('href="=', 'href="?id=', $html); + $html = str_replace('href="../media/', ' class="file" target="_blank" href="../media/', $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); @@ -314,14 +315,19 @@ class Art public function settag($tag) { - if (strlen($tag) < self::LEN and is_string($tag)) { - $tag = strip_tags(trim(strtolower($tag))); - $tag = str_replace('*', '', $tag); - $tag = str_replace(' ', '', $tag); + if(is_string($tag)) { - $taglist = explode(",", $tag); - $taglist = array_filter($taglist); - $this->tag = $taglist; + if (strlen($tag) < self::LEN and is_string($tag)) { + $tag = strip_tags(trim(strtolower($tag))); + $tag = str_replace('*', '', $tag); + $tag = str_replace(' ', '', $tag); + + $taglist = explode(",", $tag); + $taglist = array_filter($taglist); + $this->tag = $taglist; + } + } elseif (is_array($tag)) { + $this->tag = $tag; } } |