News:

Join the Facebook Fan Page.

Main Menu

Main Index edit.

Started by NoFeaR / NFSMW, April 08, 2010, 01:22:31 PM

Previous topic - Next topic

NoFeaR / NFSMW

 :-[
How can i add icon images to the following tabs in the file attached?
And how do i remove Tabs?


Related SMF version: SMF 2 RC3

Afro

I dont get your questions, can you explain more ?

NoFeaR / NFSMW

The tabs, can i give then icons?? And how do i remove a Tab

NoFeaR / NFSMW

Is it possible to do the following? In the first file attached there is the hello box.
In the second screenshot i collapsed the box. Is it possible to set it collapsed by default?? for all users??

Kays

For 2.0 the tabs are setup in Subs.php. Look towards the bottom of the page it's setup as an array. I don't know if you can use an icon, but it might be possible to add it using html to where the name is added.

As for having the header collapsed, I have seen it discussed, but don't have an answer. Maybe try searching either the SMF Coding Discussion or Graphics and Templates boards.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Afro

like kay said , to remove tabs, go to Sources/subs.php.

Look for Home, profile etc near the bottom of the file and you will see the tab code blocks.
If you cant do that, just find the file and send it here . then tell us the tabs you want removed.

NoFeaR / NFSMW

thanks Sir. let me try do it myself quick

NoFeaR / NFSMW

Ah nice. It works. Is there a possible way of adding a seccond row below the current one?

CapadY

When there are enough items in the menubar they will go to the next row automaticly
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

NoFeaR / NFSMW

Ok now another problem happened. When i try to rename my tabs it disappears,

Like homepage
home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
            // 'target' => '_blank',

Where do i edit it?

CapadY

I don't understand what you're trying to do but there is at least an quote missing before home.

And is it tealy the last menu_item ?

If you just want to rename the buttons you can better do that in the language files
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

NoFeaR / NFSMW

I just need to know how to rename the tabs. thats all

Kays

If you rename it like that you'll need to add a language string for $txt['home']


$txt['home'] = 'Home";


or hard code it in


'title' => 'Home',

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

NoFeaR / NFSMW

In what file? I checked in the language files and i dont find it

Kays

Language strings can be added to index.{language}.php.

To hard code it, that change is in Subs.php


home' => array(
            'title' => 'Home',
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

NoFeaR / NFSMW

Got it and it works. Sweet.

Kays

Good. :)

I'll mark this as solved then.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Afro

good you solved it. bookmark this page because you will need it after upgrade to another version.

NoFeaR / NFSMW

Now i got a small question. How do i remove the tabs in SMF 1.11 with a custom theme?

Kays

Look in index.template.php towards the bottom and you'll see the code for the tabs. Each tab is separate, so you should be able to comment out any you don't want to display.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: