diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-19 01:44:33 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-19 01:44:33 +0000 |
commit | abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c (patch) | |
tree | 2f243448b156eb97b1b27a2efa38d791c1227bc5 /mod/tabbed_profile/views/default/profile/tab_navigation.php | |
parent | fea009129f49f4f8d51654ceb569aae04387077b (diff) | |
download | elgg-abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c.tar.gz elgg-abf3fcae3f90b4c52e40d3ef8bb11f92c7a03d1c.tar.bz2 |
rough widget profile plugin
git-svn-id: http://code.elgg.org/elgg/trunk@7676 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/tabbed_profile/views/default/profile/tab_navigation.php')
-rwxr-xr-x | mod/tabbed_profile/views/default/profile/tab_navigation.php | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/mod/tabbed_profile/views/default/profile/tab_navigation.php b/mod/tabbed_profile/views/default/profile/tab_navigation.php new file mode 100755 index 000000000..ca0873ebd --- /dev/null +++ b/mod/tabbed_profile/views/default/profile/tab_navigation.php @@ -0,0 +1,68 @@ +<?php + +$section = 'activity'; +if (isset($vars['section'])) { + $section = $vars['section']; +} + +$user = $vars['entity']; +if (!$user) { + // no user so no profile + echo elgg_echo('viewfailure', array(__FILE__)); + return TRUE; +} + + +$activity = ''; +$friends = ''; +$extend = ''; +$twitter = ''; + +$url = "{$user->getURL()}/"; + +//select section +switch($section){ + case 'friends': + $friends = 'class="selected"'; + break; + + case 'details': + $details = 'class="selected"'; + break; + case 'groups': + $groups = 'class="selected"'; + break; + case 'twitter': + $twitter = 'class="selected"'; + break; + + case 'commentwall': + $commentwall = 'class="selected"'; + break; + case 'activity': + default: + $activity = 'class="selected"'; + break; +} +?> +<div class="elgg-horizontal-tabbed-nav profile"> +<div class="profile_name"><h2><?php echo $user->name; ?></h2></div> +<ul> + <li <?php echo $activity; ?>><a href="<?php echo $url; ?>"><?php echo elgg_echo('activity'); ?></a></li> + <li <?php echo $details; ?>><a href="<?php echo $url . 'details'; ?>"><?php echo elgg_echo('Details'); ?></a></li> + <li <?php echo $friends; ?>><a href="<?php echo $url . 'friends'; ?>"><?php echo elgg_echo('friends'); ?></a></li> + <li <?php echo $groups; ?>><a href="<?php echo $url . 'groups'; ?>"><?php echo elgg_echo('groups'); ?></a></li> + <li <?php echo $commentwall; ?>><a href="<?php echo $url . 'commentwall'; ?>"><?php echo elgg_echo('profile:commentwall'); ?></a></li> + <?php + //check to see if the twitter username is set + if($vars['entity']->twitter){ + ?> + <li <?php echo $twitter; ?>><a href="<?php echo $url . 'twitter'; ?>">Twitter</a></li> + <?php + } + + //insert a view which others can extend + echo elgg_view('profile_navigation/extend', array('entity' => $user)); + ?> +</ul> +</div>
\ No newline at end of file |