diff options
author | Friendika <info@friendika.com> | 2011-11-01 21:27:11 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-11-01 21:27:11 -0700 |
commit | e38aa672635245cf3730fc88bbe8d36a6ecaef22 (patch) | |
tree | 8328f8d6f1ef29232228009b1bf55e792562cafb | |
parent | 158028a0ac00e388347ac366c88ad07c0fe4bfb9 (diff) | |
download | volse-hubzilla-e38aa672635245cf3730fc88bbe8d36a6ecaef22.tar.gz volse-hubzilla-e38aa672635245cf3730fc88bbe8d36a6ecaef22.tar.bz2 volse-hubzilla-e38aa672635245cf3730fc88bbe8d36a6ecaef22.zip |
link suggestions into the main code
-rw-r--r-- | include/contact_widgets.php | 2 | ||||
-rw-r--r-- | include/socgraph.php | 3 | ||||
-rw-r--r-- | mod/suggest.php | 5 | ||||
-rw-r--r-- | view/peoplefind.tpl | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php index efb833aaf..3a21ff2c6 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -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 )); } + diff --git a/include/socgraph.php b/include/socgraph.php index 04e9a9a64..b9f53d6a6 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -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) diff --git a/mod/suggest.php b/mod/suggest.php index f8b898126..2d2a32938 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -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>'; diff --git a/view/peoplefind.tpl b/view/peoplefind.tpl index 4b3f01b88..eeae2a29a 100644 --- a/view/peoplefind.tpl +++ b/view/peoplefind.tpl @@ -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 }} |