$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
}
- $s .= '<div class="settings-block">';
+ $s .= '<span id="settings_jappixmini_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
+ $s .= '<h3>'.t('Jappix Mini').'</h3>';
+ $s .= '</span>';
+ $s .= '<div id="settings_jappixmini_expanded" class="settings-block" style="display: none;">';
+ $s .= '<span class="fakelink" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
+ $s .= '<h3>'.t('Jappix Mini').'</h3>';
+ $s .= '</span>';
- $s .= '<h3>'.t('Jappix Mini addon settings').'</h3>';
- $s .= '<div>';
$s .= '<label for="jappixmini-activate">'.t('Activate addon').'</label>';
$s .= ' <input id="jappixmini-activate" type="checkbox" name="jappixmini-activate" value="1"'.$activate.' />';
$s .= '<br />';
$s .= ' <input id="jappixmini-server" type="text" name="jappixmini-server" value="'.$server.'" />';
$s .= '<br />';
- if (defaultbosh == "") {
+ if ($defaultbosh == "") {
$s .= '<label for="jappixmini-bosh">'.t('Jabber BOSH host').'</label>';
$s .= ' <input id="jappixmini-bosh" type="text" name="jappixmini-bosh" value="'.$bosh.'" />';
$s .= '<br />';
$s .= '<br />';
if ($info_text) $s .= '<br />Configuration help:<p style="margin-left:2em;">'.$info_text.'</p>';
$s .= '<br />Status:<p style="margin-left:2em;">Addon knows '.$address_cnt.' Jabber addresses of '.$contact_cnt.' Friendica contacts (takes some time, usually 10 minutes, to update).</p>';
- $s .= '<input type="submit" name="jappixmini-submit" value="' . t('Submit') . '" />';
+ $s .= '<input type="submit" name="jappixmini-submit" value="' . t('Save Settings') . '" />';
$s .= ' <input type="button" value="'.t('Add contact').'" onclick="jappixmini_addon_subscribe();" />';
- $s .= '</div>';
$s .= '</div>';
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;
dbesc($dfrn_id),
dbesc($dfrn_id)
);
- $name = $r[0]["name"];
+ if (count($r))
+ $name = $r[0]["name"];
$value = $row['v'];
$pos = strpos($value, ":");
$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(!isset($groupchats)){
+ if(empty($groupchats)){
$groupchats = "{}";
}