Kill the googlebot
Posts: 6
48 credits Members referred : 0
« Reply #2 on: Nov 06, 2006, 05:33:57 PM »
I'm not really sure where in particular to pase this code, beginning part of my index.template.php is this
Code:
// The main sub template above the content. function template_main_above() { global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating. echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head> <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" /> <meta name="description" content="', $context['page_title'], '" /> <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" /> <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc3"></script> <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[ var smf_theme_url = "', $settings['theme_url'], '"; var smf_images_url = "', $settings['images_url'], '"; var smf_scripturl = "', $scripturl, '"; // ]]></script> <title>', $context['page_title'], '</title>';
// The ?rc3 part of this link is just here to make sure browsers don't cache it wrongly. echo ' <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc3" /> <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc3" media="print" />';
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. Standards compliance mode happens when you use xhtml... */ if ($context['browser']['needs_size_fix']) echo ' <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
// Show all the relative links, such as help, search, contents, and the like. echo ' <link rel="help" href="', $scripturl, '?action=help" target="_blank" /> <link rel="search" href="' . $scripturl . '?action=search" /> <link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one. if (!empty($modSettings['xmlnews_enable'])) echo ' <link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively. if (!empty($context['current_topic'])) echo ' <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" /> <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index. if (!empty($context['current_board'])) echo ' <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
// We'll have to use the cookie to remember the header... if ($context['user']['is_guest']) $options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?) echo $context['html_headers'], '
// the routine for the info center upshrink echo ' <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[ var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';
// 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>
// 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>';
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8025
41107 credits Members referred : 3