add $no_photos parameter to add_page_info_data()
This commit is contained in:
parent
26fd6b1c33
commit
5fe7a21482
2 changed files with 8 additions and 8 deletions
|
@ -24,7 +24,7 @@ require_once 'include/text.php';
|
||||||
require_once 'mod/share.php';
|
require_once 'mod/share.php';
|
||||||
require_once 'include/enotify.php';
|
require_once 'include/enotify.php';
|
||||||
|
|
||||||
function add_page_info_data($data) {
|
function add_page_info_data($data, $no_photos = false) {
|
||||||
Addon::callHooks('page_info_data', $data);
|
Addon::callHooks('page_info_data', $data);
|
||||||
|
|
||||||
// It maybe is a rich content, but if it does have everything that a link has,
|
// It maybe is a rich content, but if it does have everything that a link has,
|
||||||
|
@ -92,7 +92,7 @@ function add_page_info_data($data) {
|
||||||
return "\n".$text.$hashtags;
|
return "\n".$text.$hashtags;
|
||||||
}
|
}
|
||||||
|
|
||||||
function query_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") {
|
function query_page_info($url, $photo = "", $keywords = false, $keyword_blacklist = "") {
|
||||||
|
|
||||||
$data = ParseUrl::getSiteinfoCached($url, true);
|
$data = ParseUrl::getSiteinfoCached($url, true);
|
||||||
|
|
||||||
|
@ -120,8 +120,8 @@ function query_page_info($url, $no_photos = false, $photo = "", $keywords = fals
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") {
|
function add_page_keywords($url, $photo = "", $keywords = false, $keyword_blacklist = "") {
|
||||||
$data = query_page_info($url, $no_photos, $photo, $keywords, $keyword_blacklist);
|
$data = query_page_info($url, $photo, $keywords, $keyword_blacklist);
|
||||||
|
|
||||||
$tags = "";
|
$tags = "";
|
||||||
if (isset($data["keywords"]) && count($data["keywords"])) {
|
if (isset($data["keywords"]) && count($data["keywords"])) {
|
||||||
|
@ -141,9 +141,9 @@ function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = fa
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") {
|
function add_page_info($url, $no_photos = false, $photo = "", $keywords = false, $keyword_blacklist = "") {
|
||||||
$data = query_page_info($url, $no_photos, $photo, $keywords, $keyword_blacklist);
|
$data = query_page_info($url, $photo, $keywords, $keyword_blacklist);
|
||||||
|
|
||||||
$text = add_page_info_data($data);
|
$text = add_page_info_data($data, $no_photos);
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -402,7 +402,7 @@ class Feed {
|
||||||
// We always strip the title since it will be added in the page information
|
// We always strip the title since it will be added in the page information
|
||||||
$item["title"] = "";
|
$item["title"] = "";
|
||||||
$item["body"] = $item["body"].add_page_info($item["plink"], false, $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]);
|
$item["body"] = $item["body"].add_page_info($item["plink"], false, $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]);
|
||||||
$item["tag"] = add_page_keywords($item["plink"], false, $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]);
|
$item["tag"] = add_page_keywords($item["plink"], $preview, ($contact["fetch_further_information"] == 2), $contact["ffi_keyword_blacklist"]);
|
||||||
$item["object-type"] = ACTIVITY_OBJ_BOOKMARK;
|
$item["object-type"] = ACTIVITY_OBJ_BOOKMARK;
|
||||||
unset($item["attach"]);
|
unset($item["attach"]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -410,7 +410,7 @@ class Feed {
|
||||||
if (!empty($tags)) {
|
if (!empty($tags)) {
|
||||||
$item["tag"] = $tags;
|
$item["tag"] = $tags;
|
||||||
} else {
|
} else {
|
||||||
$item["tag"] = add_page_keywords($item["plink"], false, $preview, true, $contact["ffi_keyword_blacklist"]);
|
$item["tag"] = add_page_keywords($item["plink"], $preview, true, $contact["ffi_keyword_blacklist"]);
|
||||||
}
|
}
|
||||||
$item["body"] .= "\n".$item['tag'];
|
$item["body"] .= "\n".$item['tag'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue