aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/settings.php5
-rw-r--r--mod/uexport.php48
-rw-r--r--view/de/settings.tpl2
-rw-r--r--view/en/settings.tpl2
-rw-r--r--view/fr/settings.tpl2
-rw-r--r--view/it/settings.tpl1
-rw-r--r--view/sv/settings.tpl2
-rw-r--r--view/theme/duepuntozero/style.css5
-rw-r--r--view/theme/loozah/style.css8
9 files changed, 69 insertions, 6 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 6a2733d7c..b20f4d11b 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -5,6 +5,7 @@ function settings_init(&$a) {
if(local_user()) {
profile_load($a,$a->user['nickname']);
}
+
}
@@ -341,9 +342,13 @@ function settings_content(&$a) {
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
+ $uexport = '<div id="uexport-link"><a href="uexport" >' . t('Export Personal Data') . '</a></div>';
+
+
$o .= replace_macros($stpl,array(
'$baseurl' => $a->get_baseurl(),
'$oidhtml' => $oidhtml,
+ '$uexport' => $uexport,
'$uid' => local_user(),
'$username' => $username,
'$openid' => $openid,
diff --git a/mod/uexport.php b/mod/uexport.php
new file mode 100644
index 000000000..423c3a82f
--- /dev/null
+++ b/mod/uexport.php
@@ -0,0 +1,48 @@
+<?php
+
+function uexport_init(&$a) {
+
+ if(! local_user())
+ killme();
+
+ $user = array();
+ $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
+ local_user()
+ );
+ if(count($r)) {
+ foreach($r as $rr)
+ foreach($rr as $k => $v)
+ $user[$k] = $v;
+
+ }
+ $contact = array();
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d ",
+ local_user()
+ );
+ if(count($r)) {
+ foreach($r as $rr)
+ foreach($rr as $k => $v)
+ $contact[][$k] = $v;
+
+ }
+
+ $profile = array();
+ $r = q("SELECT * FROM `profile` WHERE `uid` = %d ",
+ local_user()
+ );
+ if(count($r)) {
+ foreach($r as $rr)
+ foreach($rr as $k => $v)
+ $profile[][$k] = $v;
+ }
+
+
+
+ $output = array('user' => $user, 'contact' => $contact, 'profile' => $profile);
+
+ header("Content-type: text/json");
+ echo str_replace('\\/','/',json_encode($output));
+
+ killme();
+
+} \ No newline at end of file
diff --git a/view/de/settings.tpl b/view/de/settings.tpl
index 5f700ff8b..170939991 100644
--- a/view/de/settings.tpl
+++ b/view/de/settings.tpl
@@ -2,6 +2,8 @@
<div id="plugin-settings-link"><a href="settings/addon">Plugin Einstellungen</a></div>
+$uexport
+
$nickname_block
diff --git a/view/en/settings.tpl b/view/en/settings.tpl
index 45060e1c4..134fffaf9 100644
--- a/view/en/settings.tpl
+++ b/view/en/settings.tpl
@@ -2,6 +2,8 @@
<div id="plugin-settings-link"><a href="settings/addon">Plugin Settings</a></div>
+$uexport
+
$nickname_block
diff --git a/view/fr/settings.tpl b/view/fr/settings.tpl
index e0334842a..9846219ed 100644
--- a/view/fr/settings.tpl
+++ b/view/fr/settings.tpl
@@ -2,6 +2,8 @@
<div id="plugin-settings-link"><a href="settings/addon">Plugin Settings</a></div>
+$uexport
+
$nickname_block
diff --git a/view/it/settings.tpl b/view/it/settings.tpl
index d1e25da81..6679e28fe 100644
--- a/view/it/settings.tpl
+++ b/view/it/settings.tpl
@@ -2,6 +2,7 @@
<div id="plugin-settings-link"><a href="settings/addon">Impostazioni Plugin</a></div>
+$uexport
$nickname_block
diff --git a/view/sv/settings.tpl b/view/sv/settings.tpl
index d5b8d5b3f..2601f4851 100644
--- a/view/sv/settings.tpl
+++ b/view/sv/settings.tpl
@@ -2,6 +2,8 @@
<div id="plugin-settings-link"><a href="settings/addon">Plugin Settings</a></div>
+$uexport
+
$nickname_block
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index eda3cbf27..758ab9699 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -372,6 +372,7 @@ input#dfrn-url {
}
#settings-nick-wrapper {
+ margin-top: 20px;
margin-bottom: 30px;
}
@@ -2044,8 +2045,8 @@ a.mail-list-link {
}
-#plugin-settings-link, #account-settings-link {
- margin-bottom: 25px;
+#plugin-settings-link, #account-settings-link, #uexport-link {
+ margin-bottom: 10px;
}
/* end from defautlt */
diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css
index 4a092c6d2..4d2ca6d63 100644
--- a/view/theme/loozah/style.css
+++ b/view/theme/loozah/style.css
@@ -505,7 +505,7 @@ input#dfrn-url {
}
#settings-nick-wrapper {
- margin-bottom: 30px;
+ margin-bottom: 15px;
}
#settings-expire-end {
@@ -608,7 +608,7 @@ input#dfrn-url {
}
#settings-nick {
- margin-bottom: 50px;
+ margin-bottom: 30px;
}
#cropimage-wrapper, #cropimage-preview-wrapper {
@@ -2079,8 +2079,8 @@ a.mail-list-link {
}
-#plugin-settings-link, #account-settings-link {
- margin-bottom: 25px;
+#plugin-settings-link, #account-settings-link, #uexport-link {
+ margin-bottom: 10px;
}