Archived
4
2

Compare commits

..

5 Commits

Author SHA1 Message Date
e250581f3c
Add display_choice macro
Display custom messages depending on a boolean integer value.
2022-08-04 19:31:35 -04:00
284b92d80b
Update Perl module dependencies
Add missing modules to the Installation section
2022-08-04 19:09:32 -04:00
c983e937e6
Change extension from html to php for navigation links 2022-08-04 19:04:46 -04:00
69b3cb32b9
Hide default avatar logo
Don't use hpr logo when the host does not have an avatar photo.
2022-08-04 14:21:54 -04:00
1800d52f88
Initial implementation of series page 2022-08-02 21:57:56 -04:00
11 changed files with 77 additions and 32 deletions

View File

@ -12,9 +12,11 @@ Static web page generator for the Hacker Public Radio website.
* Pod::Usage * Pod::Usage
* Config::Std * Config::Std
* Template * Template
* Template::Plugin:File * Template::Plugin::File
* Template::Plugin::DBI
* DBI * DBI
* Tie::DBI * Tie::DBI
* DBD::SQLite
* Date::Calc * Date::Calc
## Usage ## Usage

View File

@ -43,9 +43,11 @@ This is a site generator for the Hacker Public Radio website based upon the Perl
* Pod::Usage * Pod::Usage
* Config::Std * Config::Std
* Template * Template
* Template::Plugin:File * Template::Plugin::File
* Template::Plugin::DBI
* DBI * DBI
* Tie::DBI * Tie::DBI
* DBD::SQLite
* Date::Calc * Date::Calc
=head1 AUTHOR =head1 AUTHOR

View File

@ -53,3 +53,8 @@ navigation: navigation-about.tpl.html
content: content-correspondent.tpl.html content: content-correspondent.tpl.html
multipage: true multipage: true
filename: correspondents/[id]/index.html filename: correspondents/[id]/index.html
[series]
navigation: navigation-get-shows.tpl.html
content: content-series.tpl.html
filename: series/index.html

View File

@ -47,7 +47,9 @@
<header> <header>
<h1><a href="episodes/hpr<!--% latest_episodes.id %-->.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></h1> <h1><a href="episodes/hpr<!--% latest_episodes.id %-->.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></h1>
<h3><!--% latest_episodes.summary%--></h3> <h3><!--% latest_episodes.summary%--></h3>
<p class="meta"$><img src="./images/<!--% get_avatar(latest_episodes.hostid) %-->" height="80" width="80" alt="" /></a><br>Hosted by <a href="correspondents/<!--% zero_pad_left(latest_episodes.host_id) %-->/index.html"><!--% latest_episodes.host %--></a> on <!--% latest_episodes.date %--> is flagged as <!--% latest_episodes.explicit %--> and released under a <!--% latest_episodes.license %--> license. <br> <p class="meta"$><!--% IF get_avatar(latest_episodes.hostid) != 'hpr_logo.png' %-->
<img src="./images/<!--% get_avatar(latest_episodes.hostid) %-->" height="80" width="80" alt="" /></a><!--% END %-->
<br>Hosted by <a href="correspondents/<!--% zero_pad_left(latest_episodes.hostid) %-->/index.html"><!--% latest_episodes.host %--></a> on <!--% latest_episodes.date %--> is flagged as <!--% latest_episodes.explicit %--> and released under a <!--% latest_episodes.license %--> license. <br>
<strong>Tags:</strong> <!--% latest_episodes.tags %--><em></em>.<br> <strong>Tags:</strong> <!--% latest_episodes.tags %--><em></em>.<br>
<small>listen in <a href="local/hpr<!--% latest_episodes.id %-->.ogg">ogg</a>, <a href="local/hpr<!--% latest_episodes.id %-->.spx">spx</a>, or <a href="local/hpr<!--% latest_episodes.id %-->.mp3">mp3</a> format. <!--% show_series(latest_episodes.series) %--> <small>listen in <a href="local/hpr<!--% latest_episodes.id %-->.ogg">ogg</a>, <a href="local/hpr<!--% latest_episodes.id %-->.spx">spx</a>, or <a href="local/hpr<!--% latest_episodes.id %-->.mp3">mp3</a> format. <!--% show_series(latest_episodes.series) %-->
<a href="eps.php?id=3628#comments">comments (0)</a></small> <a href="eps.php?id=3628#comments">comments (0)</a></small>

View File

@ -0,0 +1,29 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<article>
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
<h1 class="title">In-Depth Series</h1>
<!--% FOREACH series IN DBI.query(
'SELECT miniseries.id, miniseries.name, miniseries.description,
miniseries.private, miniseries.image, miniseries.valid,
ep.number_of_episodes, ep.latest_show, ep.earliest_show
FROM miniseries
INNER JOIN
(SELECT series,
COUNT(eps.id) AS number_of_episodes,
MAX(eps.date) AS latest_show,
MIN(eps.date) AS earliest_show
FROM eps
GROUP BY series) AS ep ON ep.series = miniseries.id
ORDER BY name'
) %-->
<h2><a href="series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
<ul>
<li>Number of episodes: <!--% series.number_of_episodes %--></li>
<li>Open/closed: <!--% display_choice(series.private, 'closed', 'open') %--></li>
<li>Date of earliest show: <!--% series.earliest_show %--></li>
<li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="hpr_ogg_rss.php?series=38">ogg</a>, <a href="hpr_spx_rss.php?series=38">spx</a>, <a href="hpr_mp3_rss.php?series=38">mp3</a></li>
</ul>
<em><!--% series.description %--></em>
<!--% END %-->
</article>

