X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=jappixmini%2Fjappixmini.php;h=08d821128db7c34d3ce0507d2db4c40566ebf593;hb=cb4b8b51840ae2ff7964d71a50ce425d0bd15963;hp=aac5c5486eb00d31a1646b38aa9327ebcae9c40c;hpb=bb0ac84cc4aa2e622f7927e6d91e1777b45af42a;p=friendica-addons.git diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index aac5c548..08d82112 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -294,10 +294,14 @@ function jappixmini_settings(&$a, &$s) { $a->page['htmlhead'] .= ''."\r\n"; } - $s .= '
'; + $s .= ''; + $s .= '

'.t('Jappix Mini').'

'; + $s .= '
'; + $s .= ''; @@ -436,6 +439,9 @@ function jappixmini_script(&$a,&$s) { if(! local_user()) return; + if ($_GET["mode"] == "minimal") + return; + $activate = get_pconfig(local_user(),'jappixmini','activate'); $dontinsertchat = get_pconfig(local_user(), 'jappixmini','dontinsertchat'); if (!$activate or $dontinsertchat) return; @@ -482,7 +488,8 @@ function jappixmini_script(&$a,&$s) { dbesc($dfrn_id), dbesc($dfrn_id) ); - $name = $r[0]["name"]; + if (count($r)) + $name = $r[0]["name"]; $value = $row['v']; $pos = strpos($value, ":"); @@ -498,11 +505,16 @@ function jappixmini_script(&$a,&$s) { // get nickname $r = q("SELECT `username` FROM `user` WHERE `uid`=$uid"); $nickname = json_encode($r[0]["username"]); + $groupchats = get_config('jappixmini','groupchats'); + //if $groupchats has no value jappix_addon_start will produce a syntax error + if(empty($groupchats)){ + $groupchats = "{}"; + } // add javascript to start Jappix Mini $a->page['htmlhead'] .= "";