]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'friendika-master/master' into iconpopup
authorFabio Comuni <fabrix.xm@gmail.com>
Mon, 4 Apr 2011 07:31:12 +0000 (09:31 +0200)
committerFabio Comuni <fabrix.xm@gmail.com>
Mon, 4 Apr 2011 07:31:12 +0000 (09:31 +0200)
1  2 
boot.php
mod/message.php
mod/network.php
view/theme/duepuntozero/style.css
view/theme/loozah/style.css

diff --combined boot.php
index 7503d69e9847dc650b3a2d64fa1b6bbe35ef4f8b,94699a2730a7d9699c28c80fa84f70e4f5df0ed4..334f0a742feb5a525254a5bc4eecad5554401a9e
+++ b/boot.php
@@@ -2,9 -2,9 +2,9 @@@
  
  set_time_limit(0);
  
- define ( 'FRIENDIKA_VERSION',      '2.1.933' );
- define ( 'DFRN_PROTOCOL_VERSION',  '2.1'  );
- define ( 'DB_UPDATE_VERSION',      1045   );
+ define ( 'FRIENDIKA_VERSION',      '2.1.938' );
+ define ( 'DFRN_PROTOCOL_VERSION',  '2.2'  );
+ define ( 'DB_UPDATE_VERSION',      1046   );
  
  define ( 'EOL',                    "<br />\r\n"     );
  define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@@ -2022,7 -2022,7 +2022,7 @@@ function contact_block() 
                        intval($shown)
        );
        if(count($r)) {
-               $o .= '<h4 class="contact-h4">' .  sprintf(tt('%d Contact','%d Contacts', $total),$total) . '</h4><div id="contact-block">';
+               $o .= '<h4 class="contact-h4">' .  sprintf( tt('%d Contact','%d Contacts', $total),$total) . '</h4><div id="contact-block">';
                foreach($r as $rr) {
                        $redirect_url = $a->get_baseurl() . '/redir/' . $rr['id'];
                        if(local_user() && ($rr['uid'] == local_user())
@@@ -2405,9 -2405,7 +2405,7 @@@ function get_birthdays() 
        if(! local_user())
                return $o;
  
-       $bd_format = get_config('system','birthday_format');
-       if(! $bd_format)
-               $bd_format = 'g A l F d' ; // 8 AM Friday January 18
+       $bd_format = t('g A l F d') ; // 8 AM Friday January 18
  
        $r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event` 
                LEFT JOIN `contact` ON `contact`.`id` = `event`.`cid` 
@@@ -2670,54 -2668,22 +2668,73 @@@ function extract_item_authors($arr,$uid
        return array();         
  }}
  
 +if(! function_exists('item_photo_menu')){
 +function item_photo_menu($item){
 +      $a = get_app();
 +      
 +      if (!isset($a->authors)){
 +              $rr = q("SELECT id, network, url FROM contact WHERE uid=%d AND self!=1", intval(local_user()));
 +              $authors = array();
 +              foreach($rr as $r) $authors[$r['url']]= $r;
 +              $a->authors = $authors;
 +      }
 +      
 +      $contact_url="";
 +      $pm_url="";
 +
 +      $profile_link   = ((strlen($item['author-link']))   ? $item['author-link'] : $item['url']);
 +      $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
 +
 +      if(strlen($item['author-link'])) {
 +              if(link_compare($item['author-link'],$item['url']) && ($item['network'] === 'dfrn') && (! $item['self'])) {
 +                      $profile_link = $redirect_url;
 +                      $pm_url = $a->get_baseurl() . '/message/new/' . $item['cid'] ;
 +                      $contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $item['cid'] ;
 +              } 
 +              elseif(isset($a->authors[$item['author-link']])) {
 +                      $profile_link = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
 +                      if ($a->authors[$item['author-link']]['network']==='dfrn'){
 +                              $pm_url = $a->get_baseurl() . '/message/new/' . $a->authors[$item['author-link']]['id'];
 +                      }
 +                      $contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $a->authors[$item['author-link']]['id'] ;
 +                                              
 +              }
 +      }
 +
 +
 +      $menu = Array(
 +              t("View profile") => $profile_link,
 +              t("Edit contact") => $contact_url,
 +              t("Send PM") => $pm_url
 +      );
 +      
 +      $args = array($item, &$menu);
 +      
 +      call_hooks('item_photo_menu', $args);
 +      
 +      $o = "";
 +      foreach($menu as $k=>$v){
 +              if ($v!="") $o .= "<li><a href='$v'>$k</a></li>\n";
 +      }
 +      return $o;
 +}}
++
+ if(! function_exists('lang_selector')) {
+ function lang_selector() {
+       global $lang;
+       $o .= '<div id="language-selector" style="display: none;" >';
+       $o .= '<form action="" method="post" ><select name="system_language" onchange="this.form.submit();" >';
+       $langs = glob('view/*/strings.php');
+       if(is_array($langs) && count($langs)) {
+               if(! in_array('view/en/strings.php',$langs))
+                       $langs[] = 'view/en/';
+               foreach($langs as $l) {
+                       $ll = substr($l,5);
+                       $ll = substr($ll,0,strrpos($ll,'/'));
+                       $selected = (($ll === $lang) ? ' selected="selected" ' : '');
+                       $o .= '<option value="' . $ll . '"' . $selected . '>' . $ll . '</option>';
+               }
+       }
+       $o .= '</select></form></div>';
+       return $o;
+ }}
diff --combined mod/message.php
index da35e1896bf2df7ce0a2fb049c3e514e88cac216,7978ecaf2bc6864df50a91050bebc8bba7fd9ecd..7f17a362b3cb518770fd5a2ac3994bc11d8825a0
@@@ -172,9 -172,7 +172,9 @@@ function message_content(&$a) 
                        '$linkurl' => t('Please enter a link URL:')
                ));
        
 -              $select = contact_select('messageto','message-to-select', false, 4, true);
 +              $preselect = (isset($a->argv[2])?array($a->argv[2]):false);
 +      
 +              $select = contact_select('messageto','message-to-select', $preselect, 4, true);
                $tpl = load_view_file('view/prv_message.tpl');
                $o .= replace_macros($tpl,array(
                        '$header' => t('Send Private Message'),
                                '$delete' => t('Delete conversation'),
                                '$body' => $rr['body'],
                                '$to_name' => $rr['name'],
-                               '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'],'D, d M Y - g:i A')
+                               '$date' => datetime_convert('UTC',date_default_timezone_get(),$rr['mailcreated'], t('D, d M Y - g:i A'))
                        ));
                }
                $o .= paginate($a);     
diff --combined mod/network.php
index 13ce81abc8eed22a6adfc5ca89818f0d00a47bab,a304c211fe91eb47528c1e23b321066b4e85d636..42c6c0c29e56e4ef971e8d5839c093d236a862ef
@@@ -54,6 -54,14 +54,14 @@@ function network_content(&$a, $update 
        }
  
        if(! $update) {
+               if(group) {
+                       if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
+                               $plural_form = sprintf( tt('%d member', '%d members', $t), $t);
+                               notice( sprintf( t('Warning: This group contains %s from an insecure network.'), $plural_form ) . EOL);
+                               notice( t('Private messages to this group are at risk of public disclosure.') . EOL);
+                       }
+               }
                $o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>';
  
                $_SESSION['return_url'] = $a->cmd;
                        intval($a->pager['start']),
                        intval($a->pager['itemspage'])
                );
 +              
        }
        else {
  
  
                                $drop = replace_macros($droptpl,array('$id' => $item['id']));
                                $lock = '<div class="wall-item-lock"></div>';
 -
 +                              
                                $o .= replace_macros($tpl,array(
                                        '$id' => $item['item_id'],
                                        '$linktitle' => t('View $name\'s profile'),
                                        '$profile_url' => $profile_link,
 +                                      '$item_photo_menu' => item_photo_menu($item),
                                        '$name' => $profile_name,
                                        '$sparkle' => $sparkle,
                                        '$lock' => $lock,
                                $indent .= ' shiny'; 
  
  
 +
                        // Build the HTML
  
                        $tmp_item = replace_macros($template,array(
                                '$wall' => t('Wall-to-Wall'),
                                '$vwall' => t('via Wall-To-Wall:'),
                                '$profile_url' => $profile_link,
 +                              '$item_photo_menu' => item_photo_menu($item),
                                '$name' => $profile_name,
                                '$thumb' => $profile_avatar,
                                '$osparkle' => $osparkle,
        }
  
        return $o;
 -}
 +}
index c29c8795f5bce8f9a4fd1cd14ac156804b990b46,0d59b65900745e51ffa0a5bd5281cdaf024c7c0f..bfa004a6599f965643656471cc3492a518bfa618
@@@ -866,37 -866,6 +866,37 @@@ input#dfrn-url 
        margin-bottom: 10px;
        width: 100px;
  }
 +.wall-item-photo-menu-button {
 +      display: block;
 +      position: absolute;
 +      background-image: url("photo-menu.jpg");
 +      background-position: top left; 
 +      background-repeat: no-repeat;
 +      margin: 0px; padding: 0px;
 +      width: 16px;
 +      height: 16px;
 +      top: 74px; left:10px;
 +      overflow: hidden;
 +      text-indent: 40px;
 +      display: none;
 +      
 +}
 +.wall-item-photo-menu {
 +      width: auto;
 +      border: 2px solid #444444;
 +      background: #FFFFFF;
 +      position: absolute;
 +      left: 10px; top: 90px;
 +      display: none;
 +      z-index: 10000;
 +}
 +.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none }
 +.wall-item-photo-menu li a { display: block; padding: 2px; }
 +.wall-item-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; }
 +
 +
 +.comment .wall-item-photo-menu-button {       top: 44px;}
 +.comment .wall-item-photo-menu { top: 60px; }
  
  .wallwall .wwto {
      left: 50px;
        width: 30px;
        height: 30px;
  }
 +
  .wallwall .wall-item-photo-end {
        clear: both;
  }
@@@ -2215,3 -2183,9 +2215,9 @@@ a.mail-list-link 
  .side-link {
        margin-bottom: 15px;
  }
+ #language-selector {
+       position: absolute;
+       top: 0;
+       left: 0;
+ )
index 66cc5835619b343b81d93715bf19fd72056dcca6,5662207115f24bab93953e9bb1e29049e153515c..d6ddb26dd0fe4fffc01f29a1ea5299a647c91b9e
@@@ -959,7 -959,6 +959,7 @@@ input#dfrn-url 
  .wall-item-content-wrapper {
        margin-top: 10px;
        border: 1px solid #CCC;
 +      position: relative;
  }
  
  .wall-item-content-wrapper.comment {
        width: 100px;
        float: left;
  }
 +
 +.wall-item-photo-menu-button {
 +      display: block;
 +      position: absolute;
 +      background-image: url("photo-menu.jpg");
 +      background-position: top left; 
 +      background-repeat: no-repeat;
 +      margin: 0px; padding: 0px;
 +      width: 16px;
 +      height: 16px;
 +      top: 74px; left:10px;
 +      overflow: hidden;
 +      text-indent: 40px;
 +      display: none;
 +}
 +.wall-item-photo-menu {
 +      width: auto;
 +      border: 2px solid #444444;
 +      background: #FFFFFF;
 +      position: absolute;
 +      left: 10px; top: 90px;
 +      display: none;
 +      z-index: 10000;
 +}
 +.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none }
 +.wall-item-photo-menu li a { display: block; padding: 2px; }
 +.wall-item-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; }
 +
 +
  .wall-item-arrowphoto-wrapper {
        margin-top: 40px;
        margin-right: 20px;
@@@ -2235,3 -2205,9 +2235,9 @@@ a.mail-list-link 
  .side-link {
        margin-bottom: 15px;
  }
+ #language-selector {
+       position: absolute;
+       top: 0;
+       left: 0;
+ )