News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[1.1] How to add tabs to Core (NDT)?

Started by JayBachatero, December 31, 2005, 04:21:57 PM

Previous topic - Next topic

JayBachatero

acf I will take a look at the files you sent me later on today :).
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Acf

Quote from: JayBachatero on January 31, 2006, 08:19:34 PM
acf I will take a look at the files you sent me later on today :).

okay thanks :)
Sigh...

Gargoyle

I'm trying to do this as well... Let meknow what you find... I have a home page that is outside the main SMF directory and I'd like the tab for the homepage to be active when on the homepage.

Thanks!!

JayBachatero

#43
How are you calling the tabs?  Are you using the ssi call or copied from default?

I can take a look into this more in depth next week.  I'm real busy this week.  Sorry. :(
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Acf

#44
Quote from: JayBachatero on February 01, 2006, 11:27:44 PM
How are you calling the tabs?  Are you using the ssi call or copied from default?

I can take a look into this more in depth next week.  I'm real busy this week.  Sorry. :(

the example shows that i copied it from the default template (added the text to say so :P)

ive added the difrent header of the gallary for you :) So the one without the <?php ssi_menubar(); ?> but with the stuff kopied directly from the template (cant fail :P). You have the file including <?php ssi_menubar(); ?>.
Sigh...

Gargoyle


JayBachatero

Remind me again next week so that I can give it a shot.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Acf

Quote from: Gargoyle on February 02, 2006, 08:54:18 PM
I am using the ssi call.. :D

ssi call.. how do you mean?
just calling <? ssi_menubar(); ?> wil not get you a ative tab...
Sigh...

Acf

#48
Index.template.php
find:
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';


replace:
function template_menu($current_action = 'home')
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.



and the ssi:
<?
template_menu($current_action = 'gallery');
?>


hmm much  beter :D
Sigh...

Gargoyle

I think I am missing something.... I have active tabs everywhere the menu is displayed except for the home page. The home page is outside of the forum folder and I use ssi to call the menu. Could you explain a little more please ??

JayBachatero

Can you please provide a link to take a look at?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Gargoyle

Quote from: JayBachatero on February 03, 2006, 06:31:58 PM
Can you please provide a link to take a look at?

It's in my signature... Would you like the actual page code ?

JayBachatero

You can give me the page code or just give me temp admn access to edit the theme template.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Gargoyle

O'kay now I am really confused.... I understand how the page code would help but I have no clue how you would be able to edit which tab is active by editing the themes template since the page in question is not even SMF code or in the SMF directory... It does use ssi but that is about the extent of it...

I am really confused now... Is there an e-mail that I could send the page to ? I can send the theme template page as well if you would like that also.. I think that would be index_template.php correct ?

Thanks for the help thus far. ;D

JayBachatero

WOW for a min there I though that was an addition of the forum silly me :P  Send me the indextesting.php file and the index.template.php
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Gargoyle

Files have been sent to your e-mail acount..

Thanks!!

JayBachatero

Change
if (in_array($context['current_action'], array('forum', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'unread', 'who', 'gallery', 'store', 'arcade')))

to
if (in_array($context['current_action'], array('forum', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'unread', 'who', 'gallery', 'store', 'arcade','indextesting')))

and
<?php
$ssi_ban 
true;
$ssi_theme '10';
$ssi_layers = array('main');
?>


to
<?php
$ssi_ban 
true;
$ssi_theme '10';
$ssi_layers = array('main');
$current_action 'indextesting';
?>


Not sure if it will work though.  I didn't see the call for the menu with SSI.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Gargoyle

Nope it didn't do it....

The menu is called along with the header parts with $ssi_layers = array('main');

I also tried adding the current action code above that but that didn't work either... Seem to be on the right track though.. Or at least it makes sense to me. ;D

Gargoyle

Well I added it to the array in index.php and that had mixed results...

While the tab worked because I could call the page using the same lingo as the other defind links in index_template.php the file could not load the main_template which caused the page to display incorrectly.

So even though I could specify the page in the index.php file I could not get it to load right.... But the tab worked as it should...  ::)

JayBachatero

I'll take a closer look into this when I get a chance.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: