]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
prevent duplicate @ tags
[friendica.git] / mod / message.php
index 1bee45d48c92092987e8e23b0cbbda6c610a9849..39aa0479ff17f99b8fa07f0aa9cfbb731be2769b 100644 (file)
@@ -46,12 +46,31 @@ function message_content(&$a) {
        $myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
 
 
+       $tabs = array(
+               array(
+                       'label' => t('Inbox'),
+                       'url'=> $a->get_baseurl() . '/message',
+                       'sel'=> (($a->argc == 1) ? 'active' : ''),
+               ),
+               array(
+                       'label' => t('Outbox'),
+                       'url' => $a->get_baseurl() . '/message/sent',
+                       'sel'=> (($a->argv[1] == 'sent') ? 'active' : ''),
+               ),
+               array(
+                       'label' => t('New Message'),
+                       'url' => $a->get_baseurl() . '/message/new',
+                       'sel'=> (($a->argv[1] == 'new') ? 'active' : ''),
+               ),
+       );
+       $tpl = get_markup_template('common_tabs.tpl');
+       $tab_content = replace_macros($tpl, array('$tabs'=>$tabs));
+
+
        $tpl = get_markup_template('mail_head.tpl');
        $header = replace_macros($tpl, array(
                '$messages' => t('Messages'),
-               '$inbox' => t('Inbox'),
-               '$outbox' => t('Outbox'),
-               '$new' => t('New Message')
+               '$tab_content' => $tab_content
        ));
 
 
@@ -90,6 +109,8 @@ function message_content(&$a) {
 
        if(($a->argc > 1) && ($a->argv[1] === 'new')) {
                
+               $o .= $header;
+               
                $tpl = get_markup_template('msg-header.tpl');
 
                $a->page['htmlhead'] .= replace_macros($tpl, array(
@@ -114,7 +135,6 @@ function message_content(&$a) {
                        '$upload' => t('Upload photo'),
                        '$insert' => t('Insert web link'),
                        '$wait' => t('Please wait')
-
                ));
 
                return $o;
@@ -248,7 +268,6 @@ function message_content(&$a) {
                        '$upload' => t('Upload photo'),
                        '$insert' => t('Insert web link'),
                        '$wait' => t('Please wait')
-
                ));
 
                return $o;