mirror of
https://github.com/friendica/friendica
synced 2024-11-17 23:43:40 +00:00
keywords split into public and private. Public will be used by the friend finder.
This commit is contained in:
parent
f2734681e5
commit
7b92b42603
10 changed files with 75 additions and 34 deletions
|
@ -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,
|
||||
|
|
|
@ -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 " );
|
||||
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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` ");
|
||||
}
|
|
@ -134,11 +134,17 @@ $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 id="profile-edit-pubkeywords-wrapper" >
|
||||
<label id="profile-edit-pubkeywords-label" for="profile-edit-pubkeywords" >Public Keywords: </label>
|
||||
<input type="text" size="32" name="pubkeywords" id="profile-edit-pubkeywords" title="Example: fishing photography software" value="$pub_keywords" />
|
||||
</div><div id="profile-edit-pubkeywords-desc">(Used for suggesting potential friends, can be seen by others)</div>
|
||||
<div id="profile-edit-pubkeywords-end"></div>
|
||||
|
||||
<div id="profile-edit-prvkeywords-wrapper" >
|
||||
<label id="profile-edit-prvkeywords-label" for="profile-edit-prvkeywords" >Private Keywords: </label>
|
||||
<input type="text" size="32" name="prvkeywords" id="profile-edit-prvkeywords" title="Example: fishing photography software" value="$prv_keywords" />
|
||||
</div><div id="profile-edit-prvkeywords-desc">(Used for searching profiles, never shown to others)</div>
|
||||
<div id="profile-edit-prvkeywords-end"></div>
|
||||
|
||||
|
||||
<div class="profile-edit-submit-wrapper" >
|
||||
|
|
|
@ -134,11 +134,17 @@ $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 id="profile-edit-pubkeywords-wrapper" >
|
||||
<label id="profile-edit-pubkeywords-label" for="profile-edit-pubkeywords" >Public Keywords: </label>
|
||||
<input type="text" size="32" name="pub_keywords" id="profile-edit-pubkeywords" title="Example: fishing photography software" value="$pub_keywords" />
|
||||
</div><div id="profile-edit-pubkeywords-desc">(Used for suggesting potential friends, can be seen by others)</div>
|
||||
<div id="profile-edit-pubkeywords-end"></div>
|
||||
|
||||
<div id="profile-edit-prvkeywords-wrapper" >
|
||||
<label id="profile-edit-prvkeywords-label" for="profile-edit-prvkeywords" >Private Keywords: </label>
|
||||
<input type="text" size="32" name="prv_keywords" id="profile-edit-prvkeywords" title="Example: fishing photography software" value="$prv_keywords" />
|
||||
</div><div id="profile-edit-prvkeywords-desc">(Used for searching profiles, never shown to others)</div>
|
||||
<div id="profile-edit-prvkeywords-end"></div>
|
||||
|
||||
|
||||
<div class="profile-edit-submit-wrapper" >
|
||||
|
|
|
@ -134,11 +134,17 @@ $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 id="profile-edit-pubkeywords-wrapper" >
|
||||
<label id="profile-edit-pubkeywords-label" for="profile-edit-pubkeywords" >Public Keywords: </label>
|
||||
<input type="text" size="32" name="pub_keywords" id="profile-edit-pubkeywords" title="Example: fishing photography software" value="$pub_keywords" />
|
||||
</div><div id="profile-edit-pubkeywords-desc">(Used for suggesting potential friends, can be seen by others)</div>
|
||||
<div id="profile-edit-pubkeywords-end"></div>
|
||||
|
||||
<div id="profile-edit-prvkeywords-wrapper" >
|
||||
<label id="profile-edit-prvkeywords-label" for="profile-edit-prvkeywords" >Private Keywords: </label>
|
||||
<input type="text" size="32" name="prv_keywords" id="profile-edit-prvkeywords" title="Example: fishing photography software" value="$prv_keywords" />
|
||||
</div><div id="profile-edit-prvkeywords-desc">(Used for searching profiles, never shown to others)</div>
|
||||
<div id="profile-edit-prvkeywords-end"></div>
|
||||
|
||||
|
||||
<div class="profile-edit-submit-wrapper" >
|
||||
|
|
|
@ -134,11 +134,17 @@ $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" >Parole chiave: </label>
|
||||
<input type="text" size="32" name="keywords" id="profile-edit-keywords" title="Esempio: pescare fotografia software" value="$keywords" />
|
||||
</div><div id="profile-edit-keywords-desc">(Usati per la ricerca dei profili pubblci, mai mostrati agli altri)</div>
|
||||
<div id="profile-edit-keywords-end"></div>
|
||||
<div id="profile-edit-pubkeywords-wrapper" >
|
||||
<label id="profile-edit-pubkeywords-label" for="profile-edit-pubkeywords" >[Public] Parole chiave: </label>
|
||||
<input type="text" size="32" name="pub_keywords" id="profile-edit-pubkeywords" title="Esempio: pescare fotografia software" value="$pub_keywords" />
|
||||
</div><div id="profile-edit-pubkeywords-desc">(Used for suggesting potential friends, can be seen by others)</div>
|
||||
<div id="profile-edit-pubkeywords-end"></div>
|
||||
|
||||
<div id="profile-edit-prvkeywords-wrapper" >
|
||||
<label id="profile-edit-prvkeywords-label" for="profile-edit-prvkeywords" >Parole chiave: </label>
|
||||
<input type="text" size="32" name="prv_keywords" id="profile-edit-prvkeywords" title="Esempio: pescare fotografia software" value="$prv_keywords" />
|
||||
</div><div id="profile-edit-prvkeywords-desc">(Usati per la ricerca dei profili, mai mostrati agli altri)</div>
|
||||
<div id="profile-edit-prvkeywords-end"></div>
|
||||
|
||||
|
||||
<div class="profile-edit-submit-wrapper" >
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue