From 8c1e90d17292e09780b56e995054fcc16040f0ea Mon Sep 17 00:00:00 2001
From: Imran Hussain <imranh@sucs.org>
Date: Tue, 14 Apr 2015 17:33:22 +0000
Subject: [PATCH] add {} in places so people aren't thrown about all over the
 place

---
 templates/banana-leaders.tpl | 12 ++++++------
 templates/branding.tpl       |  2 +-
 templates/breadcrumb.tpl     |  2 +-
 templates/games.tpl          |  2 +-
 templates/head.tpl           |  6 +++---
 templates/index.tpl          |  2 +-
 templates/news.tpl           |  2 +-
 templates/options.tpl        |  2 +-
 templates/signup.tpl         |  6 +++---
 templates/users.tpl          |  2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/templates/banana-leaders.tpl b/templates/banana-leaders.tpl
index 4505260..6fdad1c 100644
--- a/templates/banana-leaders.tpl
+++ b/templates/banana-leaders.tpl
@@ -4,9 +4,9 @@
 <ol>
 {foreach name=top from=$stats.yeartop key=key item=member}
 	{if $member.real == TRUE} 
-		<li><a href="/Community/Members/{$member.username}">{$member.username}</a> ({$member.sum})</li>
+		<li><a href="{$baseurl}/Community/Members/{$member.username}">{$member.username}</a> ({$member.sum})</li>
 	{else}
-		<li><a href="/Community/Bananas/{$member.username}">{$member.username}</a> ({$member.sum})</li>
+		<li><a href="{$baseurl}/Community/Bananas/{$member.username}">{$member.username}</a> ({$member.sum})</li>
 	{/if}
 {/foreach}
 </ol>
@@ -18,9 +18,9 @@
 <ol>
 {foreach name=top from=$stats.top key=key item=member}
 	{if $member.real == TRUE} 
-		<li><a href="/Community/Members/{$member.username}">{$member.username}</a> ({$member.sum})</li>
+		<li><a href="{$baseurl}/Community/Members/{$member.username}">{$member.username}</a> ({$member.sum})</li>
 	{else}
-		<li><a href="/Community/Bananas/{$member.username}">{$member.username}</a> ({$member.sum})</li>
+		<li><a href="{$baseurl}/Community/Bananas/{$member.username}">{$member.username}</a> ({$member.sum})</li>
 	{/if}
 {/foreach}
 </ol>
@@ -31,9 +31,9 @@
 <ol>
 {foreach name=top from=$stats.bottom key=key item=member}
 	{if $member.real == TRUE}        
-		<li><a href="/Community/Members/{$member.username}">{$member.username}</a> ({$member.sum})</li>
+		<li><a href="{$baseurl}/Community/Members/{$member.username}">{$member.username}</a> ({$member.sum})</li>
 	{else}
-		<li><a href="/Community/Bananas/{$member.username}">{$member.username}</a> ({$member.sum})</li>
+		<li><a href="{$baseurl}/Community/Bananas/{$member.username}">{$member.username}</a> ({$member.sum})</li>
 	{/if}
 {/foreach}
 </ol>
diff --git a/templates/branding.tpl b/templates/branding.tpl
index 7957630..ad6f5ee 100644
--- a/templates/branding.tpl
+++ b/templates/branding.tpl
@@ -3,7 +3,7 @@
 	<div class="cornerTopLeft">
 	<div class="cornerTopRight">
 		<div id="logo">
-			<a href="/"><img src="/images/sucslogo-halo.png" width="170" height="76" alt="SUCS" /></a>
+			<a href="{$baseurl}"><img src="{$baseurl}/images/sucslogo-halo.png" width="170" height="76" alt="SUCS" /></a>
 		</div>
 
 {include file="login.tpl"}
diff --git a/templates/breadcrumb.tpl b/templates/breadcrumb.tpl
index 01b5602..a7383d4 100644
--- a/templates/breadcrumb.tpl
+++ b/templates/breadcrumb.tpl
@@ -2,7 +2,7 @@
 {if $pathlist}
 				<ul>
 {foreach name=pathlist from=$pathlist key=key item=item}
