Hello Guest
No Avatar
Sign In to Remove
Posts: 
2
Reputation: 
0
Posted: March 18, 2014, 11:46 PM  -- Last Edit: March 19, 2014, 1:18 AM by MLM
  • Group: Member
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.
Posts: 
400
Reputation: 
20
Posted: March 19, 2014, 1:15 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
I agree that this is how it should work. To quote something I wrote in a previous post:

Pulse was my very first theme released. I realize that there are many flaws with all three of my themes. Those themes were made 3 years ago and I have grown as a developer working on other projects and just haven't had the time or desire to go back update them to my new level of standards.
<3 Nerve, Sk8, Labradoodle, Austin