]> git.mxchange.org Git - friendica.git/commitdiff
more hooks
authorFriendika <info@friendika.com>
Sun, 26 Dec 2010 01:46:25 +0000 (17:46 -0800)
committerFriendika <info@friendika.com>
Sun, 26 Dec 2010 01:46:25 +0000 (17:46 -0800)
mod/display.php
mod/network.php
mod/profile.php

index 990d0b431b06acdda54c0e390840f77989ab5250..fd845e608ef6188148d0cd3fabcb59a5da0276c6 100644 (file)
@@ -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 {
index 43c55b8e3f4dee124e16a27e94aec165be6fa430..ad6db2d1e1bec74481376b7dea2b1a539ab2395a 100644 (file)
@@ -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'];
+
                }
        }
 
index ffc41280565405d60d769dcff5043449ab2c368f..cc0debd992324ec59bc55cbb7b4c24c1e6c9ee1e 100644 (file)
@@ -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'];
                        
                }
        }