diff options
author | Friendika <info@friendika.com> | 2010-12-25 17:46:25 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-12-25 17:46:25 -0800 |
commit | b211adfb1290913e11cc77bdd86b733b1f772519 (patch) | |
tree | 28e89dff96df1769aa3405e1552752a6df545268 /mod | |
parent | 38574789554b1e2737359b62b2350c7300d83888 (diff) | |
download | volse-hubzilla-b211adfb1290913e11cc77bdd86b733b1f772519.tar.gz volse-hubzilla-b211adfb1290913e11cc77bdd86b733b1f772519.tar.bz2 volse-hubzilla-b211adfb1290913e11cc77bdd86b733b1f772519.zip |
more hooks
Diffstat (limited to 'mod')
-rw-r--r-- | mod/display.php | 8 | ||||
-rw-r--r-- | mod/network.php | 8 | ||||
-rw-r--r-- | mod/profile.php | 7 |
3 files changed, 20 insertions, 3 deletions
diff --git a/mod/display.php b/mod/display.php index 990d0b431..fd845e608 100644 --- a/mod/display.php +++ b/mod/display.php @@ -241,7 +241,7 @@ function display_content(&$a) { $indent .= ' shiny'; - $o .= replace_macros($template,array( + $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], '$profile_url' => $profile_link, '$name' => $profile_name, @@ -264,6 +264,12 @@ function display_content(&$a) { '$comment' => $comment )); + $arr = array('item' => $item, 'output' => $tmp_item); + call_hooks('display_item', $arr); + + $o .= $arr['output']; + + } } else { diff --git a/mod/network.php b/mod/network.php index 43c55b8e3..ad6db2d1e 100644 --- a/mod/network.php +++ b/mod/network.php @@ -284,7 +284,7 @@ function network_content(&$a, $update = 0) { // Build the HTML - $o .= replace_macros($template,array( + $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], '$profile_url' => $profile_link, '$name' => $profile_name, @@ -306,6 +306,12 @@ function network_content(&$a, $update = 0) { '$dislike' => $dislike, '$comment' => $comment )); + + $arr = array('item' => $item, 'output' => $tmp_item); + call_hooks('display_item', $arr); + + $o .= $arr['output']; + } } diff --git a/mod/profile.php b/mod/profile.php index ffc412805..cc0debd99 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -342,7 +342,7 @@ function profile_content(&$a, $update = 0) { if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) $indent .= ' shiny'; - $o .= replace_macros($template,array( + $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], '$profile_url' => $profile_link, '$name' => $profile_name, @@ -360,6 +360,11 @@ function profile_content(&$a, $update = 0) { '$dislike' => $dislike, '$comment' => $comment )); + + $arr = array('item' => $item, 'output' => $tmp_item); + call_hooks('display_item', $arr); + + $o .= $arr['output']; } } |