News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Global Headers and Footers

Started by SMFHacks.com Team, August 02, 2006, 10:39:07 PM

Previous topic - Next topic

moon22

#120
Quote from: harmsway on March 03, 2007, 05:23:10 PM
Its not under configuration. I don't think its installing right, even though it says it installed succesfully. 

I have the same problem...

Quote from: sparky33 on March 04, 2007, 03:33:43 PM
Did you install it whilst in the default theme?

No, I install it while using the AA New Damage theme...

Can somebody help us with this problem... pls... :'(

LeddaBlue

Quote from: moon22 on April 16, 2007, 09:09:01 AM
Quote from: harmsway on March 03, 2007, 05:23:10 PM
Its not under configuration. I don't think its installing right, even though it says it installed succesfully. 



Quote from: sparky33 on March 04, 2007, 03:33:43 PM
Did you install it whilst in the default theme?

No, I install it while using the AA New Damage theme...

Can somebody help us with this problem... pls... :'(


I have the same problem...


I have this problem too? I don't see any thing different under configuration, is there a reason it would not show up? I have uninstalled and then reinstalled the mod and still nothing it was installed on the default theme nothing fancy, can anyone help me please? 
butterfly in the wind without a care...

www.fishenchantment.com

spottedhog

#122
I found a great use for this Mod (nice job by the way!)....  You can use it to create inline CSS navigation buttons for any new actions or pages or whatever other link you may need.

Here is a test/demo code for the Inline CSS buttons:

Put this at the beginning of your themes style.css file.

/* Inline CSS Button Code */
.inline-button {
   width:12em;
   font: bold 65%/1 Verdana, sans-serif;
   margin: 0 0.2em; padding: 0.1em 0;
   border: 1px solid black;
   white-space:nowrap;
   text-decoration: none;
   vertical-align:middle;
   background: #ccc;
   color: black;
   }
.inline-button em {
   width:1em;
   font-style: normal;
   margin:0; padding: 0.1em 0.5em;
   background: white;
   color: black;
   }
.inline-button span {
   width:1em;
   margin:0; padding: 0.1em 0.5em 0.1em 0.3em;
   }
.inline-button:hover {
   background: #666;
   color: white;
   }
.inline-button:hover em {
   background: black;
   color: white;
   }
   
