]> git.mxchange.org Git - friendica.git/blobdiff - mod/profiles.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / mod / profiles.php
index a9da5454cf787ae4674b77d4ecc96defaa20e91d..975a8c21273278677be43fbe812959f5bd0f0ebb 100644 (file)
@@ -130,6 +130,9 @@ function profiles_post(&$a) {
                $politic = notags(trim($_POST['politic']));
                $religion = notags(trim($_POST['religion']));
 
+               $likes = fix_mce_lf(escape_tags(trim($_POST['likes'])));
+               $dislikes = fix_mce_lf(escape_tags(trim($_POST['dislikes'])));
+
                $about = fix_mce_lf(escape_tags(trim($_POST['about'])));
                $interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
                $contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
@@ -155,7 +158,15 @@ function profiles_post(&$a) {
                        if($withchanged) {
                                $changes[] = '[color=#ff0000]♥[/color] ' . t('Romantic Partner');
                                $value = strip_tags($with);
-                       }                                                       
+                       }
+                       if($likes != $orig[0]['likes']) {
+                               $changes[] = t('Likes');
+                               $value = $likes;
+                       }
+                       if($dislikes != $orig[0]['dislikes']) {
+                               $changes[] = t('Dislikes');
+                               $value = $dislikes;
+                       }
                        if($work != $orig[0]['work']) {
                                $changes[] = t('Work/Employment');
                        }
@@ -222,6 +233,8 @@ function profiles_post(&$a) {
                        `religion` = '%s',
                        `pub_keywords` = '%s',
                        `prv_keywords` = '%s',
+                       `likes` = '%s',
+                       `dislikes` = '%s',
                        `about` = '%s',
                        `interest` = '%s',
                        `contact` = '%s',
@@ -254,6 +267,8 @@ function profiles_post(&$a) {
                        dbesc($religion),
                        dbesc($pub_keywords),
                        dbesc($prv_keywords),
+                       dbesc($likes),
+                       dbesc($dislikes),
                        dbesc($about),
                        dbesc($interest),
                        dbesc($contact),
@@ -370,9 +385,17 @@ function profile_activity($changed, $value) {
        $arr['deny_gid']  = $a->user['deny_gid'];
 
        $i = item_store($arr);
-       if($i)
+       if($i) {
+
+               // give it a permanent link
+               q("update item set plink = '%s' where id = %d limit 1",
+                       dbesc($a->get_baseurl() . '/display/' . $a->user['nickname'] . '/' . $i),
+                       intval($i)
+               );
+
                proc_run('php',"include/notifier.php","activity","$i");
 
+       }
 }
 
 
@@ -523,6 +546,10 @@ function profiles_content(&$a) {
                        '$baseurl' => $a->get_baseurl(true),
                        '$editselect' => $editselect,
                ));
+               $a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
+                       '$baseurl' => $a->get_baseurl(true),
+                       '$editselect' => $editselect,
+               ));
 
 
                $opt_tpl = get_markup_template("profile-hide-friends.tpl");
@@ -534,9 +561,6 @@ function profiles_content(&$a) {
                        '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
                ));
 
-               $a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
-
-
 
 
 
@@ -577,6 +601,8 @@ function profiles_content(&$a) {
                        '$lbl_religion' => t('Religious Views:'),
                        '$lbl_pubkey' => t('Public Keywords:'),
                        '$lbl_prvkey' => t('Private Keywords:'),
+                       '$lbl_likes' => t('Likes:'),
+                       '$lbl_dislikes' => t('Dislikes:'),
                        '$lbl_ex2' => t('Example: fishing photography software'),
                        '$lbl_pubdsc' => t("\x28Used for suggesting potential friends, can be seen by others\x29"),
                        '$lbl_prvdsc' => t("\x28Used for searching profiles, never shown to others\x29"),
@@ -617,6 +643,8 @@ function profiles_content(&$a) {
                        '$religion' => $r[0]['religion'],
                        '$pub_keywords' => $r[0]['pub_keywords'],
                        '$prv_keywords' => $r[0]['prv_keywords'],
+                       '$likes' => $r[0]['likes'],
+                       '$dislikes' => $r[0]['dislikes'],
                        '$music' => $r[0]['music'],
                        '$book' => $r[0]['book'],
                        '$tv' => $r[0]['tv'],