]> git.mxchange.org Git - friendica.git/commitdiff
add connect link to suggestion and matches
authorfriendica <info@friendica.com>
Sun, 18 Dec 2011 09:44:46 +0000 (01:44 -0800)
committerfriendica <info@friendica.com>
Sun, 18 Dec 2011 09:44:46 +0000 (01:44 -0800)
mod/match.php
mod/suggest.php
view/match.tpl
view/suggest_friends.tpl
view/theme/duepuntozero/style.css

index c33bbd5c2de7b5d9deaec1463df9fdb95252bf63..9324624c840cc37504f17bb607ab87d523389812 100644 (file)
@@ -7,6 +7,8 @@ function match_content(&$a) {
        if(! local_user())
                return;
 
+       $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
+
        $o .= '<h2>' . t('Profile Match') . '</h2>';
 
        $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
@@ -41,14 +43,19 @@ function match_content(&$a) {
                }
 
                if(count($j->results)) {
+
+
                        
                        $tpl = get_markup_template('match.tpl');
                        foreach($j->results as $jj) {
                                
+                               $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
                                $o .= replace_macros($tpl,array(
                                        '$url' => $jj->url,
                                        '$name' => $jj->name,
                                        '$photo' => $jj->photo,
+                                       '$conntxt' => t('Connect'),
+                                       '$connlnk' => $connlnk,
                                        '$tags' => $jj->tags
                                ));
                        }
index bbffe8fb0f62cbb8ea3ca9af0c7c3f9b0bd7a211..b8ca423c5ae2a0a0a5acbad99351bfce946e6689 100644 (file)
@@ -29,6 +29,8 @@ function suggest_content(&$a) {
                return;
        }
 
+       $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
+
        $a->page['aside'] .= follow_widget();
        $a->page['aside'] .= findpeople_widget();
 
@@ -47,7 +49,7 @@ function suggest_content(&$a) {
 
        foreach($r as $rr) {
 
-               $connlink = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);                     
+               $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);                      
 
                $o .= replace_macros($tpl,array(
                        '$url' => $rr['url'],
index 330245a2ae2dd33ade840dbebededd8d9b7c1076..5f2fc7a302f1b4b0d109edff5660fa07e03981a2 100644 (file)
@@ -9,4 +9,8 @@
                <a href="$url" title="$name[$tags]">$name</a>
        </div>
        <div class="profile-match-end"></div>
+       {{ if $connlnk }}
+       <div class="profile-match-connect"><a href="$connlnk" title="$conntxt">$conntxt</a></div>
+       {{ endif }}
+
 </div>
\ No newline at end of file
index c66cdd65d10d939a6fb00ed57bc3f4a3d342138a..e97b5e8cce37944cb46727544d04bec92c3f911b 100644 (file)
@@ -9,8 +9,8 @@
        <div class="profile-match-name">
                <a href="$url" title="$name">$name</a>
        </div>
+       <div class="profile-match-end"></div>
        {{ if $connlnk }}
        <div class="profile-match-connect"><a href="$connlnk" title="$conntxt">$conntxt</a></div>
        {{ endif }}
-       <div class="profile-match-end"></div>
 </div>
\ No newline at end of file
index 1127f114510a6db15b401c91715ff8093e9a40f6..c6582d06855c652ba8dc05e85679462a9380b52d 100644 (file)
@@ -2383,6 +2383,11 @@ aside input[type='text'] {
        clear: both;
 }
 
+.profile-match-connect {
+       text-align: center;
+       font-weight: bold;
+}
+
 .profile-match-wrapper {
        float: left;
        padding: 10px;