diff --git a/app/Entities/Podcast.php b/app/Entities/Podcast.php index 649d1f1b..ce4226aa 100644 --- a/app/Entities/Podcast.php +++ b/app/Entities/Podcast.php @@ -78,6 +78,8 @@ use RuntimeException; * @property string|null $location_osm * @property string|null $payment_pointer * @property array|null $custom_rss + * @property bool $is_op3_enabled + * @property string $op3_url * @property string $custom_rss_string * @property bool $is_published_on_hubs * @property string|null $partner_id @@ -688,4 +690,14 @@ class Podcast extends Entity // podcast is premium if at least one of its episodes is set as premium return (new EpisodeModel())->doesPodcastHavePremiumEpisodes($this->id); } + + public function getIsOp3Enabled(): bool + { + return service('settings')->get('Analytics.enableOP3', 'podcast:' . $this->id); + } + + public function getOp3Url(): string + { + return 'https://op3.dev/show/' . $this->guid; + } } diff --git a/modules/Admin/Language/en/Podcast.php b/modules/Admin/Language/en/Podcast.php index 3f423f5a..3a2edc64 100644 --- a/modules/Admin/Language/en/Podcast.php +++ b/modules/Admin/Language/en/Podcast.php @@ -116,6 +116,7 @@ return [ 'premium_by_default' => 'Episodes must be set as premium by default', 'premium_by_default_hint' => 'Podcast episodes will be marked as premium by default. You can still choose to set some episodes, trailers or bonuses as public.', 'op3' => 'Open Podcast Prefix Project (OP3)', + 'op3_link' => 'Visit your OP3 dashboard (external link)', 'op3_hint' => 'Value your analytics data with OP3, an open-source and trusted third party analytics service. Share, validate and compare your analytics data with the open podcasting ecosystem.', 'op3_enable' => 'Enable OP3 analytics service', 'op3_enable_hint' => 'For security reasons, premium episodes\' analytics data will not be shared with OP3.', diff --git a/themes/cp_admin/podcast/_sidebar.php b/themes/cp_admin/podcast/_sidebar.php index 9551fe9f..e9549707 100644 --- a/themes/cp_admin/podcast/_sidebar.php +++ b/themes/cp_admin/podcast/_sidebar.php @@ -85,35 +85,46 @@ $podcastNavigation = [ ?> -