]> git.mxchange.org Git - friendica.git/blob - mod/share.php
add remove_user hook (it looks like dreamhost changed all my file permissions, this...
[friendica.git] / mod / share.php
1 <?php
2
3 require_once('bbcode.php');
4
5 function share_init(&$a) {
6
7         $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
8         if((! $post_id) || (! local_user()))
9                 killme();
10
11         $r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
12                 intval($post_id)
13         );
14         if(! count($r) || $r[0]['private'])
15                 killme();
16
17         $o = '';
18
19         $o .= '&#x2672; <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
20         if($r[0]['title'])
21                 $o .= '<strong>' . $r[0]['title'] . '</strong><br />';
22         $o .= bbcode($r[0]['body'], true);
23         echo $o . '<br />';
24         killme();  
25 }