Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions site/templates/meet.rss.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* @var \Kirby\Cms\Pages $upcoming
*/

header('Content-Type: application/rss+xml; charset=UTF-8');

?><?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
Comment on lines +1 to +8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<?php
/**
* @var \Kirby\Cms\Pages $upcoming
*/
header('Content-Type: application/rss+xml; charset=UTF-8');
?><?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<?php
/**
* @var \Kirby\Cms\Page $page
* @var \Kirby\Cms\Pages $upcoming
*/
header('Content-Type: application/rss+xml; charset=UTF-8');
?>
<?php echo '<?xml version="1.0" encoding="utf-8" ?>' . "\n" ?>
<rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel>
<title>Kirby meetup calendar</title>
<link>https://getkirby.com/meet</link>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<link>https://getkirby.com/meet</link>
<link><?= $page->url() ?></link>
<atom:link href="<?= $page->url() ?>.rss" rel="self" type="application/rss+xml" />

<description>Connect with other Kirby developers around the world or meet face-to-face at a local meetup.</description>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<description>Connect with other Kirby developers around the world or meet face-to-face at a local meetup.</description>
<description><?= $page->description() ?></description>

<?php foreach ($upcoming as $event): ?>
<?php if (empty(get('city')) || strtolower(get('city')) == strtolower($event->city())): ?>
<item>
<title><?= $event->datetime()->format('Y-m-d') ?>: <?= $event->shortTitle()->value() ?></title>
<?php if ($event->link()->isNotEmpty()): ?>
<link><?= $event->link()->value() ?></link>
<?php endif ?>
<guid>https://getkirby.com/meet#meetup-<?= $event->slug() ?></guid>
<description><![CDATA[
<p><?= $event->datetime()->format('Y-m-d H:i') ?> (time zone <?= $event->timezone()->value() ?>)</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An idea format: 2025-05-16 18:00 GMT+02:00 (Europe/Berlin)

<?= $event->datetime()->format('Y-m-d H:s \G\M\TP') ?> (<?= $event->timezone() ?>)

<?php if ($event->city()->isNotEmpty()): ?>
<p><?= $event->city() ?>, <?= $event->country() ?></p>
<?php endif ?>
<?php if ($event->link()->isNotEmpty()): ?>
<p><a href="<?= $event->link()->value() ?>"><?= $event->link()->value() ?></a></p>
<?php endif ?>
]]></description>
</item>
<?php endif ?>
<?php endforeach ?>
</channel>
</rss>