Skip to content

Commit

Permalink
Merge pull request #8 from mauricerenck/develop
Browse files Browse the repository at this point in the history
added:
* composer and non-composer setup
* block single episode
* better xml encoding
* correct xml header
* xsl styling for the feed
  • Loading branch information
mauricerenck authored Mar 31, 2019
2 parents 5b7204d + fd048e4 commit 5a5a9c0
Show file tree
Hide file tree
Showing 1,872 changed files with 346 additions and 188,203 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# files of Composer dependencies that are not needed for the plugin
/vendor/**/.*
/vendor/**/*.json
/vendor/**/*.txt
/vendor/**/*.md
/vendor/**/*.yml
/vendor/**/*.yaml
/vendor/**/*.xml
/vendor/**/*.dist
/vendor/**/readme.php
/vendor/**/LICENSE
/vendor/**/COPYING
/vendor/**/VERSION
/vendor/**/docs/*
/vendor/**/example/*
/vendor/**/examples/*
/vendor/**/test/*
/vendor/**/tests/*
/vendor/**/php4/*
/vendor/getkirby/composer-installer
/vendor/doctrine
/vendor/myclabs
/vendor/phar-io
/vendor/phpdocumentor
/vendor/phpspec
/vendor/phpunit
/vendor/sebastian
/vendor/symfony
/vendor/theseer
/vendor/webmozart
6 changes: 4 additions & 2 deletions blueprints/pages/podcasterfeed.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: podcasterfeed
title: Podcast Feed
title: Podcaster Feed
tabs:
content:
label: Content
Expand Down Expand Up @@ -58,6 +57,7 @@ tabs:
type: text
settings:
label: RSS Settings
icon: settings
columns:
- width: 1/1
sections:
Expand Down Expand Up @@ -123,6 +123,7 @@ tabs:
max: 1
player:
label: Website Player
icon: file-audio
columns:
- width: 1/4
sections:
Expand Down Expand Up @@ -218,6 +219,7 @@ tabs:
playerType: podlove
tracking:
label: Tracking
icon: file-spreadsheet
columns:
- width: 1/1
sections:
Expand Down
14 changes: 14 additions & 0 deletions blueprints/tabs/episode.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
label: Episode
icon: file-audio
columns:
- width: 1/3
sections:
Expand Down Expand Up @@ -45,6 +46,8 @@ columns:
trailer: Trailer
bonus: Bonus Material
width: 1/4
line:
type: line
podcasterExplizit:
label: Explicit
type: toggle
Expand All @@ -53,6 +56,17 @@ columns:
text:
- Disabled
- Explicit
podcasterBlock:
label: Block
type: toggle
default: no
text:
- Podcast is visible
- Podcast is BLOCKED
help: Enabling this will prevent your Podcast from appearing on the iTunes Store and other podcast directories.
width: 2/4
line2:
type: line
podcasterTitle:
label: iTunes Title
type: text
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "[email protected]"
}
],
"version": "0.4.1",
"version": "1.0.0",
"autoload": {
"files": [
"config.php",
Expand All @@ -24,10 +24,9 @@
},
"require": {
"getkirby/composer-installer": "^1.1",
"phansys/getid3": " ^2.1@dev"
"wapmorgan/mp3info": "^0.0.3"
},
"require-dev": {
"wapmorgan/mp3info": "^0.0.3",
"phpunit/phpunit": "^7.2"
}
}
142 changes: 58 additions & 84 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Kirby;
use Kirby\Exception\Exception;
use \PiwikTracker;
use Kirby\Http\Response;

Kirby::plugin('mauricerenck/podcaster', [
'options' => [
Expand All @@ -23,13 +24,29 @@
'tabs/podcasterepisode' => __DIR__ . '/blueprints/tabs/episode.yml',
'files/podcaster-episode' => __DIR__ . '/blueprints/files/podcaster-episode.yml'
],
'sections' => [
'podcaster-stats' => [
'props' => [
'headline' => function ($headline = 'Last modified') {
return $headline;
}
]
]
],
'snippets' => [
'podcaster-player' => __DIR__ . '/snippets/podcaster-player.php',
'podcaster-podlove-player' => __DIR__ . '/snippets/podlove-player.php',
'podcaster-html5-player' => __DIR__ . '/snippets/html5-player.php',
'podcaster-ogaudio' => __DIR__ . '/snippets/og-audio.php'
],
'routes' => [
[
'pattern' => '(:all)/podcaster-feed-style',
'action' => function () {
$string = file_get_contents(__DIR__ . '/res/feed-style.xsl');
return new Response($string, 'text/xml');
}
],
[
'pattern' => '(:all)/' . option('mauricerenck.podcaster.defaultFeed', 'feed'),
'action' => function ($slug) {
Expand Down Expand Up @@ -64,7 +81,7 @@
}
}

return($page);
return new Response($page->render(), 'text/xml');
}
],
[
Expand Down
Loading

0 comments on commit 5a5a9c0

Please sign in to comment.