Browse Source

keywords split into public and private. Public will be used by the friend finder.

pull/1/head
Friendika 11 years ago
parent
commit
7b92b42603
  1. 3
      database.sql
  2. 2
      mod/directory.php
  3. 12
      mod/profiles.php
  4. 4
      update.php
  5. 16
      view/de/profile_edit.tpl
  6. 16
      view/en/profile_edit.tpl
  7. 16
      view/fr/profile_edit.tpl
  8. 16
      view/it/profile_edit.tpl
  9. 12
      view/theme/duepuntozero/style.css
  10. 12
      view/theme/loozah/style.css

3
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,

2
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 " );

12
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'],

4
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` ");
}

16
view/de/profile_edit.tpl

@ -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" >

16
view/en/profile_edit.tpl

@ -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" >

16
view/fr/profile_edit.tpl

@ -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" >

16
view/it/profile_edit.tpl

@ -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" >

12
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,

12
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,

Loading…
Cancel
Save