Archived
4
2

Add absolute_path MACRO

Used with baseurl to make a path relative or absolute.
This commit is contained in:
Roan Horning 2022-08-05 15:49:00 -04:00
parent 30f0c9924a
commit dcc0f3d6b0
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769
4 changed files with 11 additions and 6 deletions

View File

@ -35,7 +35,7 @@
<!--% this_host = hosts.$id %-->
<h2 class="title">Correspondent</h2>
<h2><!--% this_host.host %--></h2>
<p><img src="./images/<!--% get_avatar(this_host.hostid) %-->"
<p><img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(this_host.hostid) %-->"
height="80" alt="Host Image" /><br>
<label>Host ID</label>: <!--% this_host.hostid %--><br><br>
<label>email:</label> <u><!--% this_host.email %--></u><br>

View File

@ -17,11 +17,11 @@
on h.hostid = e.hostid '
) %-->
<tr height="80" bgcolor="#CCCCCC">
<td><img src="./images/<!--% get_avatar(host.hostid) %-->" height="80" width="80" alt="avatar" /></td>
<td><img src="<!--% absolute_path(baseurl) %-->images/<!--% get_avatar(host.hostid) %-->" height="80" width="80" alt="avatar" /></td>
<td><strong><!--% host.host %--></strong><br />
Host ID: <a href="correspondents/<!--% zero_pad_left(host.hostid) %-->/index.html"><!--% host.hostid %--></a></td>
Host ID: <a href="<!--% absolute_path(baseurl) %-->correspondents/<!--% zero_pad_left(host.hostid) %-->/index.html"><!--% host.hostid %--></a></td>
<td><!--% host.license %--></td>
<td><!--% host.date %--></td>
</tr>

View File

@ -1,3 +1,4 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!DOCTYPE HTML>
<html lang="en">
<head>
@ -24,9 +25,9 @@
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio MP3 RSS" href="/hpr_mp3_rss.php" />
<link rel="alternate" type="application/rss+xml" title="Hacker Public Radio Comments RSS" href="/comments_rss.php" />
<link rel="license" title="cc by 3.0" href="https://creativecommons.org/licenses/by-sa/3.0/" />
<link href="./css/hpr.css" rel="stylesheet" />
<link href="<!--% absolute_path(baseurl) %-->css/hpr.css" rel="stylesheet" />
<!--[if IE]>
<link rel="stylesheet" href="css/hpr.css" media="screen" type="text/css" />
<link rel="stylesheet" href="<!--% absolute_path(baseurl) %-->css/hpr.css" media="screen" type="text/css" />
<script src="/JavaScript/html5.js"></script>
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.5, user-scalable=yes"/>
@ -35,7 +36,7 @@
<body id="give">
<div id="container" class="shadow">
<header>
<a href=""><img id="hprlogo" src="/images/hpr_logo.png" alt=""></a>
<a href=""><img id="hprlogo" src="<!--% absolute_path(baseurl) %-->images/hpr_logo.png" alt=""></a>
<div id="hpr_banner">
<p id="accessible_menu">
<a href="sitemap.php">Site Map</a>

View File

@ -7,3 +7,7 @@
<!--% IF choice == 1 %--><!--% display_when_true %-->
<!--% ELSE %--><!--% display_when_false %--><!--% END %-->
<!--% END %-->
<!--% MACRO absolute_path(baseurl) BLOCK %-->
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
<!--% END %-->