diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-11 02:52:47 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-11 02:52:47 -0700 |
commit | 7a21a000a2b02e7dd443fd0f3ee09172de825b08 (patch) | |
tree | a73734b36b404da7f3028a12c5e10e2a3a7a35fa /include | |
parent | a42c9616f97125b059f395b9b023fe1516a52d75 (diff) | |
download | volse-hubzilla-7a21a000a2b02e7dd443fd0f3ee09172de825b08.tar.gz volse-hubzilla-7a21a000a2b02e7dd443fd0f3ee09172de825b08.tar.bz2 volse-hubzilla-7a21a000a2b02e7dd443fd0f3ee09172de825b08.zip |
lots of little stuff
Diffstat (limited to 'include')
-rw-r--r-- | include/group.php | 34 | ||||
-rw-r--r-- | include/nav.php | 6 |
2 files changed, 39 insertions, 1 deletions
diff --git a/include/group.php b/include/group.php index e92e4480b..598d09c2e 100644 --- a/include/group.php +++ b/include/group.php @@ -25,7 +25,7 @@ function group_rmv($uid,$name) { $r = q("SELECT * FROM `group` WHERE `uid` = %d AND `name` = '%s' LIMIT 1", intval($uid), dbesc($name) - } + ); if(count($r)) $group_id = $r[0]['id']; if(! $group_id) @@ -102,4 +102,36 @@ function group_add_member($uid,$name,$member) { intval($member) ); return $r; +} + + + +function group_side() { + + if(! local_user()) + return; +$o .= <<< EOT + +<div id="group-sidebar"> +<h3>Groups</h3> + +<div id="sidebar-new-group"> +<a href="group/new">Create a new group</a> +</div> + +<div id="sidebar-group-list"> +<ul id="sidebar-group-ul"> +<li class="sidebar-group-li"><a href="contacts">Everybody</a></li> +EOT; + + $r = q("SELECT * FROM `group` WHERE `uid` = %d", + intval($_SESSION['uid']) + ); + if(count($r)) { + foreach($r as $rr) + $o .= "<li class=\"sidebar-group-li\"><a href=\"group/{$rr['id']}\">{$rr['name']}</li>"; + } + $o .= '</ul></div></div>'; + + return $o; }
\ No newline at end of file diff --git a/include/nav.php b/include/nav.php index c51c56ad2..d24abd4ac 100644 --- a/include/nav.php +++ b/include/nav.php @@ -2,6 +2,11 @@ <?php $a->page['nav'] .= "<span id=\"nav-link-wrapper\" >\r\n"; + if(($a->module != 'home') && (! (x($_SESSION['uid'])))) + $a->page['nav'] .= "<a id=\"nav-home-link\" class=\"nav-commlink\" href=\"\">Home</a>\r\n"; + + $a->page['nav'] .= "<a id=\"nav-directory-link\" class=\"nav-commlink\" href=\"directory\">Site Directory</a>\r\n"; + if(x($_SESSION,'uid')) { $a->page['nav'] .= "<a id=\"nav-notify-link\" class=\"nav-commlink\" href=\"notifications\">Notifications</a>\r\n"; @@ -20,4 +25,5 @@ $a->page['nav'] .= "<a id=\"nav-home-link\" class=\"nav-link\" href=\"profile/{$_SESSION['uid']}\">Home</a>\r\n"; } + $a->page['nav'] .= "</span>\r\n<span id=\"nav-end\"></span>\r\n"; |