From dc2e60d498249878f0f28df7545c51737c207874 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 2 Mar 2014 00:50:06 +0100 Subject: [PATCH] Disabling some features for several networks --- object/Item.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/object/Item.php b/object/Item.php index 0dfe915dea..2cb131f1a7 100644 --- a/object/Item.php +++ b/object/Item.php @@ -268,6 +268,26 @@ class Item extends BaseObject { $owner_name_e = $this->get_owner_name(); } + // Disable features that aren't available in several networks + if ($item["item_network"] != "dfrn") { + unset($buttons["dislike"]); + $tagger = ''; + } + + if ($item["item_network"] == "feed") + unset($buttons["like"]); + + if ($item["item_network"] == "mail") + unset($buttons["like"]); + + if (($item["item_network"] == "dspr") AND ($indent == 'comment')) + unset($buttons["like"]); + + // Facebook can like comments - but it isn't programmed in the connector yet. + if (($item["item_network"] == "face") AND ($indent == 'comment')) + unset($buttons["like"]); + + $tmp_item = array( 'template' => $this->get_template(), -- 2.39.5