-					<li>{if !$smarty.foreach.pathlist.first}{if $item!=""}&gt; {/if}{/if}{if !$smarty.foreach.pathlist.last}<a href="{buildpath list=$pathlist item=$item}">{/if}{if $item}{$item|escape:'htmlall'}{else}{if $smarty.foreach.pathlist.first}SUCS{/if}{/if}{if !$smarty.foreach.pathlist.last}</a>{/if}</li>
+					<li>{if !$smarty.foreach.pathlist.first}{if $item!=""}&gt; {/if}{/if}{if !$smarty.foreach.pathlist.last}<a href="{$baseurl}{buildpath list=$pathlist item=$item}">{/if}{if $item}{$item|escape:'htmlall'}{else}{if $smarty.foreach.pathlist.first}SUCS{/if}{/if}{if !$smarty.foreach.pathlist.last}</a>{/if}</li>
 {/foreach}
 				</ul>
 {/if}
diff --git a/templates/games.tpl b/templates/games.tpl
index 13bfa96..6fe8940 100644
--- a/templates/games.tpl
+++ b/templates/games.tpl
@@ -1,7 +1,7 @@
 {include file="../static/fragments/Games.txt"}
 <ul class="boxes">
 {foreach name=games from=$games item=game}
-<li><div class="cbb"><a href="/Games/{$game.name}"><div>
+<li><div class="cbb"><a href="{$baseurl}/Games/{$game.name}"><div>
 <img src="/pictures/games/{$game.name|escape:url}.jpg" alt="{$game.name}" />
 <br />{$game.name}
 </div></a></div></li>
diff --git a/templates/head.tpl b/templates/head.tpl
index 893e55b..fa2a7da 100644
--- a/templates/head.tpl
+++ b/templates/head.tpl
@@ -4,10 +4,10 @@
 <head>
 	<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
 	<title>{$title} - SUCS</title>
-	<link rel="SHORTCUT ICON" href="/favicon.ico" />
-	<link rel="apple-touch-icon" href="/images/apple-touch-icon.png" />
+	<link rel="SHORTCUT ICON" href="{$baseurl}/favicon.ico" />
+	<link rel="apple-touch-icon" href="{$baseurl}/images/apple-touch-icon.png" />
 
-	<script type="text/javascript" src="/videos/talks/ufo.js"></script>
+	<script type="text/javascript" src="{$baseurl}/videos/talks/ufo.js"></script>
 	
 	<link rel="stylesheet" type="text/css" href="{$baseurl}/css/common.css" media="screen,print" />
 	<link rel="stylesheet" type="text/css" href="{$baseurl}/css/sucs.css" media="screen" />
diff --git a/templates/index.tpl b/templates/index.tpl
index aac0866..7f28e91 100644
--- a/templates/index.tpl
+++ b/templates/index.tpl
@@ -18,7 +18,7 @@
 </ul>
 <div class="clear"></div>
 {/if}
-Page last modified{if $modifiedby} by <a href="/Community/Members/{$modifiedby}">{$modifiedby}</a>{/if} on {$modified}
+Page last modified{if $modifiedby} by <a href="{$baseurl}/Community/Members/{$modifiedby}">{$modifiedby}</a>{/if} on {$modified}
 </div>
 {/if}
 </div>
diff --git a/templates/news.tpl b/templates/news.tpl
index f8847b1..51b4d9d 100644
--- a/templates/news.tpl
+++ b/templates/news.tpl
@@ -27,7 +27,7 @@
 </div>
 {/if}
 	</div>
-	<div class="boxfoot"><p>Posted by <a href="/Community/Members/{$item.author}">{$item.author}</a> on {$item.date|date_format }</p></div>
+	<div class="boxfoot"><p>Posted by <a href="{$baseurl}/Community/Members/{$item.author}">{$item.author}</a> on {$item.date|date_format }</p></div>
 </div>
 {foreachelse}
 <p>News item not found</p>
