]> git.mxchange.org Git - friendica-addons.git/blob - widgets/widget_friends.php
addon repository relocated
[friendica-addons.git] / widgets / widget_friends.php
1 <?php
2
3 function friends_widget_name() {
4         return "Shows profile contacts";
5 }
6 function friends_widget_help() {
7         return "";
8 }
9
10 function friends_widget_args(){
11         return Array();
12 }
13
14 function friends_widget_content(&$a, $conf){
15
16         $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile` 
17                         LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
18                         WHERE `user`.`uid` = %s AND `profile`.`is-default` = 1 LIMIT 1",
19                         intval($conf['uid'])
20         );
21         if(!count($r)) return;
22         $a->profile = $r[0];
23
24         $o = "";
25         $o .= "<style>
26                 .f9k_widget .contact-block-div { display: block !important; float: left!important; width: 50px!important; height: 50px!important; margin: 2px!important;}
27                 .f9k_widget #contact-block-end { clear: left; }
28         </style>";
29         $o .= _abs_url(contact_block());
30         $o .= "<a href='".$a->get_baseurl().'/profile/'.$a->profile['nickname']."'>". t('Connect on Friendika!') ."</a>";
31         return $o;
32 }