Advertise Here

Author Topic: [Code] Floating Navigation at top of page.  (Read 1790 times)

0 Members and 1 Guest are viewing this topic.

Offline Josh[y]

  • SMF For Free Sr. Member
  • *
  • Posts: 478
  • <Insert whitty tagline here.>
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
[Code] Floating Navigation at top of page.
« on: November 26, 2008, 12:15:51 pm »
Forum Url: http://upclosesnipers.smfforfree3.com
This code was not entirely made by me. The header code was made by Simply Sibyl and the footer code was make by Celebrus.

Preview is on my forums.

First off, add this to your headers. If you already have it, dont add it.

Code: [Select]
<script src="/jquery.js"></script>
Next, add this to you headers also.

Replace the X with your forum server number (smfforfree2, 3, or 4)
Replace XXX with your forum URL

Code: [Select]
<!-- Begin Links Up Top Floating Version   Code by simply sibyl  -->
<div class="tborder">

<!-- Header area where it says Links in the top header.
==========================================================
You can replace the word Links with whatever you want
========================================================== -->

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">
<span>Navigation</span>
</td>
</tr>
<!-- End Header area where it says links.  -->
</td>
</table></td></div>
<!-- Begin Tab area.
==========================================================================
To add more tabs:
Add this for each tab you want to add:
<td valign="top" class="maintab_back"><a href="url goes here">link</a></td>
=========================================================================== -->   

<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_first"> </td>
<td class="maintab_active_first"> </td>
<td valign="top" class="maintab_active_back"><a href="">Home</a>
</td>
<td class="maintab_active_last"> </td>

<td valign="top" class="maintab_back"><a href="/?action=help">HELP</a></td>
<td valign="top" class="maintab_back"><a href="/?action=search">SEARCH</a></td>
<td valign="top" class="maintab_back"><a href="/?action=profile">PROFILE</a></td>
<td valign="top" class="maintab_back"><a href="/?action=pm">MY MESSAGES</a></td>
<td valign="top" class="maintab_back"><a href="/?action=staff">STAFF</a></td>
<td valign="top" class="maintab_back"><a href="/?action=calendar">CALENDAR</a></td>
<td valign="top" class="maintab_back"><a href="/?action=mlist">MEMBERS</a></td>

<td class="maintab_last"> </td>
</tr>
</table><br>

<!-- End Links Up Top -->

Now add this to your footers.

Code: [Select]
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Help)").hide();
</script>
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Search)").hide();
</script>
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Profile)").hide();
</script>
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(My Messages)").hide();
</script>
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Staff List)").hide();
</script>
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Calendar)").hide();
</script>
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Members)").hide();
</script>
<script>
if(!$('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html())
{
$("table tbody tr td.maintab_back:contains(PROFILE)").hide();
}
</script>
<script>
if(!$('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html())
{
$("table tbody tr td.maintab_back:contains(MY MESSAGES)").hide();
}
</script>
« Last Edit: November 28, 2008, 08:18:35 am by Spoken »

Offline [JeReMy]

  • SMF For Free Master
  • *
  • Posts: 1174
  • www.ourhangout.org
    • View Profile
    • ourhangout

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Floating Navigation at top of page.
« Reply #1 on: November 26, 2008, 01:56:08 pm »
thats a pretty good code i might use it thx spoken

Offline Colette Brunel

  • SMF For Free Sr. Member
  • *
  • Posts: 424
    • View Profile

  • Total Badges: 17
    Badges: (View All)
    Poll Voter Level 4 Fourth year Anniversary Windows User Topic Starter
Re: [Code] Floating Navigation at top of page.
« Reply #2 on: November 26, 2008, 02:39:05 pm »
That whole "xxx" deal. You can configure it so it won't do that.

Original:
Code: [Select]
<td valign="top" class="maintab_back"><a href="http://XXXX.smfforfreeX.com/index.php?action=pm">MY MESSAGES</a></td>
New:
Code: [Select]
<td valign="top" class="maintab_back"><a href="/?action=pm">MY MESSAGES</a></td>
It does the same thing and it saves time for the user so they don't have to put those annoying link replacements in.  ;)

Offline [JeReMy]

  • SMF For Free Master
  • *
  • Posts: 1174
  • www.ourhangout.org
    • View Profile
    • ourhangout

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Floating Navigation at top of page.
« Reply #3 on: November 26, 2008, 03:09:00 pm »
That whole "xxx" deal. You can configure it so it won't do that.

Original:
Code: [Select]
<td valign="top" class="maintab_back"><a href="http://XXXX.smfforfreeX.com/index.php?action=pm">MY MESSAGES</a></td>thanks ccb that does sound beter  :)

New:
Code: [Select]
<td valign="top" class="maintab_back"><a href="/?action=pm">MY MESSAGES</a></td>
It does the same thing and it saves time for the user so they don't have to put those annoying link replacements in.  ;)


Offline Josh[y]

  • SMF For Free Sr. Member
  • *
  • Posts: 478
  • <Insert whitty tagline here.>
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Floating Navigation at top of page.
« Reply #4 on: November 28, 2008, 08:16:08 am »
That whole "xxx" deal. You can configure it so it won't do that.

Original:
Code: [Select]
<td valign="top" class="maintab_back"><a href="http://XXXX.smfforfreeX.com/index.php?action=pm">MY MESSAGES</a></td>
New:
Code: [Select]
<td valign="top" class="maintab_back"><a href="/?action=pm">MY MESSAGES</a></td>
It does the same thing and it saves time for the user so they don't have to put those annoying link replacements in.  ;)

Really? Cool! I will edit thecode to do that. Thanks!

EDIT: Ok I made the edit. Could you check it and make sure its right?
« Last Edit: November 28, 2008, 08:18:59 am by Spoken »

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: [Code] Floating Navigation at top of page.
« Reply #5 on: November 28, 2008, 08:21:16 am »
Spoken you did fine...    check things like that on your test forum first if you are not sure  ;)    

Others should be aware though that the script that goes in the footer that removes the normal tabs -  it removes the Profile tab.
In the process of doing so it also winds up removing the Custom Profile Fields tab in Admin > Features and Options
« Last Edit: November 28, 2008, 09:10:17 am by simply sibyl »

Offline Josh[y]

  • SMF For Free Sr. Member
  • *
  • Posts: 478
  • <Insert whitty tagline here.>
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Floating Navigation at top of page.
« Reply #6 on: November 28, 2008, 02:08:22 pm »
I could add to the footer code to fix that

EDIT: nevermind I couldnt get it.
« Last Edit: November 28, 2008, 02:16:34 pm by Spoken »

 

Related Topics

  Subject / Started by Replies Last post
12 Replies
4904 Views
Last post March 31, 2009, 08:25:54 am
by Gablilg
0 Replies
1177 Views
Last post September 08, 2008, 02:56:54 pm
by Josh[y]
10 Replies
2574 Views
Last post November 29, 2008, 10:44:09 pm
by simply sibyl
1 Replies
684 Views
Last post December 13, 2008, 08:26:32 pm
by simply sibyl
1 Replies
1207 Views
Last post February 02, 2009, 02:00:36 am
by asdfbls12