From 0213c7b180ff9584273e7ccc5d9af3b6744c5dbd Mon Sep 17 00:00:00 2001 From: ro Date: Tue, 20 May 2025 18:21:16 -0600 Subject: [PATCH] added feature medio to rss just thought it would be a nice touch to pull in the featured media into the descption for some extra pretty in the feed --- app/Http/Controllers/RSSController.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/RSSController.php b/app/Http/Controllers/RSSController.php index 7c8af6c..4b0dcdc 100644 --- a/app/Http/Controllers/RSSController.php +++ b/app/Http/Controllers/RSSController.php @@ -43,13 +43,30 @@ class RSSController extends Controller if ($global['dynamicRender'] != "true") { $link = $link . ".html"; } + //grabs feature image or vid and tosses it in the description + $media = explode(",", $item['feature']); + $file = ''; + if ($media[0] == null || $media[0] == '') { + $file = $global['background']; + } else { + $file = $media[0]; + } + $ext = pathinfo($file, PATHINFO_EXTENSION); + $url = $global['base_url'] . $file; + + if ($ext != 'mp4') { + $top = ""; + } else { + $top = " "; + } + $feedContent .= " {$title} {$link} {$global['base_url']}/rss/feed/item/{$item['uuid']} {$date} - + > "; }