Archived
4
2
Commit Graph

237 Commits

Author SHA1 Message Date
Dave Morriss
b4448caf16 Fixing 'absolute_url'
site-generator:

    Added all the modules that the script and the templates use to make
    it explicit what is required.

templates/shared-utils.tpl.html:

    Added a new TT² macro called 'absolute_url' which takes two
    arguments, the base and  the path or relative URL. It's fairly
    primitive but seems to work.

templates/content-about.tpl.html,
templates/content-recording.tpl.html,
templates/content-request_a_slot.tpl.html,
templates/content-requested_topics.tpl.html,
templates/page.tpl.html:

    All calls to 'absolute_url' changed to use two arguments, and the
    link definitions adjusted to match this change.
2023-09-09 17:54:19 +01:00
d1832ae619 Changes recommended by Dave - missing php and typo 2023-09-06 19:35:22 +02:00
4c239f4f67 Cleaned up the temp cruft 2023-09-05 20:39:25 +02:00
796ee598e9 Added press information that was missing and updated the FAQ for wikipedia 2023-09-05 20:31:46 +02:00
4b2a030a5b Missed a reference to <!--% baseurl %--> 2023-09-03 18:02:09 +02:00
7009533e25 Fixing invalid links in the templates. 2023-09-03 17:51:03 +02:00
Dave Morriss
ccc1982c6c Fixed miscalculation triggering 'Call for shows'
templates/shared-call_for_shows.tpl.html:
    - Cosmetic change

templates/queries-call_for_shows-mysql.tpl.html:
templates/queries-call_for_shows-sqlite.tpl.html:
    - In a period of 10 days the minimum number of weekday-only shows
      is 6, not 7. Adjusted the queries appropriately.
