if($selected != -1 && $selected != '' && !(arg(2) == 'give' && arg(3) == 'general-donation')) { $leaderboard_url = dw_campaigns_get_campaign_path($selected, '/dw/campaign', 'leaderboard'); } // TODO - lookup homepage campaign - this may need to be changed to be like 'leaderboard' with current $toplocations_url = '/dw/walking/toplocations'; $active = 'active-path'; $home_class = ''; $leaderboard_class = ''; $account_class = ''; $body_class = dw_campaigns_make_body_class(); if($body_class == 'dw-walking') { $home_class = $active; } elseif (arg(3) == 'leaderboard') { $leaderboard_class = $active; } elseif (arg(1) == 'user') { $account_class = $active; } elseif ($body_class == 'dw-walking-toplocations') { $toplocations_class = $active; } ?> <div class="nav-bar"> <ul> <li class="<?php echo $home_class; ?>"><a href="/dw/walking"><?php echo t('Home'); ?></a></li> <li class="<?php echo $leaderboard_class; ?>"><a href="<?php echo $leaderboard_url; ?>"><?php echo t('Leader Board'); ?></a></li>
<?php $attr['class'] .= ' ' . dw_campaigns_make_body_class(); if($tabs || $tabs2) { $attr['class'] .= ' sidebar-right'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>"> <head> <?php print $head ?> <?php print $styles ?> <?php print $scripts ?> <!--[if IE 7]> <style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/ie7.css";</style> <![endif]--> <title><?php print $head_title ?></title> </head> <body <?php print drupal_attributes($attr) ?>> <div id="navBanner"> <?php print $skipnav ?> <?php if ($help || ($show_messages && $messages)): ?> <div id='console'><div class='limiter clear-block'> <?php print $help; ?> <?php
global $options; global $selected; // lets share this with other blocks global $location_string; $no_location = FALSE; if(arg(1) == 'user') { $no_location = TRUE; } $locations = dw_campaigns_get_all_campaign_location(); $location_string = ''; $doMenu = FALSE; if(strstr(dw_campaigns_make_body_class(), 'walking-location') !== FALSE) { $selected = dw_campaigns_get_selected_location(); $doMenu = TRUE; } if(arg(1) == 'users' || arg(3) == 'leaderboard' || arg(3) == 'search') { $campaign = dw_campaigns_get_selected_campaign(); if(!is_null($campaign)) { $selected = $campaign->nid; } } if($doMenu) { if(is_null($selected)) { $selected = -1;
$derby_url = variable_get('dw_campaigns_derby_about_derby', ''); $leaderboard_url = dw_campaigns_get_campaign_path($campaign_id, '/dw/campaign', 'leaderboard'); // TODO - lookup homepage campaign $search_url = dw_campaigns_get_campaign_path($campaign_id, '/dw/campaign', 'search'); $active = 'active-path'; $home_class = ''; $leaderboard_class = ''; $account_class = ''; if(dw_campaigns_make_body_class() == 'dw-derby') { $home_class = $active; } elseif (arg(3) == 'leaderboard') { $leaderboard_class = $active; } elseif (arg(1) == 'user') { $account_class = $active; } ?> <div class="nav-bar"> <ul> <li class="<?php echo $home_class; ?>"><a href="/dw"><?php echo t('Home'); ?></a></li> <li><a href="<?php echo $about_url; ?>" target="_BLANK""><?php echo t('About PWSACO'); ?></a></li> <?php if(!empty($give_url)) { ?>