3 require_once('bbcode.php');
5 function share_init(&$a) {
7 $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
8 if((! $post_id) || (! local_user()))
11 $r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
14 if(! count($r) || $r[0]['private'])
19 if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) {
20 $o .= '♲ [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]';
22 $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n";
23 $o .= $r[0]['body'] . "\n";
26 $o .= '♲ <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
28 $o .= '<strong>' . $r[0]['title'] . '</strong><br />';
29 $o .= bbcode($r[0]['body'], true) . '<br />';