Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 52af575

Browse files
committed
Merge branch 'main' of github.com:PapooSoftware/PapooCMS into main
2 parents e46658e + 9484847 commit 52af575

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/classes/artikel_class.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,6 +2849,10 @@ function make_teaser()
28492849
$img['0']['0'] = str_replace("/thumbs", "", $img['0']['0']);
28502850
$img['0']['0'] = str_replace("style", "rel", $img['0']['0']);
28512851

2852+
$teaserVideoTag = preg_match('~<video(?=\s|>).*?</video>~i', $row->lan_teaser, $teaserVideoTag)
2853+
? $teaserVideoTag[0]
2854+
: '';
2855+
28522856
// Daten zuweisen
28532857
$table_data[ ] = array(
28542858
'text' => $textunter,
@@ -2878,6 +2882,8 @@ function make_teaser()
28782882
'author' => $this->author,
28792883
'teaserbild' => ($row->teaser_bild_html),
28802884
'lan_teaser_img' => $img['0']['0'],
2885+
'teaser_video' => $teaserVideoTag,
2886+
'teaser_image_or_video' => $img[0][0] ?: $teaserVideoTag,
28812887
'lan_teaser_sans' => substr(strip_tags($row->lan_teaser), 0, 150) . "...",
28822888
'order_id_start' => ($row->order_id_start)
28832889
);
@@ -3112,6 +3118,10 @@ function make_teaser_related($tag)
31123118
$img['0']['0'] = str_replace("/thumbs", "", $img['0']['0']);
31133119
$img['0']['0'] = str_replace("style", "rel", $img['0']['0']);
31143120

3121+
$teaserVideoTag = preg_match('~<video(?=\s|>).*?</video>~i', $row->lan_teaser, $teaserVideoTag)
3122+
? $teaserVideoTag[0]
3123+
: '';
3124+
31153125
// Daten zuweisen
31163126
$table_data[ ] = array(
31173127
'text' => $textunter,
@@ -3141,6 +3151,8 @@ function make_teaser_related($tag)
31413151
'author' => $this->author,
31423152
'teaserbild' => ($row->teaser_bild_html),
31433153
'lan_teaser_img' => $img['0']['0'],
3154+
'teaser_video' => $teaserVideoTag,
3155+
'teaser_image_or_video' => $img[0][0] ?: $teaserVideoTag,
31443156
'lan_teaser_sans' => substr(strip_tags($row->lan_teaser), 0, 150) . "..."
31453157
);
31463158
}

0 commit comments

Comments
 (0)