diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/directory.php | 9 | ||||
-rw-r--r-- | mod/parse_url.php | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/mod/directory.php b/mod/directory.php index 49aac657c..062aae516 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -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); diff --git a/mod/parse_url.php b/mod/parse_url.php index 1561eb8a3..b3b42b6cb 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -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(); |