]> git.mxchange.org Git - friendica.git/commitdiff
added "secret" profile search keywords
authorFriendika <info@friendika.com>
Mon, 20 Dec 2010 01:46:26 +0000 (17:46 -0800)
committerFriendika <info@friendika.com>
Mon, 20 Dec 2010 01:46:26 +0000 (17:46 -0800)
INSTALL
boot.php
database.sql
mod/directory.php
mod/profiles.php
update.php
view/en/profile_edit.tpl
view/theme/default/style.css

diff --git a/INSTALL b/INSTALL
index ceb73c3b9cd9b79e28cc51a91d31f326c0cc6ac1..577f3f354c25ae142dec54b108fd37fd93bc0d68 100644 (file)
--- 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
index 1870e059e9eb36cf3ba9f7ff8b7d245cc143f9c1..329165ef8fb382b8a42d5487d9d3d57932eb820a 100644 (file)
--- 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"     );
index dab7c179d9922416e39d83aa195b26d93fd4d500..30edf4189b4f81357aee819fdd1ab84fea6f58ad 100644 (file)
@@ -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,
index e9bbf47ab7aaa7dc02a4fdae03fc62e17ca1afaf..449c89174def401854fd7f5a78ffd0f8a54f5b21 100644 (file)
@@ -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 ");
index e675af2e4856405ebd7e09d1ffbfab5cad5aeafe..e99e0f288c7a7c8e361116e25d174cfd4ff5abbf 100644 (file)
@@ -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'],
index c5aa5619463521efb55028ccd137b2c49be257d9..382c83e5a0ad8fc1598d02a35142279321304e0b 100644 (file)
@@ -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` ");
+}
+
index c5b24a88aca0572d26535af793d511034229d498..ec6cf260a95fea204528c80cb440cc56c734f0b5 100644 (file)
@@ -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>
index 491486794f6afd4c1d9d7a5bf04b8e4f5c543b84..627915e643bab330ee669946c4eaeed5c3f1b80b 100644 (file)
@@ -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,