How can I add tabs in the overall header?

Please post general support questions for the phpBB3 core system on phpBB.com!
Bitte allgemeine Supportanfragen zu phpBB3 auf phpBB.de stellen!
Forum rules
Please post general support questions for the phpBB3 core system on phpBB.com!
Bitte allgemeine Supportanfragen zu phpBB3 auf phpBB.de stellen!

Topic author
Onetimer
Active Member
Posts: 48
Joined: 27. June 2008 13:29

How can I add tabs in the overall header?

Post by Onetimer »

Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Beginner

What have you done before the problem was there?
-

What have you already tryed to solve the problem?
-

Description and Message
Sorry if this is in the wrong section, there doesn't seem to be a mods/template section here. Anyway, if I wanted to re-create the tabs that is present on this (board3) page, how would I do that? I know this style is not public, but I need something similar and would appreciate any help to get me going.
User avatar

thomas.d
Former Team Member
Posts: 625
Joined: 19. January 2008 23:56
phpBB.de User: thomas.d
phpBB.com User: thomas.d
Contact:

Re: How can I add tabs in the overall header?

Post by thomas.d »

Hi Onetimer,

try this:

Open

styles/prosilver/template/overall_header.html

Find

Code: Select all

          <div class="navbar">
Add before

Code: Select all

<div id="tabs">
	<ul>
         <li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'portal.php' --> class="activetab"<!-- ENDIF -->><a href="{U_PORTAL}"><span>{L_PORTAL}</span></a></li>
         <li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'index.php' or basename($_SERVER['SCRIPT_NAME']) == 'viewforum.php' or basename($_SERVER['SCRIPT_NAME']) == 'viewtopic.php' --> class="activetab"<!-- ENDIF -->><a href="{U_INDEX}"><span>{L_INDEX}</span></a></li>
         <!-- IF S_DISPLAY_SEARCH --><li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'search.php' --> class="activetab"<!-- ENDIF -->><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}"><span>{L_SEARCH}</span></a></li><!-- ENDIF -->
         <!-- IF S_DISPLAY_MEMBERLIST --><li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'memberlist.php' --> class="activetab"<!-- ENDIF -->><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}"><span>{L_MEMBERLIST}</span></a></li><!-- ENDIF -->
         <li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'faq.php' --> class="activetab"<!-- ENDIF -->><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}"><span>{L_FAQ}</span></a></li>
         <li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'xxx.php' --> class="activetab"<!-- ENDIF -->><a href="xxx.php" title="XXX"><span>XXX</span></a></li>
         <li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'yyy.php' --> class="activetab"<!-- ENDIF -->><a href="yyy.php" title="YYY"><span>YYY</span></a></li>
         <li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'zzz.php' --> class="activetab"<!-- ENDIF -->><a href="zzz.php" title="ZZZ"><span>ZZZ</span></a></li>
	</ul>
</div>
Viele Grüße

Thomas

Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |

Topic author
Onetimer
Active Member
Posts: 48
Joined: 27. June 2008 13:29

Re: How can I add tabs in the overall header?

Post by Onetimer »

Wow, thanks a lot Thomas! I really appreciate it. But although that was really cool looking in itself, it's just that the tabs are on the forum index bar, not on top of the page like here at board3.de;

Image

Any idea how I could move them to the top (so that they are present at all pages, including the portal index?). Like I said, I really appreciate it!

dragz
Valued Contributor
Posts: 70
Joined: 17. September 2008 17:18

Re: How can I add tabs in the overall header?

Post by dragz »

