Hello Guest
No Avatar
Profile of napalm  »  
Show Posts  »  
Sign In to Remove

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - napalm

Pages: [1]
Posts: 
2
Posted: March 18, 2014, 11:46 PM
Hello,

Your Pulse theme layout looks very nice although I do not agree with the use of a separate array to contain the forum nav links. This obviously does not work well with other custom mods that add navigation links to ones SMF installation. The Subs.php file is already loaded by default and I believe the setupMenuContext() along with it.

With the example below I will include the setupMenuContext() function call although I do not believe it to be necessary (already loaded).
My suggestion is to use the existing SMF array contained in the $context['menu_buttons'] global array to fill your $vp_nav_bar_items array with the necessary titles and url's.

ie. file: /Themes/Pulse1-0-2-0-RC5/index.template.php
find:
Code: [Select]
$vp_nav_bar_items = array
(
array
(
'Title' => $txt['vp_forums'],
'Link' => $scripturl
),
array
(
'Title' => $txt['vp_help'],
'Link' => "$scripturl?action=help"
),

array
(
'Title' => $txt['vp_search'],
'Link' => "$scripturl?action=search"
),
array
(
'Title' => $txt['vp_messages'],
'Link' => "$scripturl?action=pm"
),
array
(
'Title' => $txt['vp_profile'],
'Link' => "$scripturl?action=profile"
),
array
(
'Title' => $txt['vp_members'],
'Link' => "$scripturl?action=mlist"
),
array
(
'Title' => $admin_title,
'Link' => $admin_link
),
array
(
'Title' => $moderate_title,
'Link' => $moderate_link
),
array
(
'Title' => $sign_in_title,
'Link' => $sign_in_link
),
array
(
'Title' => $sign_out_title,
'Link' => $sign_out_link
),
);

replace with:
Code: [Select]
setupMenuContext();
foreach ($context['menu_buttons'] as $buttons)
{
if ($buttons['show'])
$vp_nav_bar_items[] = array(
'Title' => $buttons['title'],
'Link' => $buttons['href'],
);
}

Unfortunately without other substantial changes, the sub buttons are ignored however other themes such as core also behave like this.

Regards.
Pages: [1]
anything