forked from HPR/hpr_generator
		
	Add absolute_path MACRO
Used with baseurl to make a path relative or absolute.
This commit is contained in:
		| @@ -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> | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -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 %--> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user