Browse Source

more plugin hooks

pull/1/head
Friendika 11 years ago
parent
commit
f6556e0a72
3 changed files with 22 additions and 2 deletions
  1. +3
    -1
      include/items.php
  2. +8
    -1
      mod/directory.php
  3. +11
    -0
      mod/parse_url.php

+ 3
- 1
include/items.php View 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;
}


+ 8
- 1
mod/directory.php View 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);


+ 11
- 0
mod/parse_url.php View 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();


Loading…
Cancel
Save