]> 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 --cc boot.php
index 7503d69e9847dc650b3a2d64fa1b6bbe35ef4f8b,94699a2730a7d9699c28c80fa84f70e4f5df0ed4..334f0a742feb5a525254a5bc4eecad5554401a9e
+++ b/boot.php
@@@ -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 --cc mod/message.php
Simple merge
diff --cc mod/network.php
Simple merge
Simple merge
Simple merge