Use short form array syntax everywhere
[friendica-addons.git] / widgets / widget_friendheader.php
1 <?php
2
3 function friendheader_widget_name() {
4         return "Shows friends as a bar";
5 }
6 function friendheader_widget_help() {
7         return "";
8 }
9
10 function friendheader_widget_args(){
11         return [];
12 }
13
14 function friendheader_widget_size(){
15         return ['780px','140px'];
16 }
17
18
19 function friendheader_widget_content(&$a, $conf){
20
21         $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile`
22                         LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
23                         WHERE `user`.`uid` = %s AND `profile`.`is-default` = 1 LIMIT 1",
24                         intval($conf['uid'])
25         );
26         if(!count($r)) return;
27         $a->profile = $r[0];
28
29         $o = "";
30         $o .= "<style>
31                 body {font-size: 0.8em; margin: 0px; padding: 0px;}
32                 #contact-block { overflow: hidden; height: auto; }
33                 .contact-block-h4 { float: left; margin: 0px; }
34                 .allcontact-link { float: right; margin: 0px; }
35                 .contact-block-content { clear:both; }
36                 .contact-block-div { display: block !important; float: left!important; width: 50px!important; height: 50px!important; margin: 2px!important;}
37
38         </style>";
39         $o .= _abs_url(contact_block());
40         $o .= "<a href='".$a->get_baseurl().'/profile/'.$a->profile['nickname']."' target=new>". t('Get added to this list!') ."</a>";
41
42         return $o;
43 }