]> git.mxchange.org Git - friendica.git/commitdiff
Disabling some features for several networks
authorMichael Vogel <icarus@dabo.de>
Sat, 1 Mar 2014 23:50:06 +0000 (00:50 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 1 Mar 2014 23:50:06 +0000 (00:50 +0100)
object/Item.php

index 0dfe915dea2fcf6722b50ee876593ae71b0f64b3..2cb131f1a7e267fa296be90e1880ae3aaaee4187 100644 (file)
@@ -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(),