aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/Translations.md6
-rw-r--r--include/conversation.php39
-rw-r--r--mod/channel.php1
3 files changed, 28 insertions, 18 deletions
diff --git a/doc/Translations.md b/doc/Translations.md
index 1ebdfb67d..724286052 100644
--- a/doc/Translations.md
+++ b/doc/Translations.md
@@ -32,13 +32,13 @@ The location of the translated files in the source tree is
/view/LNG-CODE/
where LNG-CODE is the language code used, e.g. de for German or fr for French.
For the email templates (the *.tpl files) just place them into the directory
-and you are done. The translated strings come as a "message.po" file from
+and you are done. The translated strings come as a "messages.po" file from
transifex which needs to be translated into the PHP file Red uses. To do
so, place the file in the directory mentioned above and use the "po2php"
utility from the util directory of your Red installation.
Assuming you want to convert the German localization which is placed in
-view/de/message.po you would do the following.
+view/de/messages.po you would do the following.
1. Navigate at the command prompt to the base directory of your
Red installation
@@ -46,7 +46,7 @@ view/de/message.po you would do the following.
2. Execute the po2php script, which will place the translation
in the strings.php file that is used by Red.
- $> php util/po2php.php view/de/message.po
+ $> php util/po2php.php view/de/messages.po
The output of the script will be placed at view/de/strings.php where
froemdoca os expecting it, so you can test your translation mmediately.
diff --git a/include/conversation.php b/include/conversation.php
index a9bf69a3e..708348ddd 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1431,7 +1431,8 @@ function network_tabs() {
function profile_tabs($a, $is_owner=False, $nickname=Null){
//echo "<pre>"; var_dump($a->user); killme();
-
+
+
$channel = $a->get_channel();
if (is_null($nickname))
@@ -1451,33 +1452,38 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
'title' => t('Status Messages and Posts'),
'id' => 'status-tab',
),
- array(
+ );
+
+ $p = get_all_perms($a->profile['profile_uid'],get_observer_hash());
+
+ if($p['view_profile']) {
+ $tabs[] = array(
'label' => t('About'),
'url' => $pr,
'sel' => ((argv(0) == 'profile') ? 'active' : ''),
'title' => t('Profile Details'),
'id' => 'profile-tab',
- ),
- array(
+ );
+ }
+ if($p['view_photos']) {
+ $tabs[] = array(
'label' => t('Photos'),
'url' => $a->get_baseurl() . '/photos/' . $nickname,
'sel' => ((argv(0) == 'photos') ? 'active' : ''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
- ),
-
- array(
+ );
+ }
+ if($p['view_storage']) {
+ $tabs[] = array(
'label' => t('Files'),
'url' => $a->get_baseurl() . '/cloud/' . $nickname,
'sel' => ((argv(0) == 'cloud') ? 'active' : ''),
'title' => t('Files and Storage'),
'id' => 'files-tab',
- ),
-
- );
-
-
- if ($is_owner){
+ );
+ }
+ if($is_owner) {
$tabs[] = array(
'label' => t('Events'),
'url' => $a->get_baseurl() . '/events',
@@ -1485,15 +1491,18 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
'title' => t('Events and Calendar'),
'id' => 'events-tab',
);
- if(feature_enabled(local_user(),'webpages')){
+ }
+
+ if($is_owner && feature_enabled($a->profile['profile_uid'],'webpages')) {
$tabs[] = array(
'label' => t('Webpages'),
'url' => $a->get_baseurl() . '/webpages/' . $nickname,
'sel' => ((argv(0) == 'webpages') ? 'active' : ''),
'title' => t('Manage Webpages'),
'id' => 'webpages-tab',
- );}
+ );
}
+
else {
// FIXME
// we probably need a listing of events that were created by
diff --git a/mod/channel.php b/mod/channel.php
index 34a1e2dda..7e2b6d7c5 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -28,6 +28,7 @@ function channel_init(&$a) {
$profile = 0;
$channel = $a->get_channel();
+logger('channel: ' . $channel['channel_name']);
if((local_user()) && (argc() > 2) && (argv(2) === 'view')) {
$which = $channel['channel_address'];