Commit e7fa2f90 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Allow footer links to be disabled in config.php


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent d54195f6
......@@ -388,6 +388,7 @@ EOF;
get_string_from_language(get_config('lang'), 'thislanguage') . ')');
$smarty->assign('LANGUAGES', get_languages());
}
$smarty->assign('FOOTERMENU', footer_menu());
$smarty->assign_by_ref('USER', $USER);
$smarty->assign('SESSKEY', $USER->get('sesskey'));
......@@ -1997,6 +1998,35 @@ function right_nav() {
return $menu_structure;
}
function footer_menu() {
$menu = array(
'termsandconditions' => array(
'url' => 'terms.php',
'title' => get_string('termsandconditions'),
),
'privacystatement' => array(
'url' => 'privacy.php',
'title' => get_string('privacystatement'),
),
'about' => array(
'url' => 'about.php',
'title' => get_string('about'),
),
'contactus' => array(
'url' => 'contact.php',
'title' => get_string('contactus'),
),
);
if ($disabled = get_config('hidefooterlinks')) {
foreach (split(',', $disabled) as $k) {
unset($menu[$k]);
}
}
return $menu;
}
/**
* Given a menu structure and a path, returns a data structure representing all
* of the child menu items of the path, and removes those items from the menu
......
......@@ -21,10 +21,11 @@
support the Mahara project. Support us and we'll
support you! If you remove this image and link, you
may not receive support in the Mahara forums -->
<div id="footernav"><a href="{$WWWROOT}terms.php">{str tag=termsandconditions}</a> |
<a href="{$WWWROOT}privacy.php">{str tag=privacystatement}</a> |
<a href="{$WWWROOT}about.php">{str tag=about}</a> |
<a href="{$WWWROOT}contact.php">{str tag=contactus}</a></div>
<div id="footernav">
{foreach from=$FOOTERMENU item=item name=footermenu}
{if !$.foreach.footermenu.first}| {/if}<a href="{$WWWROOT}{$item.url}">{$item.title}</a>
{/foreach}
</div>
<div id="performance-info">{mahara_performance_info}</div>
<div id="version">{mahara_version}</div>
<div class="cb"></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment