aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirfind.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-11 18:24:37 -0700
committerFriendika <info@friendika.com>2011-10-11 18:24:37 -0700
commit557a7d0cec31a36d12898429c479c71671833dfd (patch)
treeab1781533e91b63b86a2ef726c65092ad8009efb /mod/dirfind.php
parentcaf18164f0f7bd336e61d4393dabf6d93c739879 (diff)
downloadvolse-hubzilla-557a7d0cec31a36d12898429c479c71671833dfd.tar.gz
volse-hubzilla-557a7d0cec31a36d12898429c479c71671833dfd.tar.bz2
volse-hubzilla-557a7d0cec31a36d12898429c479c71671833dfd.zip
stuff
- background the external network notifications (Facebook, Twitter, Statusnet) - add vimeo support - consolidate editor video options (insert video, regardless of source) - add "Connector Settings" page purely for configuring connectors - moved mailbox settings to Connectors - Move the "Connect/Follow" dialogue out of "find people" and move to top. - Add "Find People" dialogue - minor theme edits on duepuntozero and testbubble to make all this stuff work - A bit of theming on duepunto notifications to eliminate the gigantic Diaspora profile photos.
Diffstat (limited to 'mod/dirfind.php')
-rw-r--r--mod/dirfind.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/mod/dirfind.php b/mod/dirfind.php
new file mode 100644
index 000000000..2d8479043
--- /dev/null
+++ b/mod/dirfind.php
@@ -0,0 +1,52 @@
+<?php
+
+
+function dirfind_content(&$a) {
+
+ $search = notags(trim($_REQUEST['search']));
+
+ $o = '';
+
+ $o .= '<h2>' . t('People Search') . ' - ' . $search . '</h2>';
+
+ if($search) {
+
+ $p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
+
+ if(strlen(get_config('system','directory_submit_url')))
+ $x = fetch_url('http://dir.friendika.com/lsearch?f=' . $p . '&search=' . urlencode($search));
+
+//TODO fallback local search if global dir not available.
+// else
+// $x = post_url($a->get_baseurl() . '/lsearch', $params);
+
+ $j = json_decode($x);
+
+ if($j->total) {
+ $a->set_pager_total($j->total);
+ $a->set_pager_itemspage($j->items_page);
+ }
+
+ if(count($j->results)) {
+
+ $tpl = get_markup_template('match.tpl');
+ foreach($j->results as $jj) {
+
+ $o .= replace_macros($tpl,array(
+ '$url' => $jj->url,
+ '$name' => $jj->name,
+ '$photo' => $jj->photo,
+ '$tags' => $jj->tags
+ ));
+ }
+ }
+ else {
+ info( t('No matches') . EOL);
+ }
+
+ }
+
+ $o .= '<div class="clear"></div>';
+ $o .= paginate($a);
+ return $o;
+}