diff --git a/include/conversation.php b/include/conversation.php
index d3744e21f5..7af7c1efd0 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -107,8 +107,8 @@ function conversation(&$a, $items, $mode, $update) {
$cmnt_tpl = file_get_contents('view/comment_item.tpl');
$like_tpl = file_get_contents('view/like.tpl');
$noshare_tpl = file_get_contents('view/like_noshare.tpl');
- $tpl = file_get_contents('view/wall_item.tpl');
- $wallwall = file_get_contents('view/wallwall_item.tpl');
+ $tpl = load_view_file('view/wall_item.tpl');
+ $wallwall = load_view_file('view/wallwall_item.tpl');
$alike = array();
$dlike = array();
@@ -120,7 +120,7 @@ function conversation(&$a, $items, $mode, $update) {
// "New Item View" on network page or search page results
// - just loop through the items and format them minimally for display
- $tpl = file_get_contents('view/search_item.tpl');
+ $tpl = load_view_file('view/search_item.tpl');
$droptpl = file_get_contents('view/wall_fake_drop.tpl');
foreach($items as $item) {
@@ -664,7 +664,7 @@ function status_editor($a,$x) {
$geotag = (($x['allow_location']) ? file_get_contents('view/jot_geotag.tpl') : '');
- $tpl = file_get_contents('view/jot-header.tpl');
+ $tpl = load_view_file('view/jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
@@ -680,7 +680,7 @@ function status_editor($a,$x) {
));
- $tpl = file_get_contents("view/jot.tpl");
+ $tpl = load_view_file("view/jot.tpl");
$jotplugins = '';
$jotnets = '';
diff --git a/include/nav.php b/include/nav.php
index 602385c32c..2ead5c07e9 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -125,7 +125,7 @@ function nav(&$a) {
$banner .= 'Friendika';
- $tpl = file_get_contents('view/nav.tpl');
+ $tpl = load_view_file('view/nav.tpl');
$a->page['nav'] .= replace_macros($tpl, array(
'$langselector' => lang_selector(),
diff --git a/mod/editpost.php b/mod/editpost.php
index 523f64fd27..fd84fc26d5 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -31,7 +31,7 @@ function editpost_content(&$a) {
$o .= '
' . t('Edit post') . '
';
- $tpl = file_get_contents('view/jot-header.tpl');
+ $tpl = load_view_file('view/jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
@@ -41,7 +41,7 @@ function editpost_content(&$a) {
));
- $tpl = file_get_contents("view/jot.tpl");
+ $tpl = load_view_file("view/jot.tpl");
if(($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))))
$lockstate = 'lock';
diff --git a/mod/message.php b/mod/message.php
index 0f56502566..3a59359ce2 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -120,7 +120,7 @@ function message_content(&$a) {
$myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
- $tpl = file_get_contents('view/mail_head.tpl');
+ $tpl = load_view_file('view/mail_head.tpl');
$header = replace_macros($tpl, array(
'$messages' => t('Messages'),
'$inbox' => t('Inbox'),
diff --git a/mod/photos.php b/mod/photos.php
index b10399215a..70bb5ff3de 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1247,7 +1247,7 @@ function photos_content(&$a) {
$paginate = paginate($a);
}
- $photo_tpl = file_get_contents('view/photo_view.tpl');
+ $photo_tpl = load_view_file('view/photo_view.tpl');
$o .= replace_macros($photo_tpl, array(
'$id' => $ph[0]['id'],
'$album' => array($album_link,$ph[0]['album']),
diff --git a/mod/profile.php b/mod/profile.php
index 0691c64b33..2af6f2429b 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -104,7 +104,7 @@ function profile_content(&$a, $update = 0) {
if(x($_GET,'tab'))
$tab = notags(trim($_GET['tab']));
- $tpl = file_get_contents('view/profile_tabs.tpl');
+ $tpl = load_view_file('view/profile_tabs.tpl');
$o .= replace_macros($tpl,array(
'$url' => $a->get_baseurl() . '/' . $a->cmd,
diff --git a/mod/settings.php b/mod/settings.php
index 22dc794dc0..99fe852eeb 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -406,7 +406,7 @@ function settings_content(&$a) {
'$basepath' => $a->get_hostname()
));
- $stpl = file_get_contents('view/settings.tpl');
+ $stpl = load_view_file('view/settings.tpl');
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);