i tried this but the tabs are not working in my site, nothing happened, :(
can anyone help?
User avatar

Steve_B
Active Member
Posts: 38
Joined: 2. June 2008 05:16

Re: How can I add tabs in the overall header?

Post by Steve_B »

Dragz, have you

ACP=>Styles=>Thestyle you use=> templates=>refresh ?

Because they may not show up till you have done that.

Topic author
Onetimer
Active Member
Posts: 48
Joined: 27. June 2008 13:29

Re: How can I add tabs in the overall header?

Post by Onetimer »

Onetimer wrote: Any idea how I could move them to the top (so that they are present at all pages, including the portal index?). Like I said, I really appreciate it!
Anybody that could maybe help with this?
User avatar

Steve_B
Active Member
Posts: 38
Joined: 2. June 2008 05:16

Re: How can I add tabs in the overall header?

Post by Steve_B »

Instead of using this code and placing the other code before

Code: Select all

<div class="navbar">

place the code before this one

Code: Select all

<div class="headerbar">
Fairly certain I am right with this one, I don't use the tabs on my site.

Hope that helps out a little :D

hermitmaster
Active Member
Posts: 1
Joined: 20. October 2008 06:31

Re: How can I add tabs in the overall header?

Post by hermitmaster »

Can somebody tell me how to do this in a subsilver2 based theme? I want the tabs on the navbar as shown above. Thanks in advance!

Topic author
Onetimer
Active Member
Posts: 48
Joined: 27. June 2008 13:29

Re: How can I add tabs in the overall header?

Post by Onetimer »

Steve_B wrote:Instead of using this code and placing the other code before

Code: Select all

<div class="navbar">

place the code before this one

Code: Select all

<div class="headerbar">
Fairly certain I am right with this one, I don't use the tabs on my site.

Hope that helps out a little :D
FANTASTIC!!! Thanks a lot, it worked like a charm!

Sorry for the late reply but I havn't had time to try this out until now!

Vielen dank!!!

novanilla
Active Member
Posts: 40
Joined: 11. October 2008 17:40

Re: How can I add tabs in the overall header?

Post by novanilla »

I've tried this, and it screws up my screen with an error code at the top that says something about line 141 in my template.php file.

And yes... I'm a noob.

:D

the.ronin
Valued Contributor
Posts: 64
Joined: 30. October 2008 16:20

Re: How can I add tabs in the overall header?

Post by the.ronin »

Hey nova, how ya doing man?

If you upgraded to 3.03, try this:

Find:

Code: Select all

<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'script.php' -->
Replace:

Code: Select all

<!-- IF SCRIPT_NAME == 'script' -->
You'll need to do that in all instances.

novanilla
Active Member
Posts: 40
Joined: 11. October 2008 17:40

Re: How can I add tabs in the overall header?

Post by novanilla »

Ronin - magicman... I won't pretend to understand how that worked, but THANKS!

Now I just need to change the gif image to match the color of the nav-bar (or vice-versa) :lol:


EDIT (1 hour later): I found the bg images for the tabs and after refreshing, the modified versions worked great. Now I can't seem to find the one-pixel "border-bottom: color:#" line to match my EBEBEB gray background for these tabs. There are several, so if anybody happens to know off hand which one you edit for the active tab in your theme file, I'll be on my way. Thanks!

:-)

the.ronin
Valued Contributor
Posts: 64
Joined: 30. October 2008 16:20

Re: How can I add tabs in the overall header?

Post by the.ronin »

Ooohh I’ve been meaning to do that too, nova ... mind sharing your own magic juju and posting up which file changed what? Also any other changes that need to be made?

Thank you, sir!

novanilla
Active Member
Posts: 40
Joined: 11. October 2008 17:40

Re: How can I add tabs in the overall header?

Post by novanilla »

the.ronin wrote:Ooohh I’ve been meaning to do that too, nova ... mind sharing your own magic juju and posting up which file changed what? Also any other changes that need to be made?

Thank you, sir!
Mr. Ronin, I've been to your site, and it looks clean to me. But if you still have border issues between your active tab and the nav bar, try this amazing trick... Refresh your browser window.

I edited the colors of all "activetab" entries, where applicable, in the stylesheet.css of the ACP. In order to make the changes permanent though, I need to go into colours.css (in the theme directory) and edit them there. As I said though... Your changes look like they've been made. If you don't see the same thing I see, hit refresh.

------------------

Now I have little issue of script names... The gallery link and the Index link both have the same script name, so the active tab is "Index" for both of them. Wondering if it's easy to change the script names without breaking the code?

the.ronin
Valued Contributor
Posts: 64
Joined: 30. October 2008 16:20

Re: How can I add tabs in the overall header?

Post by the.ronin »

Thanks nova ... what I was referring to was changing the color of the menu. I know the tabs themeslves have a tab1_bg and tab2_bg (something like that) image that it uses. I can't seem to find where to change the color of the rest of the menu bar below it that has the control panel, faq, search, etc.
Locked

Return to “General phpBB3 Support”