]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #277 from mschmitt/master
authorfriendica <info@friendica.com>
Mon, 30 Apr 2012 08:29:50 +0000 (01:29 -0700)
committerfriendica <info@friendica.com>
Mon, 30 Apr 2012 08:29:50 +0000 (01:29 -0700)
Update Esperanto to 100%

mod/dfrn_confirm.php
view/head.tpl

index efb5be3a412acc134699a81ab5efe378ec131fb3..6f7b925ac82ab1b6c7312cbbae846b714c5260b1 100644 (file)
@@ -434,9 +434,14 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                else
                        $contact = null;
 
-               if(isset($new_relation) && $new_relation == CONTACT_IS_FRIEND) {
 
-                       if(($contact) && ($contact['network'] === NETWORK_DIASPORA)) {
+               $forum_type = false;
+               if($user['page-flags'] == PAGE_SOAPBOX || $user['page-flags'] == PAGE_COMMUNITY)
+                       $forum_type = true;
+
+               if((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND) || ($forum_type)) {
+
+                       if(($contact) && ($contact['network'] === NETWORK_DIASPORA) && (! $forum_type)) {
                                require_once('include/diaspora.php');
                                $ret = diaspora_share($user[0],$r[0]);
                                logger('mod_follow: diaspora_share returns: ' . $ret);
@@ -468,19 +473,37 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
                                        $arr['author-name'] = $arr['owner-name'] = $self[0]['name'];
                                        $arr['author-link'] = $arr['owner-link'] = $self[0]['url'];
                                        $arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb'];
-                                       $arr['verb'] = ACTIVITY_FRIEND;
-                                       $arr['object-type'] = ACTIVITY_OBJ_PERSON;
-                               
+
                                        $A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]';
+                                       $APhoto = '[url=' . $self[0]['url'] . ']' . '[img]' . $self[0]['thumb'] . '[/img][/url]';
+
                                        $B = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
                                        $BPhoto = '[url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]';
-                                       $arr['body'] =  sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto;
 
-                                       $arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>'
-                                               . '<id>' . $contact['url'] . '/' . $contact['name'] . '</id>';
-                                       $arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $contact['url'] . '" />' . "\n");
-                                       $arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $contact['thumb'] . '" />' . "\n");
-                                       $arr['object'] .= '</link></object>' . "\n";
+                                       if($forum_type) {
+                                               $arr['verb'] = ACTIVITY_JOIN;
+                                               $arr['object-type'] = ACTIVITY_OBJ_GROUP;
+                                               $arr['body'] =  sprintf( t('%1$s joined %2$s'), $B, $A)."\n\n\n".$APhoto;
+                                               $arr['object'] = '<object><type>' . ACTIVITY_OBJ_GROUP . '</type><title>' . $self[0]['name'] . '</title>'
+                                                       . '<id>' . $self[0]['url'] . '/' . $self[0]['name'] . '</id>';
+                                               $arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $self[0]['url'] . '" />' . "\n");
+                                               $arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $self[0]['thumb'] . '" />' . "\n");
+                                               $arr['object'] .= '</link></object>' . "\n";
+
+                                       }
+                                       else {
+                                               $arr['verb'] = ACTIVITY_FRIEND;
+                                           $arr['object-type'] = ACTIVITY_OBJ_PERSON;
+                                               $arr['body'] =  sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto;
+
+                                               $arr['object'] = '<object><type>' . ACTIVITY_OBJ_PERSON . '</type><title>' . $contact['name'] . '</title>'
+                                                       . '<id>' . $contact['url'] . '/' . $contact['name'] . '</id>';
+                                               $arr['object'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $contact['url'] . '" />' . "\n");
+                                               $arr['object'] .= xmlify('<link rel="photo" type="image/jpeg" href="' . $contact['thumb'] . '" />' . "\n");
+                                               $arr['object'] .= '</link></object>' . "\n";
+                                       }                               
+
+
                                        $arr['last-child'] = 1;
 
                                        $arr['allow_cid'] = $user[0]['allow_cid'];
index 7638e56ca693a42b6a1731ff3ecde4fd8de3b70e..7e8369bddd4bcab64fee9ae880f9dab8c2a391a9 100644 (file)
@@ -6,6 +6,7 @@
 <link rel="stylesheet" href="$baseurl/library/jgrowl/jquery.jgrowl.css" type="text/css" media="screen" />
 
 <link rel="stylesheet" type="text/css" href="$stylesheet" media="all" />
+<meta name="viewport" content="width=800, initial-scale=1, maximum-scale=3">
 
 <link rel="shortcut icon" href="$baseurl/images/friendica-32.png" />
 <link rel="search"