View File

@ -1,9 +1,9 @@
<ul> <ul>
<li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li> <li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li>
<li><a href="/index.php"><strong>Home</a></li> <li><a href="index.html"><strong>Home</a></li>
<li><a href="/about.php">About »</strong></a></li> <li><a href="about.html">About »</strong></a></li>
<li><a href="/correspondents.php">Hosts</a></li> <li><a href="correspondents/index.html">Hosts</a></li>
<li><a href="/contact.php">Contact</a></li> <li><a href="contact.html">Contact</a></li>
<li><a href="/promote.php">Promote HPR</a></li> <li><a href="promote.html">Promote HPR</a></li>
<li><a href="/comments_viewer.php">Show Comments</a></li> <li><a href="/comments_viewer.php">Show Comments</a></li>
</ul> </ul>

View File

@ -1,8 +1,8 @@
<ul> <ul>
<li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li> <li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li>
<li><a href="/index.php"><strong>Home</a></li> <li><a href="/index.html"><strong>Home</a></li>
<li><a href="/help_out.php">Contribute »</strong></a></li> <li><a href="/help_out.html">Contribute »</strong></a></li>
<li><a href="/contribute.php">Submit Show</a></li> <li><a href="/contribute.html">Submit Show</a></li>
<li><a href="/report_missing_tags.php">Fix Tags</a></li> <li><a href="/report_missing_tags.html">Fix Tags</a></li>
<li><a href="/requested_topics.php">Topics</a></li> <li><a href="/requested_topics.html">Topics</a></li>
</ul> </ul>

View File

@ -1,8 +1,8 @@
<ul> <ul>
<li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li> <li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li>
<li><a href="/index.php"><strong>Home</strong></a></li> <li><a href="/index.html"><strong>Home</strong></a></li>
<li><a href="/syndication.php"><strong>Get Shows »</strong></a></li> <li><a href="/syndication.html"><strong>Get Shows »</strong></a></li>
<li><a href="/index_full.php">Full Episode Guide</a></li> <li><a href="/index_full.html">Full Episode Guide</a></li>
<li><a href="/series.php">In-Depth Series</a></li> <li><a href="/series/index.html">In-Depth Series</a></li>
<li><a href="/download.php">Download Options</a></li> <li><a href="/download.php">Download Options</a></li>
</ul> </ul>

View File

@ -1,10 +1,10 @@
<ul> <ul>
<li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li> <li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li>
<li><a href="/index.php"><strong>Home</a></li> <li><a href="/index.html"><strong>Home</a></li>
<li><a href="/contribute.php">Give Shows »</strong></a> <li><a href="/contribute.html">Give Shows »</strong></a>
<li><a href="/stuff_you_need_to_know.php">Info</a></li> <li><a href="/stuff_you_need_to_know.html">Info</a></li>
<li><a href="/theme.php">Theme</a></li> <li><a href="/theme.html">Theme</a></li>
<li><a href="/requested_topics.php">Topics</a></li> <li><a href="/requested_topics.html">Topics</a></li>
<li><a href="/recording.php">Recording</a></li> <li><a href="/recording.html">Recording</a></li>
<li><a href="/request_a_slot.php">Scheduling</a></li> <li><a href="/request_a_slot.php">Scheduling</a></li>
</ul> </ul>

View File

@ -1,10 +1,10 @@
<ul> <ul>
<li><a href="/calendar.php"><strong>⇧Upload⇧</strong></a></li> <li><a href="calendar.php"><strong>⇧Upload⇧</strong></a></li>
<li><a href="/index.php"><strong>Home</a></li> <li><a href="index.html"><strong>Home »</strong></a></li>
<li><a href="/contribute.php">Give Shows »</strong></a> <li><a href="syndication.html">Get Shows</a></li>
<li><a href="/stuff_you_need_to_know.php">Info</a></li> <li><a href="contribute.html">Give Shows</a></li>
<li><a href="/theme.php">Theme</a></li> <li><a href="help_out.html">Contribute</a></li>
<li><a href="/requested_topics.php">Topics</a></li> <li><a href="tags.html">Tags</a></li>
<li><a href="/recording.php">Recording</a></li> <li><a href="about.html">About</a></li>
<li><a href="/request_a_slot.php">Scheduling</a></li> <li><a href="search.html">Search</a></li>
</ul> </ul>

View File

@ -2,3 +2,8 @@
<!--% USE String(word) %--> <!--% USE String(word) %-->
<!--% String.format("%04s") %--> <!--% String.format("%04s") %-->
<!--% END %--> <!--% END %-->
<!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %-->
<!--% IF choice == 1 %--><!--% display_when_true %-->
<!--% ELSE %--><!--% display_when_false %--><!--% END %-->
<!--% END %-->