2026-03-08 12:07:51 +00:00
|
|
|
<?php
|
|
|
|
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
|
|
|
|
|
$current_url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
|
|
|
?>
|
Add public Station Diary with images & RSS
Introduce public Station Diary functionality: add global config flag, routes, controller, model changes, views and DB migrations. New migrations (252-254) add is_public/include_qso_summary, diary_images table and logbook_id on notes. Notes model updated to handle public flags, diary images, qso summaries, caching (per-user cache version), and helper methods for listing/counting public diary entries. New Stationdiary controller serves paginated public pages and RSS feed with caching. Notes controller updated to handle image uploads, attach images to diary entries, and provide an AJAX endpoint to delete images. Views updated to support public visibility options, logbook selector, image upload UI and Quill editor assets; routes and migration version bumped accordingly. Includes file upload example added to uploads/diary.
2026-03-08 11:42:41 +00:00
|
|
|
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
|
|
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
|
|
<channel>
|
|
|
|
|
<title><?php echo htmlspecialchars('Station Diary - ' . $callsign, ENT_QUOTES); ?></title>
|
|
|
|
|
<link><?php echo site_url('station-diary/' . rawurlencode($callsign)); ?></link>
|
|
|
|
|
<description><?php echo htmlspecialchars('Public station diary feed for ' . $callsign, ENT_QUOTES); ?></description>
|
|
|
|
|
<language>en-us</language>
|
2026-03-08 12:07:51 +00:00
|
|
|
<atom:link href="<?php echo htmlspecialchars($current_url, ENT_QUOTES); ?>" rel="self" type="application/rss+xml" />
|
Add public Station Diary with images & RSS
Introduce public Station Diary functionality: add global config flag, routes, controller, model changes, views and DB migrations. New migrations (252-254) add is_public/include_qso_summary, diary_images table and logbook_id on notes. Notes model updated to handle public flags, diary images, qso summaries, caching (per-user cache version), and helper methods for listing/counting public diary entries. New Stationdiary controller serves paginated public pages and RSS feed with caching. Notes controller updated to handle image uploads, attach images to diary entries, and provide an AJAX endpoint to delete images. Views updated to support public visibility options, logbook selector, image upload UI and Quill editor assets; routes and migration version bumped accordingly. Includes file upload example added to uploads/diary.
2026-03-08 11:42:41 +00:00
|
|
|
<?php foreach ($entries as $entry) { ?>
|
2026-03-09 10:57:38 +00:00
|
|
|
<?php $entryPermalink = site_url('station-diary/' . rawurlencode($callsign) . '/entry/' . (int)$entry->id); ?>
|
2026-03-08 14:50:55 +00:00
|
|
|
<?php
|
|
|
|
|
// Process image shortcodes and clean up content
|
|
|
|
|
$CI =& get_instance();
|
|
|
|
|
$CI->load->model('note');
|
|
|
|
|
$processed = $CI->note->process_image_shortcodes($entry->note, $entry->images ?? []);
|
|
|
|
|
// Remove empty <p><br></p> tags and <br> tags between paragraph tags
|
|
|
|
|
$cleanedNote = preg_replace('/<p><br\s*\/?><\/p>/i', '', $processed['content']);
|
|
|
|
|
$cleanedNote = preg_replace('/<\/p>\s*<br\s*\/?>\s*<p>/i', '</p><p>', $cleanedNote);
|
|
|
|
|
?>
|
Add public Station Diary with images & RSS
Introduce public Station Diary functionality: add global config flag, routes, controller, model changes, views and DB migrations. New migrations (252-254) add is_public/include_qso_summary, diary_images table and logbook_id on notes. Notes model updated to handle public flags, diary images, qso summaries, caching (per-user cache version), and helper methods for listing/counting public diary entries. New Stationdiary controller serves paginated public pages and RSS feed with caching. Notes controller updated to handle image uploads, attach images to diary entries, and provide an AJAX endpoint to delete images. Views updated to support public visibility options, logbook selector, image upload UI and Quill editor assets; routes and migration version bumped accordingly. Includes file upload example added to uploads/diary.
2026-03-08 11:42:41 +00:00
|
|
|
<item>
|
|
|
|
|
<title><?php echo htmlspecialchars($entry->title, ENT_QUOTES); ?></title>
|
2026-03-09 10:57:38 +00:00
|
|
|
<link><?php echo htmlspecialchars($entryPermalink, ENT_QUOTES); ?></link>
|
|
|
|
|
<guid><?php echo htmlspecialchars($entryPermalink, ENT_QUOTES); ?></guid>
|
Add public Station Diary with images & RSS
Introduce public Station Diary functionality: add global config flag, routes, controller, model changes, views and DB migrations. New migrations (252-254) add is_public/include_qso_summary, diary_images table and logbook_id on notes. Notes model updated to handle public flags, diary images, qso summaries, caching (per-user cache version), and helper methods for listing/counting public diary entries. New Stationdiary controller serves paginated public pages and RSS feed with caching. Notes controller updated to handle image uploads, attach images to diary entries, and provide an AJAX endpoint to delete images. Views updated to support public visibility options, logbook selector, image upload UI and Quill editor assets; routes and migration version bumped accordingly. Includes file upload example added to uploads/diary.
2026-03-08 11:42:41 +00:00
|
|
|
<pubDate><?php echo date(DATE_RSS, strtotime($entry->created_at)); ?></pubDate>
|
2026-03-08 14:50:55 +00:00
|
|
|
<description><![CDATA[<?php echo $cleanedNote; ?>]]></description>
|
Add public Station Diary with images & RSS
Introduce public Station Diary functionality: add global config flag, routes, controller, model changes, views and DB migrations. New migrations (252-254) add is_public/include_qso_summary, diary_images table and logbook_id on notes. Notes model updated to handle public flags, diary images, qso summaries, caching (per-user cache version), and helper methods for listing/counting public diary entries. New Stationdiary controller serves paginated public pages and RSS feed with caching. Notes controller updated to handle image uploads, attach images to diary entries, and provide an AJAX endpoint to delete images. Views updated to support public visibility options, logbook selector, image upload UI and Quill editor assets; routes and migration version bumped accordingly. Includes file upload example added to uploads/diary.
2026-03-08 11:42:41 +00:00
|
|
|
</item>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</channel>
|
|
|
|
|
</rss>
|