.orange span { background: orange; color: black }
.orange em { background: white; color: #c60 }

.blue span { background: #06c; color: white }
.blue em { background: white; color: #06c }

.green span { background: green; color: white }
.green em { background: white; color: green }


Put this in the Global Header.

<a class="inline-button orange" href="index.php?action=profile"><em>Your</em><span> Profile</span></a>
<a class="inline-button blue" href="index.php?action=calendar"><em>Open</em><span> Calendar</span></a>
<a class="inline-button green" href="index.php?action=search"><em>Forum</em><span> Search</span></a>


You should be able to fairly closely match your theme colors.

spottedhog

To the Global Headers/Footers Developer..... just a suggestion....

I had been having problems with the Header part of the Global Headers.  I am using it for some other link buttons for new actions I have created.  Anyway, the line of link buttons would be a problem whenever I was in the Profile and Admin sections.  Your code is not bound or is willing to stay in place.  I now know the issue is with where you have put the code in the Subs.php.  The issue is it should not be there, but instead, be in the index.template.php file immediately under template_menu......   This way the site/theme etc. is not broken up.  Also, of course put the global call to boarddir there.

.....  at least it is working very well for me this way.

...again..... just a recommendation.

vbgamer45

If i move the code to index.template.php then it just affects one template. Purpose of this mod is to affect all templates without editing them.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

folkandfaith

I am on 1.1.2 and it gives me this error when going to the link that says Global Header and Footer:
Quote
Fatal error: smf_main() [function.require]: Failed opening required '/home/ggallin/public_html/smf_forums/Sources/globalhf.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ggallin/public_html/smf_forums/index.php on line 349

folkandfaith

Is there some file or such that I need to alter to make this work right then? This "Line 349" do I do something to fix this?

folkandfaith

Tried un-installing it, deleting it, and then going back and downloading it and uploading it only to get the same "line 349" error. Any way to fix this to make it work?

icwater

was wondering if someone could help me here

Global Headers and Footers has put my header below where i want it as you can see in the pic i would like to delete the section crossed out in red and move my header in it's place, i thought this is what Global Headers and Footers does but it seems i either messed up or i need to modify it, any ideas?

folkandfaith

I think that the problem with many of these mods is that the creator of them has already done us a service by making them, and then never is able to get back often enough to check on their creation to see if it is still alive and kicking... More often then not some issue arises due to whatever, and then no one can figure out how to fix it and its creator hasn't the time to stop back in and help others wishing to use their creation  :( This seems to be the case with this mod as well as others...

KGIII

Quote from: icwater on May 08, 2007, 11:19:16 PM
was wondering if someone could help me here

Instead of using the mod just edit the index.template.php file for that. You would just add the code (from the looks of things in your picture) after the <body>'; code. You can probably get away with it pretty easily - I suspect it will be the very first "echo" after that where you could just put your code.

folkandfaith:

vbgamer is currently on hiatus but I am reasonably certain they'll return as rapidly as they can.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

icwater

Quote from: KGIII on May 09, 2007, 02:00:57 PM
Quote from: icwater on May 08, 2007, 11:19:16 PM
was wondering if someone could help me here

Instead of using the mod just edit the index.template.php file for that. You would just add the code (from the looks of things in your picture) after the <body>'; code. You can probably get away with it pretty easily - I suspect it will be the very first "echo" after that where you could just put your code.

folkandfaith:

vbgamer is currently on hiatus but I am reasonably certain they'll return as rapidly as they can.

i've seen your solution posted several times but i'm a bit php retarded and it seems theres more too it that just slappin my html in there because when i do it breaks the forum :(
could you tell me a little mor exactly where to put it, please?

this is what i want to toss in there

<html>
<head>
<title>Benedikt Dorsch Tennis - The New Face of German Tennis</title>

<meta name="keywords" content=" ATP, Tennis, Professional, Benedikt, Dorsch" />
<meta name="description" content="The official website for ATP Tennis Professional Benedikt Dorsch." />

<meta http-equiv="Content-Language" content="en-us">
<meta name="author" content="http://www.Bahamas2000.com">
<meta name="robots" content="index,follow,all">
<meta name="distribution" content="global">
<meta name="rating" content="general">
<link rel="stylesheet" href="../sIFR-screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="../sIFR-print.css" type="text/css" media="print">
<script src="../sifr.js" type="text/javascript"></script>
<script src="../sifr-addons.js" type="text/javascript"></script>
<script src="../AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javaScript" type="text/javascript" src="../menu.js"></script>
<link rel="stylesheet" type="text/css" href="../style.css" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}
.style3 {
text-align: left;
}
.style4 {
text-align: center;
}
.style5 {
text-align: left;
font-weight: bold;
}
</style>

</head>
<body bgcolor="#999999" onLoad="MM_preloadImages('../images/btn-home_f2.jpg','../images/btn-press_f2.jpg','../images/btn-about_f2.jpg','../images/btn-photo_f2.jpg','../images/btn-forum_f2.jpg','../images/btn-contact_f2.jpg');" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" background="../images/bg-grad.jpg">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="676" id="table2">
  <tr>
   <td colspan="8" valign="top">
<img name="ssheader725x75" src="../images/ss-header725x75.jpg" width="725" height="88" border="0" id="ssheader725x75" alt="" align="top" /></td>
  </tr>
  <tr>
   <td valign="top">
<img name="menubar" src="../images/menu-bar.jpg" width="13" height="49" border="0" id="menubar" alt="" align="top" /></td>
   <td valign="top">
<a href="../index.htm" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('btnhome','','../images/btn-home_f2.jpg',1);">
<img name="btnhome" src="../images/btn-home.jpg" width="79" height="49" border="0" id="btnhome" alt="Welcome" align="top" /></a></td>
   <td valign="top">
<a href="../news/index.htm" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('btnpress','','../images/btn-press_f2.jpg',1);">
<img name="btnpress" src="../images/btn-press.jpg" width="134" height="49" border="0" id="btnpress" alt="News and Press" align="top" /></a></td>
   <td valign="top">
<a href="../about.htm" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('btnabout','','../images/btn-about_f2.jpg',1);">
<img name="btnabout" src="../images/btn-about.jpg" width="131" height="49" border="0" id="btnabout" alt="About" align="top" /></a></td>
   <td valign="top">
<a href="../photos/index.htm" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('btnphoto','','../images/btn-photo_f2.jpg',1);">
<img name="btnphoto" src="../images/btn-photo.jpg" width="162" height="49" border="0" id="btnphoto" alt="Photos" align="top" /></a></td>
   <td valign="top">
<a href="index.htm" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('btnforum','','../images/btn-forum_f2.jpg',1);">
<img name="btnforum" src="../images/btn-forum.jpg" width="104" height="49" border="0" id="btnforum" alt="Forum" align="top" /></a></td>
   <td valign="top">
<a href="../contact.htm" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('btncontact','','../images/btn-contact_f2.jpg',1);">
<img name="btncontact" src="../images/btn-contact.jpg" width="94" height="49" border="0" id="btncontact" alt="Contact" align="top" /></a></td>
   <td valign="top">
<img name="menubar2" src="../images/menubar2.jpg" width="8" height="49" border="0" id="menubar2" alt="" align="top" /></td>
  </tr>
  </table></div>


and as i understand it this is where it needs to go
<body>';

//Display ads on the top of the page
if (function_exists("show_topofpageAds"))
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}



echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</td>
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/smflogo.gif" style="margin: 2px;" alt="" />
</td>
</tr>
</table>';


// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';

if($context['user']['is_logged'])
echo '
<td class="titlebg2" height="32">
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>
</td>';

// display the time
echo '
<td class="titlebg2" height="32" align="right">
<span class="smalltext">' , $context['current_time'], '</span>';

// this is the upshrink button for the user info section
echo '
<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>';

if (!empty($context['user']['avatar']))
echo '
<td class="windowbg" valign="middle">', $context['user']['avatar']['image'], '</td>';

echo '
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">';

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

// Now, onto our second set of info, are they logged in again?
if ($context['user']['is_logged'])
{
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}

echo '
</td>';
//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
}
echo '

</tr>
</table>
</td>
</tr>
</table>';

echo '
<table id="upshrinkHeader2"', empty($options['collapse_header']) ? '' : ' style="display: none;"', ' width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
</td>';
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>
</td>
</tr>
</table>
</div>';


// Show the menu here, according to the menu sub template.
template_menu();
//Below the menu ads
if (function_exists("show_indexAds") && function_exists("show_towerleftAds") && function_exists("show_towerrightAds"))
{
$ads = show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

//Tower left Ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '<table><tr><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

unset($ads);
//Tower Right Ads
$ads = show_towerrightAds();
if(!empty($ads))
echo '<table><tr><td width="100%" valign="top">';
unset($ads);
}




// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
</div>';


//Close table for towerright ads
if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds") && function_exists("show_bottomAds"))
{
$ads = show_towerrightAds();
if(!empty($ads))
echo '</td><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td></tr></table>';

unset($ads);
//Close table for towerleft ads
$ads = show_towerleftAds();
if(!empty($ads))
echo '</td></tr></table>';
unset($ads);

//Show ads on the bottom of the page
$ads = show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' : '', '">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'right' : 'left', '">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
', theme_copyright(), '
</td>
<td width="28%" valign="middle" align="', !$context['right_to_left'] ? 'left' : 'right', '">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>';

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}';
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}';
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}';

echo '
// ]]></script>';
}

echo '
</div>';

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// The end of tab section.
echo '
<td class="maintab_' , $last , '">&nbsp;</td>
</tr>
</table>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>


i'm just a bit lost as to where to put it without breaking the forum code

icwater

never mind i'm beyond that, thanks KGIII

oldskool

there is a common problem with this , it installs , but is nowhere to be seen ?

folkandfaith

The creator is on hiatus... So apparently a "global header" is not possible until he comes back around. Sucks hu ... :(

folkandfaith


SaltedWeb

Clean install smf, the headers fooeter mod doesnt show up on admin menu.
No mods or anything yet it wont show up.
Wierd, ideas ??

Cozmo
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

babjusi

What theme and language are using as a default in your forum?

SaltedWeb

Using English 1.1.2  and smf default theme.

No members no mods fresh install .
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

babjusi


Advertisement: