]> git.mxchange.org Git - friendica.git/commitdiff
more plugin hooks
authorFriendika <info@friendika.com>
Sat, 25 Dec 2010 23:01:02 +0000 (15:01 -0800)
committerFriendika <info@friendika.com>
Sat, 25 Dec 2010 23:01:02 +0000 (15:01 -0800)
include/items.php
mod/directory.php
mod/parse_url.php

index c00ec93ae3ecb893c8b903ae0d2acea947201532..22d47d44fe6cdb667f01cd341c080b8186c1cc66 100644 (file)
@@ -499,7 +499,9 @@ function get_atom_elements($feed,$item) {
                $res['target'] .= '</target>' . "\n";
        }
 
-//     call_hooks('parse_atom', array('feed' => $feed, 'item' => $item, 'result' => $res)); 
+       $arr = array('feed' => $feed, 'item' => $item, 'result' => $res);
+
+       call_hooks('parse_atom', $arr);
 
        return $res;
 }
index 49aac657ce45e9f0cf50f2afea49ef7f876345d7..062aae516f91816c08e1776b4a1b5930e79ec647 100644 (file)
@@ -83,7 +83,7 @@ function directory_content(&$a) {
                        if(strlen($rr['gender']))
                                $details .= '<br />Gender: ' . $rr['gender'];
 
-                       $o .= replace_macros($tpl,array(
+                       $entry = replace_macros($tpl,array(
                                '$id' => $rr['id'],
                                '$profile-link' => $profile_link,
                                '$photo' => $rr[$photo],
@@ -94,7 +94,14 @@ function directory_content(&$a) {
 
                        ));
 
+                       $arr = array('contact' => $rr, 'entry' => $entry);
+
+                       call_hooks('directory_item', $arr);
+
+                       $o .= $entry;
+
                }
+
                $o .= "<div class=\"directory-end\" ></div>\r\n";
                $o .= paginate($a);
 
index 1561eb8a3ba143d1cf992845b092d7e14d20ea88..b3b42b6cb6f2ced24b4da9be57d3d16222116c9e 100644 (file)
@@ -11,6 +11,16 @@ function parse_url_content(&$a) {
 
        $template = "<a href=\"%s\" >%s</a>%s";
 
+
+       $arr = array('url' => $url, 'text' => '');
+
+       call_hooks('parse_link', $arr);
+
+       if(strlen($arr['text'])) {
+               echo $arr['text'];
+               killme();
+       }
+
        if($url) 
                $s = fetch_url($url);
        else {
@@ -18,6 +28,7 @@ function parse_url_content(&$a) {
                killme();
        }
 
+
        if(! $s) {
                echo sprintf($template,$url,$url,'');
                killme();