diff --git a/addon/README b/addon/README index 2e4ed60290..fb1c6340a5 100644 --- a/addon/README +++ b/addon/README @@ -156,7 +156,8 @@ Current hooks: 'page_end' - called after HTML content functions have completed $b is (string) HTML of content div - +'jot_plugin' - add tools to jot toolbar + $b is (string) HTML for tool icon *** = subject to change diff --git a/mod/network.php b/mod/network.php index f9badda78b..083912f869 100644 --- a/mod/network.php +++ b/mod/network.php @@ -79,6 +79,9 @@ function network_content(&$a, $update = 0) { $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $jotplugins = ""; + call_hooks('jot_tool', $jotplugins); + $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, '$baseurl' => $a->get_baseurl(), @@ -87,7 +90,8 @@ function network_content(&$a, $update = 0) { '$lockstate' => $lockstate, '$acl' => populate_acl((($group) ? $group_acl : $a->user), $celeb), '$bang' => (($group) ? '!' : ''), - '$profile_uid' => $_SESSION['uid'] + '$profile_uid' => $_SESSION['uid'], + '$jotplugins' => $jotplugins )); diff --git a/mod/profile.php b/mod/profile.php index 505edf5ced..c84b493c50 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -134,6 +134,10 @@ function profile_content(&$a, $update = 0) { $lockstate = 'lock'; else $lockstate = 'unlock'; + + $jotplugins = ""; + call_hooks('jot_tool', $jotplugins); + $o .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(), '$defloc' => (($is_owner) ? $a->user['default-location'] : ''), @@ -142,7 +146,8 @@ function profile_content(&$a, $update = 0) { '$lockstate' => $lockstate, '$bang' => '', '$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''), - '$profile_uid' => $a->profile['profile_uid'] + '$profile_uid' => $a->profile['profile_uid'], + '$jotplugins' => $jotplugins )); } diff --git a/view/en/jot.tpl b/view/en/jot.tpl index 6590cace8f..de88fb84f7 100644 --- a/view/en/jot.tpl +++ b/view/en/jot.tpl @@ -15,6 +15,11 @@ +