2023-08-27 16:00:00 +01:00
Ken Fallon
c263646cf2 Merge pull request 'Fixing issue #140' (#155) from I140_Convert_the_RSS_feeds_from_php_to_the_static_site into main
Reviewed-on: #155
2023-08-20 15:07:33 +00:00
Dave Morriss
dc138596ea Fixing issue #140
site-generator:

    Cosmetic adjustments. Additions to the POD documentation.
    Additions to module list.
    Additions to work better with UTF-8.
    Addition of functions 'parse_csv' and 'xml_entity'

templates/queries-episodes-sqlite.tpl.html:
templates/shared-utils.tpl.html:

    Cosmetic changes

templates/rss-query-hpr-mysql.tpl.xml:
templates/rss-query-hpr-sqlite.tpl.xml:
templates/rss-query-hpr_total-mysql.tpl.xml:
templates/rss-query-hpr_total-sqlite.tpl.xml:

    Enhancements to allow the query to collect the audio length from the
    'assets' table. The audio file extension is passed as an argument to
    the 'execute' statement.

templates/rss.tpl.xml:

    Cosmetic changes
    Changed one 'php' URL to 'html'.

templates/shared-episode-summary.tpl.html:

    Change to 'display_tags' macro to turn the 'eps.tags' field into
    a list of links. This works, but needs further development because
    using the tag strings as anchor ids is not reliable.

templates/shared-item.tpl.xml:

    Cosmetic changes.
    Addition of filter 'HTML.strip' which is used as a means of removing
    HTML tags from '<itunes:summary>' strings.
    Using new filter 'xml_entity' which converts all non-ASCII
    characters in the notes to numeric hexadecimal entities for
    '<itunes:summary>'.
    The '<enclosure>' tag now uses 'episode.length' rather than
    'episode.duration' which has been extracted from the 'assets' table.
2023-08-19 13:34:50 +01:00
0b841ba78f Fixed the link to the mail list
- added redirect via hpr_hub .htaccess file
- added links to mastodon, matrix, and mumble

Removed contact and stuff you need to know pages as these are now in the about page
2023-08-06 14:04:00 +02:00
Dave Morriss
31fed34212 Fixes to "step navigation", etc
public_html/css/hpr.css: Commented out the 'font-size: 75%;' in the CSS
    definition for '#maincontent footer p'. It was this that shrank the
    lower "step navigation" list in comparison to the upper one. The
    upper is in a '<header>' block and the lower in a '<footer>' block.

templates/content-episode.tpl.html: Fixed a typo.

templates/content-theme.tpl.html: Changed "This can be added" to "This
    is automatically added"

templates/queries-episode-sqlite.tpl.html: Fixed a transcription error
    from the 'mysql' version

templates/shared-utils.tpl.html: Modified the layout of the
    'step_navigation' macro to remove tabs which are being copied to the
    HTML. Just a minor cosmetic issue. Added a Vim modeline to the file
    to help with this.
2023-07-31 15:27:17 +01:00
Dave Morriss
3f766544ac I145 Various bug fixes
site-generator: fixed an error in the POD documentation and added an
    example. Reformatted 'GetOptions' arguments. Fixed 'parse_page_arg'
    which started its returned array with an empty arrayref. Fixed code
    using this array which skipped this unwanted extra value. Fixed
    'get_ids_from_db' which turns a CSV list of shows into an array, but
    includes a blank element. Removed a few trailing spaces.

templates/content-correspondents.tpl.html: Capitalised "License". Added
    'order by h.host' to the internal query to get hosts sorted
    alphabetically.

templates/content-episode.tpl.html: Added a call to macro
    'zero_pad_left' to add leading zeroes to show number in the title.
    Added a call to 'FILTER html_para' when displaying comments (which
    are plain text). Added a test for whether the show being displayed
    is in the 20-show window before the current one to determine whether
    the short or long comment form is required. Added the code to
    generate the two form types depending on the earlier test.

templates/content-sitemap.tpl.html: Corrected the entry for "Show
    Comments" which contained an invalid URL.

templates/page.tpl.html: Grammar corrections in the '<head>' section.

templates/queries-episode-mysql.tpl.html: Adjusted the date tests in the
    CTE's which compare the episode date with today's date plus one day.
    Why add a day when the test is whether the episode date is less than
    or equal to the current one? Also, it seemed that MySQL/MariaDB
    might need to work with the UTC date rather than the local dat
    implied by 'NOW()'.

templates/queries-episode-sqlite.tpl.html: Similar adjustment to date
    tests in CTE's to the MySQL version. SQLite defaults to UTC however.

templates/queries-episodes-mysql.tpl.html: See above for notes about
    date tests and MySQL UTC dates. Same arguments here.

templates/queries-episodes-sqlite.tpl.html: Date test adjustment
    described above.

templates/queries-ids-episode-mysql.tpl.html: Removed the date test from
    the query so all episode numbers are returned. Added an 'order by'
    since the table can (could in the past) return numbers out of
    numerical sequence.

templates/queries-ids-episode-sqlite.tpl.html: Same change as for the
    MySQL version.

templates/queries-index-mysql.tpl.html: There are three queries here,
    returned as TT² variables. The one called 'query_latest_episodes'
    has been adjusted to use UTC and to avoid adding a day to the
    current date. The query called 'query_last_5_weeks_episodes' has
    been similarly adjusted.

templates/queries-index-sqlite.tpl.html: Changes for the same two
    queries, but just for the tests requiring today's date plus one day.

templates/rss-comments.tpl.xml: Grammar corrections in the
    '<channel><description>' section.

templates/rss.tpl.xml: Grammar corrections in various subsections of the
    '<channel>' section.

templates/shared-call_for_shows.tpl.html: Removed the "FTP server"
    message. Slight tidying.
2023-07-23 17:03:27 +01:00
6a3dae3d95 Various changes to bring all the information pages into the same locations 2023-06-27 19:31:39 +02:00
278867cb4f Fix the DuckDuck Go form, convert all url's to https and add help text 2023-06-22 21:13:25 +02:00
726ac57989 Changes to get the site working 2023-06-17 22:04:35 +02:00
4f35673a3d Add information to each page showing when it was generated and by whom. 2023-06-08 15:37:04 +02:00
c9510516f1 Change php_baseurl to hub_baseurl in the template files 2023-05-31 10:25:17 +02:00
f95ff21c5e Remove references to absolute_path(php_baseurl) 2023-05-30 17:59:33 +02:00
Ken Fallon
db5774f642 Added support for having a different php FQDN location from the main site via php_baseurl 2023-05-29 16:11:59 +02:00
e7fe824302
Fix calculation of the days until next available episode timeslot
Do all date calulation in DB instead of naively adding 1 to the
day that is returned.
2023-05-18 09:04:04 -04:00
8b218e2036
Fix episode url issues
Add absolute_path macro. Add eps folder to path. Pad episode number
in path.
2023-05-06 09:07:25 -04:00
Gordon Stanton
afc6b7518f Fixed link to Tags.
Get episode ID and episode tags from eps.
Generate the Tags page by looping through the tags, order by their first character.
Added tags page to the config.
2023-05-01 00:50:01 +10:00
91ce3c4325 add comments viewer and put links on separate lines 2023-04-02 14:32:38 +00:00
821ea9b62d H links to correspondents page 2023-04-02 14:32:38 +00:00
6c9d6239bb
Update audio link to use media_path MACRO 2023-04-02 10:24:41 -04:00
ebced513ad
Add audio links to the episodes on a series page 2023-04-02 09:06:57 -04:00
a2863e5d84
Update layout of episode summary information. 2023-04-02 08:53:07 -04:00
1c94855de2
Update location of comments
The listen_now MACRO formating changed, requiring an update to the postion of the comments reference.
2023-04-02 08:50:04 -04:00
c6e909523f
Add requested audio links
Have links to an episodes auido files appear in the Last 5 weeks section of the index page, on the full index page, and on individual host pages.
2023-04-02 07:24:43 -04:00
a9c4388cb0
Update listen_now MACRO
The ability to download and play the episode is being moved up in the episode description. Display content in a more condensed form.
2023-04-01 19:56:11 -04:00
24c2f9044e
Update show_meta MACRO
Display comments as part of the show meta data
2023-04-01 19:37:38 -04:00
f045cdd32f
Update display_comments_tally MACRO
Display on the number of comments. Show a message
when the show has now comments.
2023-04-01 19:34:09 -04:00
dc4377d588
Add arial-title attribute to episode download links 2023-04-01 19:29:00 -04:00
Ken Fallon
5369bea657 This reflects the change to move the "play" button to the top of the episode 2023-03-31 14:02:49 +02:00
Gordon Stanton
610e91ea9f Added lazy loading attribute to images in show notes. 2023-03-19 22:51:21 +11:00
c9278c0dd6
Remove unused PROCESS directive 2023-03-13 23:16:37 -04:00
aabeca44f5
Refactor templates to use show_avatar MACRO 2023-03-13 23:15:46 -04:00
3a8b6db348
Add show_avatar MACRO 2023-03-13 23:14:35 -04:00
7a6ace156f
Refactor template to use get_avatar MACRO 2023-03-13 23:13:25 -04:00
dee924e6a8
Rename MACRO host_thumb to get_avatar
Update to use lazy_load MACRO and minimize number of
arguments needed.
2023-03-13 23:10:36 -04:00
5b4421071f
Add MACRO lazy_load
Macro which allows programatically setting the HTML5 img
loading attribute.
2023-03-13 23:03:15 -04:00
Gordon Stanton
ce4aefe828 Renamed macro get_avatar to get_avatar_src as per suggestion.
Moved host_thumb macro into shared avatar template file.
Made condition of lazy loading a parameter.
2023-03-12 18:48:51 +11:00
Gordon Stanton
ebcd906300 Moved thumbnail image tag to Block with conditional lazy load. 2023-03-11 01:57:51 +11:00
ea8403c7b6
Fix link to comments viewer in about navigation menu 2023-03-09 20:59:26 -05:00
Gordon Stanton
c744bdf175 Moved host thumbnail image tag to separate template file.
Added loading="lazy" to image tag.
Changed alt text to show host username.
2023-03-05 02:07:03 +11:00
431126e8a3
Fix URL's to series RSS feeds 2023-02-25 23:06:41 -05:00
8feb37e831
Hide display of future shows on series episodes page 2023-02-25 14:22:44 -05:00
4a34496f24
Hide display of future shows on series listings page 2023-02-25 11:44:56 -05:00
59875e772e
Implement comments_viewer page 2023-02-24 20:42:01 -05:00
927424901b
Add show_transcript MACRO to index and episode pages 2023-02-24 18:58:56 -05:00
27a84529c6
Create shared template for showing show transcripts
Used in main index page and individual episode pages.
2023-02-24 18:57:20 -05:00
59549daa63
Fix archive.org paths in media_path MACRO 2023-02-24 18:55:37 -05:00
756bdc0fa1
Refactor RSS templates for either MySQL or SQLite 2023-02-20 22:36:30 -05:00
b2eaea1eb8
Improve look of hosts table 2023-02-12 16:54:17 -05:00
309ea05c15
Update sydication template text
Now matches what is in the syndication.php page on
hakerpublicradio.org
2023-02-12 13:46:11 -05:00
e41f6029aa
Make tags page menu link hard coded
Not implementing tags page in the static generator yet.
Make the link point to the php page on hackerpublicradio.org.
2023-02-12 13:07:06 -05:00
138b0fdd1b
Add Show Transcript section to episode template 2023-02-12 10:58:43 -05:00
d437e66f0e
Update media_path MACRO for archive.org transciption files
The whisper transcription files are stored one directory
deeper on archive.org. Add checks and correct path when
passed txt, srt, or vtt media_type.
2023-02-12 10:53:50 -05:00
Roan Horning
314127441c Merge branch 'main' into MySQL 2023-02-12 12:57:38 +00:00
2a486cb58b
Add SQLite specific query templates 2023-02-08 16:05:36 -05:00
7c44f6b680
Remove New Year's Eve 2023 show announcement 2023-01-03 10:08:52 -05:00
71a63e1beb
Merge branch 'main' into MySQL 2022-12-31 18:39:25 -05:00
8e1232517a Update New Year's Eve show 2023 2022-12-31 15:55:39 -05:00
cb65d25cfc
Refactor MySQL database specific SQL 2022-11-28 22:47:53 -05:00
2b4802508d
Remove superflous WHERE condition 2022-11-28 19:55:51 -05:00
1312e3d374
Refactor MySQL database specific SQL 2022-11-28 19:52:39 -05:00
3cc6da57ad
Refactor MySQL database specific SQL 2022-11-28 19:49:06 -05:00
675f8fa9d5
Refactor MySQL database specific SQL 2022-11-27 14:04:12 -05:00
6f28bb2a16
Refactor MySQL database specific SQL 2022-11-27 13:54:14 -05:00
4e8edf2640
Merge branch 'main' into MySQL 2022-11-11 20:27:47 -05:00
f0fa21ae45
Implement call for shows feature
Add display_call_for_shows MACRO. Update index template to include
call to display_call_for_shows.
2022-11-10 22:14:55 -05:00
8c3874ad8b
Convert hpr total rss queries from SQLite to MySQL 2022-10-21 23:00:03 -04:00
6f95a33e67
Convert hpr rss queries from SQLite to MySQL 2022-10-21 22:53:13 -04:00
979c8b43e5
Convert twat episode page queries from SQLite to MySQL 2022-10-21 20:43:22 -04:00
e3abe5fd68
Convert series episode page queries from SQLite to MySQL 2022-10-21 20:11:19 -04:00
5612eeed42
Convert episode page queries from SQLite to MySQL 2022-10-21 20:07:53 -04:00
4af117fb7a
Convert episodes page queries from SQLite to MySQL 2022-10-21 19:52:53 -04:00
e1b0189275
Convert correspondent page queries from SQLite to MySQL 2022-10-21 19:46:31 -04:00
aad77f3c78
Convert index page queries from SQLite to MySQL 2022-10-20 23:24:56 -04:00
0837e11bfe
Include announcement template in index template 2022-10-16 18:56:13 -04:00
06ace35c41
Add announcement template 2022-10-16 18:23:51 -04:00
6d0d1b99a6
Add page mumble-howto 2022-10-16 18:12:05 -04:00
fdeff3879a
Update links in the comments section of the episode template 2022-10-09 15:45:22 -04:00
b667c30d40
Update links on syndication page
Add missing external links. Update comments feed link to new statically
generated file.
2022-10-09 13:51:00 -04:00
b08f5c30df
Add missing USE date directive
Worked without it in local dev, but needed on hpr.horning.us
2022-10-08 12:35:56 -04:00
3de4476a3f
Add comments feed template 2022-10-08 08:52:47 -04:00
4984ac3383
Add MACRO rss_show_series 2022-10-08 08:48:42 -04:00
e4463dc5ba
Zero pad the day's date 2022-10-08 08:44:47 -04:00
1d4e6e15b7
Refactor templates to use media_path MACRO 2022-10-01 13:42:46 -04:00
fb70ae6253
Add media_path MACRO to shared utilities
Generate the full URL of an audio file.
2022-10-01 13:23:36 -04:00
64ae9c4f86
Refactor media_baseurl MACRO to media_basepath MACRO
Prevent name collision with media_basepath root_template/page property
of same name. Also fix application of trailing forward slash to path
based on existence of baseurl property.
2022-10-01 13:18:35 -04:00
b0d31ee507
Allow user to modify zero_pad_left MACRO's padding
Add optional pad length argument
2022-10-01 12:51:11 -04:00
991b3dcec1
Update SQL query to order results by id 2022-09-21 21:18:48 -04:00
2eaaa11a69
Fix MACRO step_navigation
Check for existence of folder arg instead of empty value.
2022-09-19 22:00:18 -04:00
3723303e31
Fix absolute path for media links 2022-09-18 19:21:19 -04:00
3054d6519e
Refactor template to use media_baseurl MACRO 2022-09-18 16:27:47 -04:00
c6e7a3c239
Refactor templates to use listen_now MACRO 2022-09-18 16:23:35 -04:00
dbf011395c
Add MACRO listen_now 2022-09-18 16:21:00 -04:00
c817e3a17a
Add MACRO media_baseurl
Allow the audio files to be served from a different host
2022-09-18 16:18:05 -04:00
0edf9cc5a2
Fix missing id generation for twat episdoe files 2022-09-18 15:36:24 -04:00