* Maintainer: Mike Macgirvin * */ function bookmarker_install() { register_hook('prepare_body', 'addon/bookmarker/bookmarker.php', 'bookmarker_prepare_body', 10); } function bookmarker_uninstall() { unregister_hook('prepare_body', 'addon/bookmarker/bookmarker.php', 'bookmarker_prepare_body'); } function bookmarker_prepare_body(&$a,&$b) { if(get_pconfig(local_channel(),'bookmarker','disable')) return; if(! strpos($b['html'],'bookmark-identifier')) return; if(function_exists('redbasic_init') || App::$theme_info['extends'] == 'redbasic') $bookmarkicon = ''; else $bookmarkicon = '#^'; $id = $b['item']['id']; if(local_channel()) $link = ''. $bookmarkicon . ' '; else $link = $bookmarkicon . ' '; $b['html'] = str_replace('#^',$link,$b['html']); }