diff --git a/contrib/smarty/plugins/function.filePath.php b/contrib/smarty/plugins/function.filePath.php
new file mode 100644
index 0000000000000000000000000000000000000000..26c847b3df07713b15126a30b4fdf834a4e9975b
--- /dev/null
+++ b/contrib/smarty/plugins/function.filePath.php
@@ -0,0 +1,30 @@
+<?php
+
+function smarty_function_filePath($params, &$smarty)
+{
+  $config = session::global_get('config');
+
+  /* Set theme */
+  if (isset ($config)) {
+    $theme = $config->get_cfg_value("theme", "default");
+  } else {
+    $theme = "default";
+  }
+
+  $filename = $params['file'];
+
+  if (file_exists("themes/$theme/$filename")) {
+    return "themes/$theme/$filename";
+  }
+  if (file_exists($smarty->template_dir."/themes/$theme/$filename")) {
+    return $smarty->template_dir."/themes/$theme/$filename";
+  }
+  if (file_exists("themes/default/$filename")) {
+    return "themes/default/$filename";
+  }
+  if (file_exists($smarty->template_dir."/themes/default/$filename")) {
+    return $smarty->template_dir."/themes/default/$filename";
+  }
+  return $filename;
+}
+?>
diff --git a/html/themes/default/images/go_logo.png b/html/themes/default/images/fd_logo.png
similarity index 100%
rename from html/themes/default/images/go_logo.png
rename to html/themes/default/images/fd_logo.png
diff --git a/html/themes/default/images/gohome.png b/html/themes/default/images/home.png
similarity index 100%
rename from html/themes/default/images/gohome.png
rename to html/themes/default/images/home.png
diff --git a/html/themes/default/images/stop.png b/html/themes/default/images/sign_out.png
similarity index 100%
rename from html/themes/default/images/stop.png
rename to html/themes/default/images/sign_out.png
diff --git a/ihtml/themes/default/framework.tpl b/ihtml/themes/default/framework.tpl
index d7842b88856ce8f59304daa93d73e7e503a20e8d..b4ac31faf788da1b649a499140380db6a27a0288 100644
--- a/ihtml/themes/default/framework.tpl
+++ b/ihtml/themes/default/framework.tpl
@@ -4,13 +4,13 @@
 {$php_errors}
 <form action='main.php{$plug}' name='mainform' id='mainform' method='post' enctype='multipart/form-data'>
 <div class='setup_header'>
-  <div style="float:left;"><img src='themes/default/images/go_logo.png' class='center' alt='FusionDirectory' style="padding-left:2px; padding-right:25px;">
+  <div style="float:left;"><img src='{filePath file="images/fd_logo.png"}' class='center' alt='FusionDirectory' style="padding-left:2px; padding-right:25px;">
     <a class="maintitlebar" href='main.php?reset=1'>
-      <img src='{$go_home}' class='center' border="0" alt="Main"/>&nbsp;{t}Main{/t}
+      <img src='{filePath file="images/home.png"}' class='center' border="0" alt="Main"/>&nbsp;{t}Main{/t}
     </a>
     &nbsp;
     <a class="maintitlebar" href='logout.php?request' style="margin-left:35px;">
-      <img src='{$go_out}' class='center' border="0" alt="Sign out"/>&nbsp;{t}Sign out{/t}
+      <img src='{filePath file="images/sign_out.png"}' class='center' border="0" alt="Sign out"/>&nbsp;{t}Sign out{/t}
     </a>
     <a class="plugtop" style="margin-left:35px;">
       <img src="{$headline_image}" class="center" align="middle" alt="{t}{$headline}{/t}"/>&nbsp;
diff --git a/ihtml/themes/default/headers.tpl b/ihtml/themes/default/headers.tpl
index 24371f42c0da5791ca85cfb8be9edde04fb8bb33..6419fb98fbda0ac7e321750734067d1141712773 100644
--- a/ihtml/themes/default/headers.tpl
+++ b/ihtml/themes/default/headers.tpl
@@ -16,8 +16,8 @@
   <meta http-equiv="Cache-Control" content="post-check=0, pre-check=0">
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
-  <style type="text/css">@import url('themes/default/style.css');</style>
-  <link rel="stylesheet" type="text/css" href="themes/default/printer.css" media="print">
+  <style type="text/css">@import url('{filePath file="style.css"}');</style>
+  <link rel="stylesheet" type="text/css" href="{filePath file="printer.css"}" media="print">
 
   <link rel="shortcut icon" href="favicon.ico">
 
diff --git a/include/functions.inc b/include/functions.inc
index dad444c7f1f362e61e7c006a9451f5be3c32eaf5..16a226102155601f14359bb1fdfe6170c6b5a4c6 100644
--- a/include/functions.inc
+++ b/include/functions.inc
@@ -338,9 +338,9 @@ function get_template_path($filename= '', $plugin= FALSE, $path= "")
 
   /* Set theme */
   if (isset ($config)) {
-  $theme= $config->get_cfg_value("theme", "default");
+    $theme = $config->get_cfg_value("theme", "default");
   } else {
-    $theme= "default";
+    $theme = "default";
   }
 
   /* Return path for empty filename */