diff options
author | Friendika <info@friendika.com> | 2011-01-18 20:05:44 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-01-18 20:05:44 -0800 |
commit | b093bdeace4908cc43ba40ac8c145b6c9a6eb730 (patch) | |
tree | ccf7568603872ee7d197ab017236b2bbb1321845 | |
parent | 3da2b249516b415392a11ec62a4bb598080941d1 (diff) | |
download | volse-hubzilla-b093bdeace4908cc43ba40ac8c145b6c9a6eb730.tar.gz volse-hubzilla-b093bdeace4908cc43ba40ac8c145b6c9a6eb730.tar.bz2 volse-hubzilla-b093bdeace4908cc43ba40ac8c145b6c9a6eb730.zip |
new profile_sidebar_enter hook, changed profile_sidebar to array
-rw-r--r-- | addon/README | 8 | ||||
-rw-r--r-- | boot.php | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/addon/README b/addon/README index 89f39e399..33b84e10d 100644 --- a/addon/README +++ b/addon/README @@ -100,9 +100,13 @@ Current hooks: 'contact' => contact (array) record for the person from the database 'entry' => the (string) HTML of the generated entry +'profile_sidebar_enter' - called prior to generating the sidebar "short" profile for a page + $b is (array) the person's profile array + 'profile_sidebar' - called when generating the sidebar "short" profile for a page - $b is the (string) generated HTML of the entry - (The profile array details are in $a->profile) + $b is an array + 'profile' => profile (array) record for the person from the database + 'entry' => the (string) HTML of the generated entry 'contact_block_end' - called when formatting the block of contacts/friends on a profile sidebar has completed @@ -2009,6 +2009,8 @@ function profile_sidebar($profile) { if((! is_array($profile)) && (! count($profile))) return $o; + call_hooks('profile_sidebar_enter', $profile); + $fullname = '<div class="fn">' . $profile['name'] . '</div>'; $pdesc = '<div class="title">' . $profile['pdesc'] . '</div>'; @@ -2062,7 +2064,10 @@ function profile_sidebar($profile) { '$homepage' => $homepage )); - call_hooks('profile_sidebar', $o); + + $arr = array('profile' => $profile, 'entry' => $o); + + call_hooks('profile_sidebar', $arr); return $o; }} |