aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-22 18:00:19 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-22 18:00:19 -0700
commitd5a13b1e4c0f35445aa539ff6b3779062907a9cb (patch)
tree1cc8fd26bb33981c2ab676a20aadec9d93b865ce /mod/profile.php
parent124129e2a06a6ae82c283c8c10b7c3c7d0a0fdae (diff)
downloadvolse-hubzilla-d5a13b1e4c0f35445aa539ff6b3779062907a9cb.tar.gz
volse-hubzilla-d5a13b1e4c0f35445aa539ff6b3779062907a9cb.tar.bz2
volse-hubzilla-d5a13b1e4c0f35445aa539ff6b3779062907a9cb.zip
localisation path for all view templates
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/mod/profile.php b/mod/profile.php
index dab4ee6f2..ac9371ea0 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -124,7 +124,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,
@@ -133,17 +133,21 @@ function profile_content(&$a, $update = 0) {
if($tab == 'profile') {
- require_once('view/profile_advanced.php');
+ $lang = config_get('system','language');
+ if($lang && file_exists("view/$lang/profile_advanced.php"))
+ require_once("view/$lang/profile_advanced.php");
+ else
+ require_once('view/profile_advanced.php');
return $o;
}
if(can_write_wall($a,$a->profile['profile_uid'])) {
- $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()));
require_once('view/acl_selectors.php');
- $tpl = file_get_contents("view/jot.tpl");
+ $tpl = load_view_file("view/jot.tpl");
if(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';
else
@@ -246,14 +250,14 @@ function profile_content(&$a, $update = 0) {
);
- $cmnt_tpl = file_get_contents('view/comment_item.tpl');
+ $cmnt_tpl = load_view_file('view/comment_item.tpl');
- $like_tpl = file_get_contents('view/like.tpl');
+ $like_tpl = load_view_file('view/like.tpl');
- $tpl = file_get_contents('view/wall_item.tpl');
+ $tpl = load_view_file('view/wall_item.tpl');
- $droptpl = file_get_contents('view/wall_item_drop.tpl');
- $fakedrop = file_get_contents('view/wall_fake_drop.tpl');
+ $droptpl = load_view_file('view/wall_item_drop.tpl');
+ $fakedrop = load_view_file('view/wall_fake_drop.tpl');
if($update)
$return_url = $_SESSION['return_url'];