From a5eeff1b3f49bda5e258385c8a1896dab9595573 Mon Sep 17 00:00:00 2001 From: Seth Meranda <smeranda2@unl.edu> Date: Thu, 30 Sep 2010 13:49:50 +0000 Subject: [PATCH] check if user is on the elgg login page, and if so don't display the action bar. --- .../views/default/page_elements/unl_nav.php | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/plugins/unl_theme/views/default/page_elements/unl_nav.php b/plugins/unl_theme/views/default/page_elements/unl_nav.php index dbce7cc1..0b8a5445 100644 --- a/plugins/unl_theme/views/default/page_elements/unl_nav.php +++ b/plugins/unl_theme/views/default/page_elements/unl_nav.php @@ -12,13 +12,27 @@ return ' class="selected"'; } } + + function inURL($needle) + { + if (stristr($_SERVER['REQUEST_URI'], $needle)) { + return true; + } else { + return false; + } + } ?> +<?php + +?> <?php if (!isloggedin()) : - echo '<div id="actionBar" class="casLogin">'; - echo elgg_view('account/forms/login'); - echo '</div>'; + if (!inURL('pg/login')) : + echo '<div id="actionBar" class="casLogin">'; + echo elgg_view('account/forms/login'); + echo '</div>'; + endif; else : ?> <ul class="wdn_tabs disableSwitching"> @@ -83,8 +97,4 @@ </form> </div> <?php endif; ?> - - - - <div class="clear"></div> \ No newline at end of file -- GitLab