diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php
index 5d6f8446a..df0d474e4 100644
--- a/jappixmini/jappixmini.php
+++ b/jappixmini/jappixmini.php
@@ -221,6 +221,8 @@ function jappixmini_settings(&$a, &$s) {
$activate = get_pconfig(local_user(),'jappixmini','activate');
$activate = intval($activate) ? ' checked="checked"' : '';
+ $insertchat = get_pconfig(local_user(),'jappixmini','insertchat');
+ $insertchat = intval($insertchat) ? ' checked="checked"' : '';
$username = get_pconfig(local_user(),'jappixmini','username');
$username = htmlentities($username);
@@ -261,46 +263,49 @@ function jappixmini_settings(&$a, &$s) {
$s .= '
';
- $s .= '
Jappix Mini addon settings
';
+ $s .= '
'.t('Jappix Mini addon settings').'
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
+ $s .= '
';
+ $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
$s .= '
';
$onchange = "document.getElementById('jappixmini-friendica-password').disabled = !this.checked;jappixmini_set_password();";
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
if ($info_text) $s .= '
Configuration help:
'.$info_text.'
';
$s .= '
Status:
Addon knows '.$address_cnt.' Jabber addresses of '.$contact_cnt.' Friendica contacts (takes some time, usually 10 minutes, to update).
';
$s .= '
';
- $s .= '
';
+ $s .= '
';
$s .= '
';
$s .= '
';
@@ -379,6 +384,7 @@ function jappixmini_settings_post(&$a,&$b) {
set_pconfig($uid,'jappixmini','autosubscribe',intval($b['jappixmini-autosubscribe']));
set_pconfig($uid,'jappixmini','autoapprove',intval($b['jappixmini-autoapprove']));
set_pconfig($uid,'jappixmini','activate',intval($b['jappixmini-activate']));
+ set_pconfig($uid,'jappixmini','insertchat',intval($b['jappixmini-insertchat']));
set_pconfig($uid,'jappixmini','encrypt',$encrypt);
info( 'Jappix Mini settings saved.' );
@@ -395,7 +401,8 @@ function jappixmini_script(&$a,&$s) {
if(! local_user()) return;
$activate = get_pconfig(local_user(),'jappixmini','activate');
- if (!$activate) return;
+ $insertchat = get_pconfig(local_user(), 'jappixmini','insertchat');
+ if (!$activate or !$insertchat) return;
$a->page['htmlhead'] .= ''."\r\n";
$a->page['htmlhead'] .= ''."\r\n";