From f6318cd34f3d6c443bc879fabbe64b7dcff0b3a5 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Sun, 31 Jul 2022 22:25:15 -0400 Subject: [PATCH] Add get_avatar macro Print hpr logo or host avatar filename. --- templates/content-correspondent.tpl.html | 8 +++----- templates/content-correspondents.tpl.html | 5 +++-- templates/content-index.tpl.html | 7 ++++--- templates/shared-avatar.tpl.html | 3 +++ 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 templates/shared-avatar.tpl.html diff --git a/templates/content-correspondent.tpl.html b/templates/content-correspondent.tpl.html index f69c6e2..bff10e5 100644 --- a/templates/content-correspondent.tpl.html +++ b/templates/content-correspondent.tpl.html @@ -1,10 +1,8 @@ +

Correspondent

-

Rho`n

-

Host Image
- :

- roan.horning.nospam@nospam.gmail.com
- 12 +

Host Image

hpr3647 :: Weekend projects

Released: 2022-07-26. Duration: 00:16:44. Flag: Clean. Series: general.
diff --git a/templates/content-correspondents.tpl.html b/templates/content-correspondents.tpl.html index 43f8133..ff1f0dd 100644 --- a/templates/content-correspondents.tpl.html +++ b/templates/content-correspondents.tpl.html @@ -3,6 +3,7 @@

Correspondents

For more information on how to become a Correspondent see our contribute page. To add a logo here, either email one to admin at hpr or setup your email on Gravatar. To protect your browsing privacy we gather the images every hour and serve them directly from HPR.

+ @@ -10,13 +11,13 @@ - +
Avatar Name & Host IDLast Show
avataravatar
diff --git a/templates/content-index.tpl.html b/templates/content-index.tpl.html index 17d0225..e8809b9 100644 --- a/templates/content-index.tpl.html +++ b/templates/content-index.tpl.html @@ -1,3 +1,4 @@ +
@@ -29,8 +30,8 @@ eps.date, eps.license, eps.duration, eps.title, eps.summary, eps.tags, eps.series, eps.notes, - CASE hosts.local_image WHEN 1 THEN hosts.hostid ELSE \'hpr_logo\' END AS avatar, - substr(\'0000\' || hosts.hostid, -4, 4) AS [host_id], + hosts.local_image, + hosts.hostid, hosts.host, hosts.email FROM eps INNER JOIN hosts ON eps.hostid = hosts.hostid WHERE eps.date BETWEEN date(\'now\', \'-7 days\') AND date(\'now\') @@ -41,7 +42,7 @@ ORDER BY date DESC ')

hpr ::

-


Hosted by on is flagged as and released under a license.
+


Hosted by on is flagged as and released under a license.
Tags: .
listen in ogg, spx, or mp3 format. comments (0) diff --git a/templates/shared-avatar.tpl.html b/templates/shared-avatar.tpl.html new file mode 100644 index 0000000..13a654e --- /dev/null +++ b/templates/shared-avatar.tpl.html @@ -0,0 +1,3 @@ + +hpr_logo.pnghosts/.png +