Skip to content

Commit

Permalink
#870 Add Me section, based on profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Sep 25, 2014
1 parent 796a768 commit 6fa0025
Show file tree
Hide file tree
Showing 3 changed files with 853 additions and 1 deletion.
25 changes: 25 additions & 0 deletions include/me_functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/*
* Copyright (C) 2013-2014 Luna
* License: http://opensource.org/licenses/MIT MIT
*/

// Display the me navigation
function load_me_nav($page = '') {
global $lang, $luna_config, $luna_user, $id;

?>
<div class="list-group">
<a class="<?php if ($page == 'view') echo 'active'; ?> list-group-item" href="profile.php?section=view&amp;id=<?php echo $id ?>"><?php echo $lang['Profile'] ?></a>
<?php if ($luna_user['id'] == $id && !$luna_user['is_guest'] || ($luna_user['g_id'] == FORUM_ADMIN || ($luna_user['g_moderator'] == '1' && $luna_user['g_mod_ban_users'] == '1'))): ?>
<a class="<?php if ($page == 'personality') echo 'active'; ?> list-group-item" href="profile.php?section=personality&amp;id=<?php echo $id ?>"><?php echo $lang['Section personality'] ?></a>
<a class="<?php if ($page == 'settings') echo 'active'; ?> list-group-item" href="profile.php?section=settings&amp;id=<?php echo $id ?>"><?php echo $lang['Settings'] ?></a>
<?php if ($luna_user['g_id'] == FORUM_ADMIN || ($luna_user['g_moderator'] == '1' && $luna_user['g_mod_ban_users'] == '1')): ?>
<a class="<?php if ($page == 'admin') echo 'active'; ?> list-group-item" href="profile.php?section=admin&amp;id=<?php echo $id ?>"><?php echo $lang['Section admin'] ?></a>
<?php endif; ?>
<?php endif; ?>
</div>
<?php

}
2 changes: 1 addition & 1 deletion include/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Version {
const FORUM_VERSION = '0.0-dev';

// The Luna Core version
const FORUM_CORE_VERSION = '0.0.40.3048';
const FORUM_CORE_VERSION = '0.0.40.3049';

// The database version number, every change in the database requires this number to go one up
const FORUM_DB_VERSION = 84.15;
Expand Down
Loading

0 comments on commit 6fa0025

Please sign in to comment.