diff --git a/database.sql b/database.sql index 593e567464..3a58decd12 100644 --- a/database.sql +++ b/database.sql @@ -297,7 +297,8 @@ 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, + `pub_keywords` text NOT NULL, + `prv_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 0504ac321c..825e2a375f 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -40,7 +40,7 @@ function directory_content(&$a) { if($search) $search = dbesc($search); - $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); + $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); $publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " ); diff --git a/mod/profiles.php b/mod/profiles.php index 409999a3e8..434f58adf9 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -55,7 +55,8 @@ 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'])); + $pub_keywords = notags(trim($_POST['pub_keywords'])); + $prv_keywords = notags(trim($_POST['prv_keywords'])); $marital = notags(trim($_POST['marital'])); if($marital != $orig[0]['marital']) $maritalchanged = true; @@ -147,7 +148,8 @@ function profiles_post(&$a) { `homepage` = '%s', `politic` = '%s', `religion` = '%s', - `keywords` = '%s', + `pub_keywords` = '%s', + `prv_keywords` = '%s', `about` = '%s', `interest` = '%s', `contact` = '%s', @@ -176,7 +178,8 @@ function profiles_post(&$a) { dbesc($homepage), dbesc($politic), dbesc($religion), - dbesc($keywords), + dbesc($pub_keywords), + dbesc($prv_keywords), dbesc($about), dbesc($interest), dbesc($contact), @@ -383,7 +386,8 @@ function profiles_content(&$a) { '$homepage' => $r[0]['homepage'], '$politic' => $r[0]['politic'], '$religion' => $r[0]['religion'], - '$keywords' => $r[0]['keywords'], + '$pub_keywords' => $r[0]['pub_keywords'], + '$prv_keywords' => $r[0]['prv_keywords'], '$music' => $r[0]['music'], '$book' => $r[0]['book'], '$tv' => $r[0]['tv'], diff --git a/update.php b/update.php index 39e678bba7..7a885193cd 100644 --- a/update.php +++ b/update.php @@ -397,3 +397,7 @@ function update_1040() { } +function update_1041() { + q("ALTER TABLE `profile` CHANGE `keywords` `prv_keywords` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL "); + q("ALTER TABLE `profile` ADD `pub_keywords` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `religion` "); +} \ No newline at end of file diff --git a/view/de/profile_edit.tpl b/view/de/profile_edit.tpl index 09a7610230..840597ddcc 100644 --- a/view/de/profile_edit.tpl +++ b/view/de/profile_edit.tpl @@ -134,11 +134,17 @@ $sexual
-
- - -
(Used for searching public profiles, never shown to others)
-
+
+ + +
(Used for suggesting potential friends, can be seen by others)
+
+ +
+ + +
(Used for searching profiles, never shown to others)
+
diff --git a/view/en/profile_edit.tpl b/view/en/profile_edit.tpl index b0d4850d0d..6c7d74dafc 100644 --- a/view/en/profile_edit.tpl +++ b/view/en/profile_edit.tpl @@ -134,11 +134,17 @@ $sexual
-
- - -
(Used for searching public profiles, never shown to others)
-
+
+ + +
(Used for suggesting potential friends, can be seen by others)
+
+ +
+ + +
(Used for searching profiles, never shown to others)
+
diff --git a/view/fr/profile_edit.tpl b/view/fr/profile_edit.tpl index beff3b8bd5..b282551884 100644 --- a/view/fr/profile_edit.tpl +++ b/view/fr/profile_edit.tpl @@ -134,11 +134,17 @@ $sexual
-
- - -
(Used for searching public profiles, never shown to others)
-
+
+ + +
(Used for suggesting potential friends, can be seen by others)
+
+ +
+ + +
(Used for searching profiles, never shown to others)
+
diff --git a/view/it/profile_edit.tpl b/view/it/profile_edit.tpl index efdb5d4483..9f2a137907 100644 --- a/view/it/profile_edit.tpl +++ b/view/it/profile_edit.tpl @@ -134,11 +134,17 @@ $sexual
-
- - -
(Usati per la ricerca dei profili pubblci, mai mostrati agli altri)
-
+
+ + +
(Used for suggesting potential friends, can be seen by others)
+
+ +
+ + +
(Usati per la ricerca dei profili, mai mostrati agli altri)
+
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index c54b9835a6..ca8764283c 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -624,7 +624,8 @@ input#dfrn-url { #profile-edit-sexual-label, #profile-edit-politic-label, #profile-edit-religion-label, -#profile-edit-keywords-label, +#profile-edit-pubkeywords-label, +#profile-edit-prvkeywords-label, #profile-edit-homepage-label { float: left; width: 175px; @@ -644,7 +645,8 @@ input#dfrn-url { #sexual-select, #profile-edit-politic, #profile-edit-religion, -#profile-edit-keywords, +#profile-edit-pubkeywords, +#profile-edit-prvkeywords, #profile-in-dir-yes, #profile-in-dir-no, #profile-in-netdir-yes, @@ -698,7 +700,8 @@ input#dfrn-url { #profile-edit-pdesc-desc, -#profile-edit-keywords-desc { +#profile-edit-pubkeywords-desc, +#profile-edit-prvkeywords-desc { float: left; margin-left: 20px; } @@ -741,7 +744,8 @@ input#dfrn-url { #profile-edit-sexual-end, #profile-edit-politic-end, #profile-edit-religion-end, -#profile-edit-keywords-end, +#profile-edit-pubkeywords-end, +#profile-edit-prvkeywords-end, #profile-edit-homepage-end, #profile-in-dir-break, #profile-in-dir-end, diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index 4461907bb5..aadfbd3c4f 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -755,7 +755,8 @@ input#dfrn-url { #profile-edit-sexual-label, #profile-edit-politic-label, #profile-edit-religion-label, -#profile-edit-keywords-label, +#profile-edit-pubkeywords-label, +#profile-edit-prvkeywords-label, #profile-edit-homepage-label { float: left; width: 175px; @@ -775,7 +776,8 @@ input#dfrn-url { #sexual-select, #profile-edit-politic, #profile-edit-religion, -#profile-edit-keywords, +#profile-edit-pubkeywords, +#profile-edit-prvkeywords, #profile-in-dir-yes, #profile-in-dir-no, #profile-in-netdir-yes, @@ -806,7 +808,8 @@ input#dfrn-url { margin-left: 20px; } -#profile-edit-keywords-desc { +#profile-edit-pubkeywords-desc, +#profile-edit-prvkeywords-desc { float: left; margin-left: 20px; } @@ -864,7 +867,8 @@ input#dfrn-url { #profile-edit-sexual-end, #profile-edit-politic-end, #profile-edit-religion-end, -#profile-edit-keywords-end, +#profile-edit-pubkeywords-end, +#profile-edit-prvkeywords-end, #profile-edit-homepage-end, #profile-in-dir-break, #profile-in-dir-end,