aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-19 17:46:26 -0800
committerFriendika <info@friendika.com>2010-12-19 17:46:26 -0800
commit24a9a41f969cfd7625847c77a949e4b279f68406 (patch)
treea78eb978ea9def0bb85b2202d90662ae23c3c22f
parent4a2d83fcfff548e50d3138ff617c0acd99445e03 (diff)
downloadvolse-hubzilla-24a9a41f969cfd7625847c77a949e4b279f68406.tar.gz
volse-hubzilla-24a9a41f969cfd7625847c77a949e4b279f68406.tar.bz2
volse-hubzilla-24a9a41f969cfd7625847c77a949e4b279f68406.zip
added "secret" profile search keywords
-rw-r--r--INSTALL1
-rw-r--r--boot.php2
-rw-r--r--database.sql1
-rw-r--r--mod/directory.php2
-rw-r--r--mod/profiles.php5
-rw-r--r--update.php4
-rw-r--r--view/en/profile_edit.tpl8
-rw-r--r--view/theme/default/style.css9
8 files changed, 29 insertions, 3 deletions
diff --git a/INSTALL b/INSTALL
index ceb73c3b9..577f3f354 100644
--- a/INSTALL
+++ b/INSTALL
@@ -23,6 +23,7 @@ encryption support
- PHP *command line* access with register_argc_argv set to true in the
php.ini file
- curl, gd, mysql, and openssl extensions
+ - some form of email server or email gateway such that PHP mail() works
- mcrypt (optional; used for end-to-end message encryption)
- Mysql 5.x
diff --git a/boot.php b/boot.php
index 1870e059e..329165ef8 100644
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
set_time_limit(0);
-define ( 'BUILD_ID', 1024 );
+define ( 'BUILD_ID', 1025 );
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
define ( 'EOL', "<br />\r\n" );
diff --git a/database.sql b/database.sql
index dab7c179d..30edf4189 100644
--- a/database.sql
+++ b/database.sql
@@ -292,6 +292,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
`sexual` char(255) NOT NULL,
`politic` char(255) NOT NULL,
`religion` char(255) NOT NULL,
+ `keywords` text NOT NULL,
`about` text NOT NULL,
`summary` char(255) NOT NULL,
`music` text NOT NULL,
diff --git a/mod/directory.php b/mod/directory.php
index e9bbf47ab..449c89174 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -37,7 +37,7 @@ function directory_content(&$a) {
if($search)
$search = dbesc($search);
- $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`) AGAINST ('$search' IN BOOLEAN MODE) " : "");
+ $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra ");
diff --git a/mod/profiles.php b/mod/profiles.php
index e675af2e4..e99e0f288 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -52,7 +52,7 @@ function profiles_post(&$a) {
$region = notags(trim($_POST['region']));
$postal_code = notags(trim($_POST['postal_code']));
$country_name = notags(trim($_POST['country_name']));
-
+ $keywords = notags(trim($_POST['keywords']));
$marital = notags(trim($_POST['marital']));
if($marital != $orig[0]['marital'])
$maritalchanged = true;
@@ -138,6 +138,7 @@ function profiles_post(&$a) {
`homepage` = '%s',
`politic` = '%s',
`religion` = '%s',
+ `keywords` = '%s',
`about` = '%s',
`interest` = '%s',
`contact` = '%s',
@@ -165,6 +166,7 @@ function profiles_post(&$a) {
dbesc($homepage),
dbesc($politic),
dbesc($religion),
+ dbesc($keywords),
dbesc($about),
dbesc($interest),
dbesc($contact),
@@ -369,6 +371,7 @@ function profiles_content(&$a) {
'$homepage' => $r[0]['homepage'],
'$politic' => $r[0]['politic'],
'$religion' => $r[0]['religion'],
+ '$keywords' => $r[0]['keywords'],
'$music' => $r[0]['music'],
'$book' => $r[0]['book'],
'$tv' => $r[0]['tv'],
diff --git a/update.php b/update.php
index c5aa56194..382c83e5a 100644
--- a/update.php
+++ b/update.php
@@ -243,3 +243,7 @@ function update_1023() {
ADD `login_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `register_date` ");
}
+function update_1024() {
+ q("ALTER TABLE `profile` ADD `keywords` TEXT NOT NULL AFTER `religion` ");
+}
+
diff --git a/view/en/profile_edit.tpl b/view/en/profile_edit.tpl
index c5b24a88a..ec6cf260a 100644
--- a/view/en/profile_edit.tpl
+++ b/view/en/profile_edit.tpl
@@ -40,6 +40,7 @@ $gender
<div id="profile-edit-dob" >
$dob $age
</div>
+</div>
<div id="profile-edit-dob-end"></div>
$hide_friends
@@ -126,6 +127,13 @@ $sexual
</div>
<div id="profile-edit-religion-end"></div>
+<div id="profile-edit-keywords-wrapper" >
+<label id="profile-edit-keywords-label" for="profile-edit-keywords" >Keywords: </label>
+<input type="text" size="32" name="keywords" id="profile-edit-keywords" title="Example: fishing photography software" value="$keywords" />
+</div><div id="profile-edit-keywords-desc">(Used for searching public profiles, never shown to others)</div>
+<div id="profile-edit-keywords-end"></div>
+
+
<div class="profile-edit-submit-wrapper" >
<input type="submit" name="submit" class="profile-edit-submit-button" value="Submit" />
</div>
diff --git a/view/theme/default/style.css b/view/theme/default/style.css
index 491486794..627915e64 100644
--- a/view/theme/default/style.css
+++ b/view/theme/default/style.css
@@ -720,6 +720,7 @@ input#dfrn-url {
#profile-edit-sexual-label,
#profile-edit-politic-label,
#profile-edit-religion-label,
+#profile-edit-keywords-label,
#profile-edit-homepage-label {
float: left;
width: 175px;
@@ -738,6 +739,7 @@ input#dfrn-url {
#sexual-select,
#profile-edit-politic,
#profile-edit-religion,
+#profile-edit-keywords,
#profile-in-dir-yes,
#profile-in-dir-no,
#profile-in-netdir-yes,
@@ -768,6 +770,12 @@ input#dfrn-url {
margin-left: 20px;
}
+#profile-edit-keywords-desc {
+ float: left;
+ margin-left: 20px;
+}
+
+
#profile-edit-homepage {
float: left;
margin-bottom: 35px;
@@ -800,6 +808,7 @@ input#dfrn-url {
#profile-edit-sexual-end,
#profile-edit-politic-end,
#profile-edit-religion-end,
+#profile-edit-keywords-end,
#profile-edit-homepage-end,
#profile-in-dir-break,
#profile-in-dir-end,