Meta Tag Questions

Started by delta5, November 02, 2007, 08:43:31 PM

Previous topic - Next topic

delta5

Hello, I just installed 1.1.4 and I am trying to set my meta tags up properly.

Here is what I see when I view the actual source code of my front page

<!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"><head>
   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
   <meta name="description" content="TownHallDebate.com - Index" />
   <meta name="keywords" content="politics, debate, chat, forum, democrats, liberals, conservatives, controversy, terrorism, terrorists" />
   <script language="JavaScript" type="text/javascript" src="http://www.americangunrights.net/townhalldebate/smf/Themes/default/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "http://www.americangunrights.net/townhalldebate/smf/Themes/default";
      var smf_images_url = "http://www.americangunrights.net/townhalldebate/smf/Themes/default/images";
      var smf_scripturl = "http://www.americangunrights.net/townhalldebate/smf/index.php";
      var smf_iso_case_folding = false;
      var smf_charset = "ISO-8859-1";

Here is what the default theme index.template file from the 1.1.4 download package looks like.

// 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'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '
   <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?fin11"></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, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";
   // ]]></script>
   <title>', $context['page_title'], '</title>';

My questions are is the file i have to change located in the deafault theme folder?  And why, when I change the robots line to "index,follow" does the line disappear when i view the actual source? I want to be sure that the robots do index my site and that the meta key words are correct. It appears that the package is defaulting at no indexing, which is not what i want. Can someone please review this code and let me know what is right and wrong?

thanks,

delta5



delta5

Also, does the following line need to be changed?

<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '

SleePy

The robots line is for robots to not index certain pages (where that context variable is set).
Its part of simple attempts to remove pages from being index, although a robots.txt is the best method.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: