Merge pull request #944 from annando/master
Some more frontend stuff/Native Diaspora reshare
This commit is contained in:
commit
c1d14bcc98
17 changed files with 147 additions and 41 deletions
|
@ -117,6 +117,9 @@ function delegate_content(&$a) {
|
|||
if(! in_array($rr['uid'],$uids))
|
||||
$potentials[] = $rr;
|
||||
|
||||
require_once("mod/settings.php");
|
||||
settings_init($a);
|
||||
|
||||
$o = replace_macros(get_markup_template('delegate.tpl'),array(
|
||||
'$header' => t('Delegate Page Management'),
|
||||
'$base' => $a->get_baseurl(),
|
||||
|
@ -136,4 +139,4 @@ function delegate_content(&$a) {
|
|||
return $o;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,6 +265,7 @@ function settings_post(&$a) {
|
|||
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->user['theme']);
|
||||
$mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme'])) : '');
|
||||
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
|
||||
$noinfo = ((x($_POST,'noinfo')) ? intval($_POST['noinfo']) : 0);
|
||||
$infinite_scroll = ((x($_POST,'infinite_scroll')) ? intval($_POST['infinite_scroll']) : 0);
|
||||
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
|
||||
$browser_update = $browser_update * 1000;
|
||||
|
@ -287,6 +288,7 @@ function settings_post(&$a) {
|
|||
set_pconfig(local_user(),'system','itemspage_network', $itemspage_network);
|
||||
set_pconfig(local_user(),'system','itemspage_mobile_network', $itemspage_mobile_network);
|
||||
set_pconfig(local_user(),'system','no_smilies',$nosmile);
|
||||
set_pconfig(local_user(),'system','ignore_info',$noinfo);
|
||||
set_pconfig(local_user(),'system','infinite_scroll',$infinite_scroll);
|
||||
|
||||
|
||||
|
@ -850,6 +852,9 @@ function settings_content(&$a) {
|
|||
$nosmile = get_pconfig(local_user(),'system','no_smilies');
|
||||
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
|
||||
|
||||
$noinfo = get_pconfig(local_user(),'system','ignore_info');
|
||||
$noinfo = (($noinfo===false)? '0': $noinfo); // default if not set: 0
|
||||
|
||||
$infinite_scroll = get_pconfig(local_user(),'system','infinite_scroll');
|
||||
$infinite_scroll = (($infinite_scroll===false)? '0': $infinite_scroll); // default if not set: 0
|
||||
|
||||
|
@ -873,6 +878,7 @@ function settings_content(&$a) {
|
|||
'$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
|
||||
'$itemspage_mobile_network' => array('itemspage_mobile_network', t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')),
|
||||
'$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
|
||||
'$noinfo' => array('noinfo', t("Don't show notices"), $noinfo, ''),
|
||||
'$infinite_scroll' => array('infinite_scroll', t("Infinite scroll"), $infinite_scroll, ''),
|
||||
|
||||
'$theme_config' => $theme_config,
|
||||
|
|
|
@ -3,19 +3,23 @@
|
|||
function uexport_init(&$a){
|
||||
if(! local_user())
|
||||
killme();
|
||||
|
||||
|
||||
require_once("mod/settings.php");
|
||||
settings_init($a);
|
||||
|
||||
/*
|
||||
$tabs = array(
|
||||
array(
|
||||
'label' => t('Account settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings',
|
||||
'selected' => '',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'label' => t('Display settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/display',
|
||||
'selected' =>'',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
'label' => t('Connector settings'),
|
||||
'url' => $a->get_baseurl(true).'/settings/connectors',
|
||||
|
@ -42,17 +46,18 @@ function uexport_init(&$a){
|
|||
'selected' => ''
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$tabtpl = get_markup_template("generic_links_widget.tpl");
|
||||
$a->page['aside'] = replace_macros($tabtpl, array(
|
||||
'$title' => t('Settings'),
|
||||
'$class' => 'settings-widget',
|
||||
'$items' => $tabs,
|
||||
));
|
||||
*/
|
||||
}
|
||||
|
||||
function uexport_content(&$a){
|
||||
|
||||
|
||||
if ($a->argc > 1) {
|
||||
header("Content-type: application/json");
|
||||
header('Content-Disposition: attachment; filename="'.$a->user['nickname'].'.'.$a->argv[1].'"');
|
||||
|
@ -73,15 +78,15 @@ function uexport_content(&$a){
|
|||
array('/uexport/backup',t('Export all'),t('Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account (photos are not exported)')),
|
||||
);
|
||||
call_hooks('uexport_options', $options);
|
||||
|
||||
|
||||
$tpl = get_markup_template("uexport.tpl");
|
||||
return replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$title' => t('Export personal data'),
|
||||
'$options' => $options
|
||||
));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function _uexport_multirow($query) {
|
||||
|
@ -117,7 +122,7 @@ function uexport_account($a){
|
|||
$user = _uexport_row(
|
||||
sprintf( "SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval(local_user()) )
|
||||
);
|
||||
|
||||
|
||||
$contact = _uexport_multirow(
|
||||
sprintf( "SELECT * FROM `contact` WHERE `uid` = %d ",intval(local_user()) )
|
||||
);
|
||||
|
@ -139,7 +144,7 @@ function uexport_account($a){
|
|||
$group = _uexport_multirow(
|
||||
sprintf( "SELECT * FROM `group` WHERE uid = %d",intval(local_user()) )
|
||||
);
|
||||
|
||||
|
||||
$group_member = _uexport_multirow(
|
||||
sprintf( "SELECT * FROM `group_member` WHERE uid = %d",intval(local_user()) )
|
||||
);
|
||||
|
@ -195,4 +200,4 @@ function uexport_all(&$a) {
|
|||
echo json_encode($output)."\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue