Page 1 of 2

How can I add tabs in the overall header?

Posted: 10. September 2008 03:14
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.

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

Posted: 10. September 2008 12:20
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>

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

Posted: 10. September 2008 23:49
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!

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

Posted: 18. September 2008 17:26
by dragz
i tried this but the tabs are not working in my site, nothing happened, :(
can anyone help?

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

Posted: 21. September 2008 12:52
by Steve_B
Dragz, have you

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

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

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

Posted: 6. October 2008 19:58
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?

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

Posted: 7. October 2008 02:31
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

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

Posted: 20. October 2008 06:33
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!

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

Posted: 26. October 2008 03:15
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!!!

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

Posted: 26. November 2008 07:00
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

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

Posted: 26. November 2008 07:31
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.

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

Posted: 26. November 2008 14:03
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!

:-)

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

Posted: 26. November 2008 16:49
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!

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

Posted: 27. November 2008 15:20
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?

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

Posted: 27. November 2008 16:29
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.