aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README18
-rw-r--r--boot.php4
-rw-r--r--database.sql4
-rw-r--r--mod/directory.php6
-rw-r--r--mod/match.php5
-rw-r--r--mod/settings.php5
-rw-r--r--mod/uexport.php72
-rw-r--r--update.php8
-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.css12
-rw-r--r--view/theme/loozah/style.css16
15 files changed, 137 insertions, 22 deletions
diff --git a/README b/README
index 36bd01792..484550393 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
- *********
- Friendika
- *********
+ *************
+ * Friendika *
+ *************
Distributed Social Network
@@ -79,11 +79,6 @@ only able to see the side of you that you wish to present. If you send a
private message to your aunt Mary, we will encrypt it with military grade
encryption.
- Other distributed social network projects talk about privacy and offering
-a feature-rich social networking alternative, but all they can deliver is
-vapour and vague promises. Things like "Private mail will be in the next
-release".
-
Friendika delivers. We've got an incredibly rich social communications
interface you can make use of *right now*.
@@ -94,6 +89,13 @@ But we're creating something completely different.
Something better.
+ Start with richer communications. Adorn your text, colour it. We've got a
+text counter in case you're sending across to one of the primitive social
+networks, but we don't think you should have to squeeze your communications
+into some arbitrary limit. Free yourself from thinking how to squeeze your
+message into 140 or 420 characters, or sending messages in some strange
+short-hand code. Even edit your text after you send it. It's OK.
+
A single instance of Friendika can easily support hundreds of (and up to
several thousand) people using commodity hosting hardware. You could even run
Friendika on an old PC in your closet or garage. Each of these people are able
diff --git a/boot.php b/boot.php
index 0b5787aba..72ec81c11 100644
--- a/boot.php
+++ b/boot.php
@@ -2,9 +2,9 @@
set_time_limit(0);
-define ( 'FRIENDIKA_VERSION', '2.1.925' );
+define ( 'FRIENDIKA_VERSION', '2.1.927' );
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
-define ( 'DB_UPDATE_VERSION', 1044 );
+define ( 'DB_UPDATE_VERSION', 1045 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/database.sql b/database.sql
index 0a718c8c2..114f0d3d9 100644
--- a/database.sql
+++ b/database.sql
@@ -315,7 +315,9 @@ CREATE TABLE IF NOT EXISTS `profile` (
`thumb` char(255) NOT NULL,
`publish` tinyint(1) NOT NULL DEFAULT '0',
`net-publish` tinyint(1) NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ FULLTEXT KEY `pub_keywords` (`pub_keywords`),
+ FULLTEXT KEY `prv_keywords` (`prv_keywords`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
diff --git a/mod/directory.php b/mod/directory.php
index 825e2a375..72c30fb31 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -86,10 +86,10 @@ function directory_content(&$a) {
}
if(strlen($rr['dob'])) {
if(($years = age($rr['dob'],$rr['timezone'],'')) != 0)
- $details .= "<br />Age: $years" ;
+ $details .= '<br />' . t('Age: ') . $years ;
}
if(strlen($rr['gender']))
- $details .= '<br />Gender: ' . $rr['gender'];
+ $details .= '<br />' . t('Gender: ') . $rr['gender'];
$entry = replace_macros($tpl,array(
'$id' => $rr['id'],
@@ -115,7 +115,7 @@ function directory_content(&$a) {
}
else
- notice("No entries (some entries may be hidden).");
+ notice( t("No entries \x28some entries may be hidden\x29.") . EOL);
return $o;
} \ No newline at end of file
diff --git a/mod/match.php b/mod/match.php
index 7228529d7..092595a09 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -39,11 +39,12 @@ function match_content(&$a) {
if(count($j->results)) {
foreach($j->results as $jj) {
$o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">';
- $o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" /></a></div>';
+ $o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" title="' . $jj->name . '[' . $jj->url . ']' . '" /></a></div>';
$o .= '<div class="profile-match-break"></div>';
- $o .= '<div class="profile-match-name"><a href="' . $jj->url . '">' . $jj->name . '</a></div>';
+ $o .= '<div class="profile-match-name"><a href="' . $jj->url . '" title="' . $jj->name . '[' . $jj->url .']' . '">' . $jj->name . '</a></div>';
$o .= '<div class="profile-match-end"></div></div>';
}
+ $o .= '<div id="profile-match-wrapper-end"></div>';
}
else {
notice( t('No matches') . EOL);
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..96f062c41
--- /dev/null
+++ b/mod/uexport.php
@@ -0,0 +1,72 @@
+<?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 ",
+ intval(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 ",
+ intval(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: application/json");
+ echo str_replace('\\/','/',json_encode($output));
+
+ $r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
+ intval(local_user())
+ );
+ if(count($r))
+ $total = $r[0]['total'];
+
+ // chunk the output to avoid exhausting memory
+
+ for($x = 0; $x < $total; $x += 500) {
+ $item = array();
+ $r = q("SELECT * FROM `item` WHERE `uid` = %d LIMIT %d, %d",
+ intval(local_user()),
+ intval($x),
+ intval(500)
+ );
+ if(count($r)) {
+ foreach($r as $rr)
+ foreach($rr as $k => $v)
+ $item[][$k] = $v;
+ }
+
+ $output = array('item' => $item);
+ echo str_replace('\\/','/',json_encode($output));
+ }
+
+
+ killme();
+
+} \ No newline at end of file
diff --git a/update.php b/update.php
index 9f94cd511..3672b2bfe 100644
--- a/update.php
+++ b/update.php
@@ -410,3 +410,11 @@ function update_1042() {
function update_1043() {
q("ALTER TABLE `user` ADD `blockwall` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `blocked` ");
}
+
+function update_1044() {
+ q("ALTER TABLE `profile` ADD FULLTEXT ( `pub_keywords` ) ");
+ q("ALTER TABLE `profile` ADD FULLTEXT ( `prv_keywords` ) ");
+}
+
+
+ \ 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 4f6d6c196..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 */
@@ -2162,6 +2163,13 @@ a.mail-list-link {
clear: both;
}
+.profile-match-wrapper {
+ float: left;
+ padding: 10px;
+}
+#profile-match-wrapper-end {
+ clear: both;
+}
.side-link {
margin-bottom: 15px;
}
diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css
index 49c83c83c..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;
}
@@ -2188,6 +2188,14 @@ a.mail-list-link {
clear: both;
}
+.profile-match-wrapper {
+ float: left;
+ padding: 10px;
+}
+#profile-match-wrapper-end {
+ clear: both;
+}
+
.side-link {
margin-bottom: 15px;
}