News:

Wondering if this will always be free?  See why free is better.

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

joh87swe


Mannie_Fine

I am trying to add a link befor the home button.

but nothing changes, i have this now
// Show the [Start] button...
      echo ($current_action == 'start' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'start' ? 'active_back' : 'back' , '">
               <a href="http://www.jakobskruiskruid.com/index.html">Start</a>
            </td>' , $current_action == 'start' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

IchBin™

Does your site actually have a link that goes to action=start ???
IchBin™        TinyPortal

redlightblack

Could someone here tell me where: $context['current_action'] is defined? Which file?

The reason I'd like to know is because I'd need to add something like: if (in_array($context['current_type'], array('featured', 'categories', 'recent')))
    $current_action = 'library';

to my index.template.php file, so that I can get the right tab to become active when using a non smf part of my site.

redlightblack

Never mind. I found it in Load.php, unless I'm wrong...

IchBin™

You don't need to add anything to load.php for that. If you already have the action built you can just add library to the current_action array in the index.template.
IchBin™        TinyPortal

redlightblack

I did do that, but the other script also has several different actions such 'type' which shows in the url as: http://www.mysite.com/?type=categories

By defining type in Load.php the correct tab stays active when in that part of the site. This works with most of the others too. The only ones I haven't gotten just yet are the ones where the array would be numbers. I don't know how to add them with have to add each and every one, which is bad since there are over a thousand and they constantly increasing.

IchBin™

IchBin™        TinyPortal

redlightblack


Clarkey88

#309
EDIT: Never mind.

chovy

Its a shame that there isn't a standard file to inherit menus from easily.

I have 15 themes, and have to modify 30 files to add 2 links to the main navbar :(

Dragooon

There will be a better way
But 15 themes and 30 files? Are you sure you counted it correctly? :P

chovy

well, no - that was an exaggeration. it is more like 6 themes (and two files for each theme).

Dragooon

How can it be 2 files each theme? All you need to edit is Index.template.

And Yes I am being Sarcastic :P

britmovie

In the beta looking for

if ($context['current_action'] == 'search2')
      $current_action = 'search';

to add a button as in thread but cant find it in index.template.php?

is it in it or has it been changed?

Gary

In 2.0 it got re-located to one of the source files, off the top of my head, I forget which one, I'd have to look into it for you when I get the chance later tonight.

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

tatore

Quote from: ALM on September 11, 2007, 04:33:54 AM
In 2.0 it got re-located to one of the source files, off the top of my head, I forget which one, I'd have to look into it for you when I get the chance later tonight.

-ALM
If I'm not wrong it's in Subs.php
*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

Murdoc_LaCN

damm lol i really need help :O

could someone point me to where i can find index.template ????

because i have looked and then ive searched for words but nothing pops up :O

tatore

Quote from: Murdoc_LaCN on September 16, 2007, 10:32:27 AM
damm lol i really need help :O

could someone point me to where i can find index.template ????

because i have looked and then ive searched for words but nothing pops up :O
what are you talking about?
*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

Gary

Themes/[THEMENAME]/index.template.php

:P

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Advertisement: