From cb1c6dd1e37ccbbea47867faf0142e5d2f653624 Mon Sep 17 00:00:00 2001 From: Devlon Duthie Date: Sun, 25 Sep 2011 13:20:19 -0500 Subject: really commiting files this time, still getting the hang of git. some images added, some classes added to groupidebar, contacts sidebar notification flags moved out of nav and into banner for testbubble the testbubble css tweaks --- mod/contacts.php | 11 +++-- mod/network.php | 136 ++++++++++++++++++++++++++++++++++--------------------- mod/photos.php | 11 +++-- 3 files changed, 98 insertions(+), 60 deletions(-) (limited to 'mod') diff --git a/mod/contacts.php b/mod/contacts.php index 307e9b15b..24613a994 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -36,15 +36,16 @@ function contacts_init(&$a) { elseif($a->config['register_policy'] != REGISTER_CLOSED) $a->page['aside'] .= $inv; - - $a->page['aside'] .= ''; - $tpl = get_markup_template('follow.tpl'); + + $findSimilarLink = ''; + $a->page['aside'] .= replace_macros($tpl,array( '$label' => t('Connect/Follow'), '$hint' => t('Example: bob@example.com, http://example.com/barbara'), - '$follow' => t('Follow') + '$follow' => t('Follow'), + '$findSimilar' => $findSimilarLink )); diff --git a/mod/network.php b/mod/network.php index dd22e7d5b..927f7b24e 100644 --- a/mod/network.php +++ b/mod/network.php @@ -17,12 +17,12 @@ function network_init(&$a) { // We need a better way of managing a growing argument list - $srchurl = '/network' - . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') - . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') - . ((x($_GET,'order')) ? '?order=' . $_GET['order'] : '') - . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); - + // moved into savedsearches() + // $srchurl = '/network' + // . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') + // . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') + // . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); + if(x($_GET,'save')) { $r = q("select * from `search` where `uid` = %d and `term` = '%s' limit 1", intval(local_user()), @@ -42,76 +42,110 @@ function network_init(&$a) { ); } - $a->page['aside'] .= search($search,'netsearch-box',$srchurl,true); - - $a->page['aside'] .= ''; - + + if(x($_GET,'star')) { + $starred_active = 'active'; + } + + if($_GET['bmark']) { + $bookmarked_active = 'active'; + } + + if (($new_active == '') + && ($starred_active == '') + && ($bookmarked_active == '') + && ($search_active == '')) { + $all_active = 'active'; + } + + // network links moved to content to match other pages + // all + $a->page['content'] .= '' + . t('All') . ''; + + // new + $a->page['content'] .= '' + . t('New') . ''; + + // starred + $a->page['content'] .= '' + . t('Starred') . ''; + + // bookmarks + $a->page['content'] .= '' + . t('Bookmarks') . ''; + + $a->page['content'] .= ''; + // --- end item filter tabs + + // search terms header + if(x($_GET,'search')) { + $a->page['content'] .= '

Search Results For: ' . $search . '

'; + } + $a->page['aside'] .= group_side('network','network',true,$group_id); + + // moved to saved searches to have it in the same div + //$a->page['aside'] .= search($search,'netsearch-box',$srchurl,true); - $a->page['aside'] .= saved_searches(); + $a->page['aside'] .= saved_searches($search); } -function saved_searches() { +function saved_searches($search) { + $srchurl = '/network' + . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') + . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') + . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); + $o = ''; $r = q("select `term` from `search` WHERE `uid` = %d", intval(local_user()) ); + $o .= '
'; + $o .= '' . "\r\n"; + $o .= search($search,'netsearch-box',$srchurl,true); + if(count($r)) { - $o .= '

' . t('Saved Searches') . '

' . "\r\n"; - $o .= '
    ' . "\r\n"; + $o .= '
' . "\r\n"; + $o .= ''; } + $o .= '
' . "\r\n"; return $o; } - - function network_content(&$a, $update = 0) { require_once('include/conversation.php'); diff --git a/mod/photos.php b/mod/photos.php index 7141919b0..cb7df15cc 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -33,11 +33,14 @@ function photos_init(&$a) { if(count($albums)) { $a->data['albums'] = $albums; - $o .= '

' . $a->data['user']['username'] . '

'; + $o .= '
'; + $o .= '
' . $a->data['user']['username'] . ''; $o .= '
' . $a->data['user']['username'] . '
'; - - $o .= '

' . '' . t('Photo Albums') . '

'; - + $o .= '
'; + + $o .= '