1
Templates
Dave Morriss edited this page 2023-07-21 13:05:59 +01:00
Table of Contents
- Site Generator - templates
- content-about.tpl.html
- content-comments_viewer.tpl.html
- content-contact.tpl.html
- content-contribute.tpl.html
- content-correspondents.tpl.html
- content-correspondent.tpl.html
- content-download.tpl.html
- content-episodes.tpl.html
- content-episode.tpl.html
- content-help_out.tpl.html
- content-index-announcement.tpl.html
- content-index.tpl.html
- content-mumble-howto.tpl.html
- content-podcatchers.tpl.html
- content-promote.tpl.html
- content-recording.tpl.html
- content-request_a_slot.tpl.html
- content-requested_topics.tpl.html
- content-search.tpl.html
- content-series_episode.tpl.html
- content-series.tpl.html
- content-sitemap.tpl.html
- content-stuff_you_need_to_know.tpl.html
- content-syndication.tpl.html
- content-tags.tpl.html
- content-theme.tpl.html
- content-twat_episode.tpl.html
- ids-correspondent.tpl.html
- ids-episode.tpl.html
- ids-series_episode.tpl.html
- ids-twat_episode.tpl.html
- navigation-about.tpl.html
- navigation-contribute.tpl.html
- navigation-get-shows.tpl.html
- navigation-give-shows.tpl.html
- navigation-main.tpl.html
- page.tpl.html
- queries-call_for_shows-mysql.tpl.html
- queries-call_for_shows-sqlite.tpl.html
- queries-correspondent-mysql.tpl.html
- queries-correspondent-sqlite.tpl.html
- queries-episode-mysql.tpl.html
- queries-episodes-mysql.tpl.html
- queries-episode-sqlite.tpl.html
- queries-episodes-sqlite.tpl.html
- queries-ids-episode-mysql.tpl.html
- queries-ids-episode-sqlite.tpl.html
- queries-index-mysql.tpl.html
- queries-index-sqlite.tpl.html
- queries-series_episodes-mysql.tpl.html
- queries-series_episodes-sqlite.tpl.html
- queries-series-mysql.tpl.html
- queries-series-sqlite.tpl.html
- queries-tags-mysql.tpl.html
- queries-tags-sqlite.tpl.html
- rss-comments.tpl.xml
- rss-hpr_total.tpl.xml
- rss-hpr.tpl.xml
- rss-query-hpr-mysql.tpl.xml
- rss-query-hpr-sqlite.tpl.xml
- rss-query-hpr_total-mysql.tpl.xml
- rss-query-hpr_total-sqlite.tpl.xml
- rss.tpl.xml
- shared-avatar.tpl.html
- shared-call_for_shows.tpl.html
- shared-episode-summary.tpl.html
- shared-item.tpl.xml
- shared-listen-now.tpl.html
- shared-show-transcript.tpl.html
- shared-utils.tpl.html
Site Generator - templates
Dave Morriss
Last update: 2023-07-21 13:00:25
content-about.tpl.html
- Provides
https://hackerpublicradio.org/about.html
. Includes the text of the FAQ. - It is 795 lines long
content-comments_viewer.tpl.html
- Provides
https://hackerpublicradio.org/comments_viewer.html
, the page showing the last 30 comments in reverse date order. - Uses templates:
shared-episode-summary.tpl.html
shared-utils.tpl.html
shared-listen-now.tpl.html
queries-episode-${constants.database}.tpl.html
- It is 42 lines long
content-contact.tpl.html
- Provides
https://hackerpublicradio.org/contact.html
, the page that shows the ways to contact HPR. - The file is 21 lines long
content-contribute.tpl.html
- Provides
https://hackerpublicradio.org/contribute.html
, first-level details about how to contribute shows. - Templates used:
shared-utils.tpl.html
- The file is 87 lines long
content-correspondents.tpl.html
- Provides
https://hackerpublicradio.org/correspondents/index.html
, the list of all hosts. - Templates used:
shared-utils.tpl.html
shared-avatar.tpl.html
- Uses an internal query to return all hosts in the 'hosts' table
- The file is 32 lines long
content-correspondent.tpl.html
- Provides
http://hpr.example.com/HPR-site/correspondents/<hostid>.html
, the page showing all shows for a given host (indexed byhostid
). - Templates used:
queries-correspondent-${constants.database}.tpl.html
shared-avatar.tpl.html
shared-episode-summary.tpl.html
shared-utils.tpl.html
- Uses internal queries to do the following:
- return the number of shows for this host
- return the number of 'This Week in Tech' shows for this host
- returns the all of the 'This Week in Tech' shows for this host
- The file is 74 lines long
content-download.tpl.html
content-episodes.tpl.html
- Provides
https://hackerpublicradio.org/eps/index.html
, the Archive of Shows page. - Uses templates:
shared-episode-summary.tpl.html
queries-episodes-${constants.database}.tpl.html
- The file is 40 lines long
content-episode.tpl.html
- Contains the HTML and
TT²
code to generate an episode page. - It also contains the comment display and the form.
- Uses templates:
shared-episode-summary.tpl.html
shared-avatar.tpl.html
shared-utils.tpl.html
shared-listen-now.tpl.html
shared-show-transcript.tpl.html
queries-episode-${constants.database}.tpl.html
- The file is 100 lines long
content-help_out.tpl.html
content-index-announcement.tpl.html
content-index.tpl.html
- Contains the HTML and
TT²
code to generate the Home or Index page where the last 10 shows are displayed with their complete notes, a comment count but no comments. - Uses templates:
content-index-announcement.tpl.html
queries-index-${constants.database}.tpl.html
shared-avatar.tpl.html
shared-call_for_shows.tpl.html
shared-episode-summary.tpl.html
shared-listen-now.tpl.html
shared-show-transcript.tpl.html
shared-utils.tpl.html
-
- Uses one macro:
tidy_notes(all_lines)
- Uses one macro:
content-mumble-howto.tpl.html
content-podcatchers.tpl.html
content-promote.tpl.html
content-recording.tpl.html
content-request_a_slot.tpl.html
content-requested_topics.tpl.html
content-search.tpl.html
content-series_episode.tpl.html
- Provides the list of episodes belonging to a series, found at
https://hackerpublicradio.org/series/<series>.html
- Uses templates:
queries-series_episodes-${constants.database}.tpl.html
shared-avatar.tpl.html
shared-episode-summary.tpl.html
- The file is 27 lines long
content-series.tpl.html
- Provides the list of series found at
https://hackerpublicradio.org/series/index.html
- Uses templates:
queries-series-${constants.database}.tpl.html
shared-utils.tpl.html
- The file is 17 lines long
content-sitemap.tpl.html
- Provides the Site Map at
https://hackerpublicradio.org/sitemap.html
. - Uses one macro:
shared-utils.tpl.html
- The file is 33 lines long
content-stuff_you_need_to_know.tpl.html
- Provides
https://hackerpublicradio.org/stuff_you_need_to_know.html
, information about submitting a show to HPR. - The file is 162 lines long
content-syndication.tpl.html
content-tags.tpl.html
content-theme.tpl.html
content-twat_episode.tpl.html
ids-correspondent.tpl.html
ids-episode.tpl.html
- Returns a list of episode ids (show numbers)
- Uses templates:
queries-ids-episode-${constants.database}.tpl.html
- References to this template in other templates:
- None
ids-series_episode.tpl.html
ids-twat_episode.tpl.html
navigation-about.tpl.html
navigation-contribute.tpl.html
navigation-get-shows.tpl.html
navigation-give-shows.tpl.html
navigation-main.tpl.html
page.tpl.html
- Provides the main HTML template into which content is inserted.
- Uses templates:
shared-utils.tpl.html
queries-call_for_shows-mysql.tpl.html
- Contains a database query to determine how many shows are in the system between the current date and 10 days from now.
- The query is stored in a
TT²
variable calledquery_call_for_shows
. - The file is 6 lines long.
queries-call_for_shows-sqlite.tpl.html
queries-correspondent-mysql.tpl.html
queries-correspondent-sqlite.tpl.html
queries-episode-mysql.tpl.html
- Contains the query to collect information about a single episode.
- This consists of several CTE's to perform separate sub-queries and merge them together.
- It is invoked by
content-episode.tpl.html
queries-episodes-mysql.tpl.html
- Contains a database query to return brief details of all shows in reverse
order in a format suitable for the Archive at
https://hackerpublicradio.org/eps/index.html
. - The query is invoked by
content-episodes.tpl.html
- The file is 16 lines long.
queries-episode-sqlite.tpl.html
- Contains the query to collect information about a single episode.
- This consists of several CTE's to perform separate sub-queries and merge them together.
- It is invoked by
content-episode.tpl.html
queries-episodes-sqlite.tpl.html
- Contains a database query to return brief details of all shows in reverse
order in a format suitable for the Archive at
https://hackerpublicradio.org/eps/index.html
. - The query is invoked by
content-episodes.tpl.html
- The file is 15 lines long.
queries-ids-episode-mysql.tpl.html
queries-ids-episode-sqlite.tpl.html
queries-index-mysql.tpl.html
- Contains several database queries assigned to
TT²
variables:query_next_available_episode
- computes the number of days to the next free slotquery_latest_episodes
- collects the latest 10 shows, hosts, series and comment counts for the main index. Uses a CTE for the comment counts.query_last_5_weeks_episodes
- collects condensed details of the next 30 episodes after the previous block of 10.
queries-index-sqlite.tpl.html
queries-series_episodes-mysql.tpl.html
queries-series_episodes-sqlite.tpl.html
queries-series-mysql.tpl.html
queries-series-sqlite.tpl.html
queries-tags-mysql.tpl.html
queries-tags-sqlite.tpl.html
rss-comments.tpl.xml
rss-hpr_total.tpl.xml
rss-hpr.tpl.xml
rss-query-hpr-mysql.tpl.xml
rss-query-hpr-sqlite.tpl.xml
rss-query-hpr_total-mysql.tpl.xml
rss-query-hpr_total-sqlite.tpl.xml
rss.tpl.xml
shared-avatar.tpl.html
- Contains a number of
TT²
macros - Macro names:
get_avatar(host_id, host_name, is_lazy_loaded)
get_avatar_src(host_id)
lazy_load(is_lazy)
show_avatar(host_id, host_name, is_lazy_loaded)
- File is 16 lines long
shared-call_for_shows.tpl.html
- Uses templates:
queries-call_for_shows-${constants.database}.tpl.html
shared-utils.tpl.html
- Contains one macro:
display_call_for_shows
- File is 18 lines long
shared-episode-summary.tpl.html
- Contains a number of
TT²
macros - Macro names:
display_comments_tally(eps_id, tally)
display_listen_in(eps_id, episode_type)
display_tags(tags)
rss_show_series(series, series_id)
show_meta(show, hide_tags)
show_series(series, series_id, label)
show_summary(show, hide_host)
twat_show_summary(show, hide_host)
- File is 63 lines long
shared-item.tpl.xml
shared-listen-now.tpl.html
shared-show-transcript.tpl.html
shared-utils.tpl.html
- Contains a number of
TT²
macros used in many templates - Macro names:
absolute_path(baseurl)
display_choice(choice, display_when_true, display_when_false)
display_episode_duration(duration_sec)
display_explicit_feed(is_explicit)
display_explicit(is_explicit)
format_feed_date(date_to_format)
format_iso8601_date(date_to_format)
media_basepath(baseurl, media_baseurl)
media_path(episode_id, episode_type, media_type, baseurl, media_baseurl)
step_navigation(baseurl, links, folder)
zero_pad_left(word, pad_length)
- File is 95 lines long