aboutsummaryrefslogtreecommitdiffstats
path: root/addon/widgets/widget_like.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-05-11 17:04:41 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-05-13 09:04:43 +0200
commit55fd53ecbd45e1ef28e576edc943cf11b9326cb5 (patch)
tree013784b57626b7258964d05a5d82fd2e37d26bf2 /addon/widgets/widget_like.php
parent9f05b71018c5e99e76ae5697472a5493ac01db5a (diff)
downloadvolse-hubzilla-55fd53ecbd45e1ef28e576edc943cf11b9326cb5.tar.gz
volse-hubzilla-55fd53ecbd45e1ef28e576edc943cf11b9326cb5.tar.bz2
volse-hubzilla-55fd53ecbd45e1ef28e576edc943cf11b9326cb5.zip
More work on widgets addon
Diffstat (limited to 'addon/widgets/widget_like.php')
-rw-r--r--addon/widgets/widget_like.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/addon/widgets/widget_like.php b/addon/widgets/widget_like.php
index 001ec9c62..9b54212a8 100644
--- a/addon/widgets/widget_like.php
+++ b/addon/widgets/widget_like.php
@@ -1,13 +1,22 @@
<?php
-function widget_help(&$a, &$o, $conf) {
- $o .= "<p>Shows likes<br>Search ";
+function like_widget_name() {
+ return "Shows likes";
+}
+function like_widget_help() {
+ return "Search first item wich contains <em>KEY</em> and print like/dislike count";
}
-function widget_args(){
+function like_widget_args(){
return Array("KEY");
}
-function widget_content(&$a, &$o, $conf){
- $o .= " #TODO# ";
-} \ No newline at end of file
+function like_widget_content(&$a, $conf){
+ $args = explode(",",$_GET['a']);
+
+ if ($args[0]!=""){
+ return " #TODO like/dislike count for item with <em>" .$args[0]. "</em> # ";
+ } else {
+ return " #TODO# ";
+ }
+}