Skip to content
Permalink
Browse files

splitted start page menu in 'news' and 'opencaching'; updates #73

  • Loading branch information...
following5 committed Jul 19, 2013
1 parent 4e2d4e2 commit 21692828ee86b07118b172525dc1ee2c2a520c3f

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -169,16 +169,16 @@
'visible' => true,
'filename' => 'articles.php?page=htmltags',
'siteid' => 'articles/htmltags'
),
array(
'title' => t('My caches'),
'menustring' => t('My caches'),
'visible' => true,
'filename' => 'myhome.php#mycaches',
'siteid' => 'myhome'
)
)
),
array(
'title' => t('My caches'),
'menustring' => t('My caches'),
'visible' => true,
'filename' => 'myhome.php#mycaches',
'siteid' => 'myhome'
),
array(
'title' => t('Special caches'),
'menustring' => t('Special caches'),
@@ -215,6 +215,7 @@ function display($dummy1=null, $dummy2=null, $dummy3=null)
else
$menu->SetSelectItem($this->menuitem);
$this->assign('tplname', $this->name);
$this->assign('topmenu', $menu->getTopMenu());
$this->assign('submenu', $menu->getSubMenu());
$this->assign('breadcrumb', $menu->getBreadcrumb());
@@ -73,7 +73,7 @@ function CreateCacheFile()
$aMenu[$r['id']]['href'] = $r['href'];
$aMenu[$r['id']]['target'] = '';
}
$aMenu[$r['id']]['visible'] = ($r['visible'] == 1) ? true : false;
$aMenu[$r['id']]['visible'] = $r['visible'];
$aMenu[$r['id']]['sublevel'] = $this->pGetMenuSublevel($r['id']);
if ($r['parentid'] != 0)
@@ -168,7 +168,7 @@ function GetTopMenu()
$retval = array();
foreach ($menuitem[MNU_ROOT]['subitems'] AS $item)
{
if (($menuitem[$item]['authlevel'] != AUTH_LEVEL_ADMIN || $login->admin != 0) && $menuitem[$item]['visible'] == true)
if (($menuitem[$item]['authlevel'] != AUTH_LEVEL_ADMIN || $login->hasAdminPriv()) && ($menuitem[$item]['visible'] == 1 || ($menuitem[$item]['visible'] == 2 && !$login->logged_in())))
{
$thisitem = $menuitem[$item];
$thisitem['selected'] = isset($ids[$item]);
@@ -207,7 +207,7 @@ function pAppendSubMenu($menuid, $ids, &$items)
{
foreach ($menuitem[$menuid]['subitems'] AS $item)
{
if (($menuitem[$item]['authlevel'] != AUTH_LEVEL_ADMIN || $login->admin != 0) && $menuitem[$item]['visible'] == true)
if (($menuitem[$item]['authlevel'] != AUTH_LEVEL_ADMIN || $login->hasAdminPriv()) && ($menuitem[$item]['visible'] == 1 || ($menuitem[$item]['visible'] == 2 && !$login->logged_in())))
{
$thisitem = $menuitem[$item];
$thisitem['selected'] = isset($ids[$item]);
@@ -209,7 +209,9 @@
{* <!-- Navigation Level 3 --> *}
<div class="nav3">
<ul>
<li class="title">{t}Main menu{/t}</li>
<li class="title">
{if $tplname=='start'}{* start page hack *}{t}News{/t}{else}{t}Main menu{/t}{/if}
</li>
{nocache}
{include file="sys_submenu.tpl" items="$submenu"}
{/nocache}
@@ -6,6 +6,13 @@
{* OCSTYLE *}
{strip}
{foreach name=submenu from=$items item=menuitem}
<li class="group{$menuitem.sublevel}{if $menuitem.selected} group_active{/if}"><a href="{$menuitem.href}" {$menuitem.target}>{$menuitem.menustring|escape}</a></li>
{if $menuitem.href == ''}
{* separator headline *}
<li class="bgcolor1" style="line-height:1.5em">&nbsp;</li>
<li class="title">{$menuitem.menustring|escape}</li>
{else}
{* selectable menu option *}
<li class="group{$menuitem.sublevel}{if $menuitem.selected} group_active{/if}"><a href="{$menuitem.href}" {$menuitem.target}>{$menuitem.menustring|escape}</a></li>
{/if}
{/foreach}
{/strip}

0 comments on commit 2169282

Please sign in to comment.
You can’t perform that action at this time.