diff --git a/templates/options.tpl b/templates/options.tpl
index 817feb6..3fa078b 100644
--- a/templates/options.tpl
+++ b/templates/options.tpl
@@ -28,7 +28,7 @@
 	</div>
 	<div class="row">
 		<label for="groups">Groups: </label>
-		<span class="textinput"><span class="note"><a href="/Knowledge/Help/Admin%20Tools/Groups">What are &ldquo;Groups&rdquo;?</a></span></span>
+		<span class="textinput"><span class="note"><a href="{$baseurl}/Knowledge/Help/Admin%20Tools/Groups">What are &ldquo;Groups&rdquo;?</a></span></span>
 	</div>
 	<div class="row">
 		<span class="textinput" id="groups">
diff --git a/templates/signup.tpl b/templates/signup.tpl
index 323f612..e70c54f 100644
--- a/templates/signup.tpl
+++ b/templates/signup.tpl
@@ -18,7 +18,7 @@
                 <input type="submit" name="submit" value="Sign Up" /></span>
             </div>
             <div class="clear"></div>
-            <div class="note">If you wish to renew an existing account instead, please login to <a href="https://sucs.org/Options">Membership Options</a> using your existing account details.</div>
+            <div class="note">If you wish to renew an existing account instead, please login to <a href="{$baseurl}/Options">Membership Options</a> using your existing account details.</div>
         </div>
         <div class="hollowfoot"><div><div></div></div></div>
     </div>
@@ -76,7 +76,7 @@
 					<div id="phonemessage"{if $mode=='re-form'}{if isset($errors.phone)} style="color:red; float:right; clear:right;">{$errors.phone}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
 				</div>
 		                <div class="row" id="tncdiv">
-                                        <span class="textinput"><input type="checkbox" id="tnc" name="tnc" size="30" {if $mode=='re-form'}value='{$fields.tnc}'{/if}/>I have read and understood, and agree to be bound by the <a href="/About/Conditions">Terms and Conditions</a>.</span>
+                                        <span class="textinput"><input type="checkbox" id="tnc" name="tnc" size="30" {if $mode=='re-form'}value='{$fields.tnc}'{/if}/>I have read and understood, and agree to be bound by the <a href="{$baseurl}/About/Conditions">Terms and Conditions</a>.</span>
 					<div id="tncmessage"{if $mode=='re-form'}{if isset($errors.tnc)} style="color:red; float:right; clear:right;">{$errors.tnc}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div>
 				</div>
 			{if $overridable}
@@ -94,7 +94,7 @@
 {elseif $mode=='result'}
 {if !$failed}
 <h1>Welcome to SUCS</h1>
-<p>Signup is complete, please see below for your password, a copy has also been send to {$email}, we request you change this immediatley. See our <a href="/Getting%20Started">Getting Started</a> page for some ways you can start using your new SUCS account!</p>
+<p>Signup is complete, please see below for your password, a copy has also been send to {$email}, we request you change this immediatley. See our <a href="{$baseurl}/Getting%20Started">Getting Started</a> page for some ways you can start using your new SUCS account!</p>
 <p>
 Username: <strong>{$username}</strong><br />
 Password: <strong>{$password}</strong><br />
diff --git a/templates/users.tpl b/templates/users.tpl
index 3403ff0..ff5aceb 100644
--- a/templates/users.tpl
+++ b/templates/users.tpl
@@ -10,7 +10,7 @@
 </tr>
 {foreach name=users from=$users item=user}
 <tr>
-	<td><a href="/Community/Members/{$user.username|escape:'url'}">{$user.username}</a></td>
+	<td><a href="{$baseurl}/Community/Members/{$user.username|escape:'url'}">{$user.username}</a></td>
 	<td>{$user.idle}</td>
 </tr>
 {/foreach}
-- 
GitLab