]> git.mxchange.org Git - friendica.git/commitdiff
link suggestions into the main code
authorFriendika <info@friendika.com>
Wed, 2 Nov 2011 04:27:11 +0000 (21:27 -0700)
committerFriendika <info@friendika.com>
Wed, 2 Nov 2011 04:27:11 +0000 (21:27 -0700)
include/contact_widgets.php
include/socgraph.php
mod/suggest.php
view/peoplefind.tpl

index efb833aafcb5cabc6e8f26ac5a152c305cc2eefe..3a21ff2c6ff54edab709686c32a30ab7e5c1de33 100644 (file)
@@ -32,9 +32,11 @@ function findpeople_widget() {
                '$label' => t('Connect/Follow'),
                '$hint' => t('Examples: Robert Morgenstein, Fishing'),
                '$findthem' => t('Find'),
+               '$suggest' => t('Friend Suggestions'),
                '$similar' => t('Similar Interests'),
                '$inv' => $inv
        ));
 
 }
 
+
index 04e9a9a64b1cd41b625e7d2922b6877c013bce05..b9f53d6a6d0c0862d49814547d1f7d998363fdc4 100644 (file)
@@ -165,6 +165,9 @@ function common_friends($uid,$cid) {
 
 function suggestion_query($uid, $start = 0, $limit = 40) {
 
+       if(! $uid)
+               return array();
+
        $r = q("SELECT count(glink.gcid) as `total`, gcontact.* from gcontact 
                left join glink on glink.gcid = gcontact.id 
                where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d)
index f8b8981263bf5ded0de4fecc1398951b5745991d..2d2a329388ffafc0914c32ba57d984f4bf6c1c37 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 require_once('include/socgraph.php');
+require_once('include/contact_widgets.php');
 
 function suggest_content(&$a) {
 
@@ -10,6 +11,10 @@ function suggest_content(&$a) {
                return;
        }
 
+       $a->page['aside'] .= follow_widget();
+       $a->page['aside'] .= findpeople_widget();
+
+
        $o .= '<h2>' . t('Friend Suggestions') . '</h2>';
 
 
index 4b3f01b882696cc3f367f0f637a36fbd3cf31a70..eeae2a29af4ceee4d62df5a7e7cb6e53bdcb212a 100644 (file)
@@ -5,6 +5,7 @@
                <input id="side-peoplefind-url" type="text" name="search" size="24" title="$hint" /><input id="side-peoplefind-submit" type="submit" name="submit" value="$findthem" />
        </form>
        <div class="side-link" id="side-match-link"><a href="match" >$similar</a></div>
+       <div class="side-link" id="side-suggest-link"><a href="suggest" >$suggest</a></div>
        {{ if $inv }} 
        <div class="side-link" id="side-invite-link" ><a href="invite" >$inv</a></div>
        {{ endif }}