Improved Meta Keywords and Description Tags

Started by rsw686, September 05, 2007, 10:53:00 AM

Previous topic - Next topic

flickernever

I applied your changes and noticed that now every time I try to post a message on a thread an error appears displaying "Warning - while you were reading X new replies have been posted. You may wish to review your post." even that in fact that is not true. X is the number of posts that are in the original thread.

I applied all the modifications correctly. What is happening?

flickernever

Quote from: flickernever on January 16, 2008, 02:46:52 PM
I applied your changes and noticed that now every time I try to post a message on a thread an error appears displaying "Warning - while you were reading X new replies have been posted. You may wish to review your post." even that in fact that is not true. X is the number of posts that are in the original thread.

I applied all the modifications correctly. What is happening?

Problem solved. The display.php modification was bady done.   ;D

rucanunes

Quote from: rsw686 on September 05, 2007, 10:53:00 AM

Sources\MessageIndex.php

// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']) . ' - ' . $context['forum_name'];
$context['meta_description'] = $board_info['description'];
$context['meta_keywords'] = $board_info['name'];


Sources\Display.php

// Censor the title...
censorText($topicinfo['subject']);
$context['page_title'] = $topicinfo['subject'] . ' - '. $context['forum_name'];
$context['meta_description'] = $topicinfo['subject'] . ' ' . $board_info['name'];
$context['meta_keywords'] = $topicinfo['subject'];


Themes\default\index.template.php

<meta name="keywords" content="', !empty($context['meta_keywords']) ? $context['meta_keywords'] . ', ' : '', 'PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<meta name="description" content="', empty($context['meta_description']) ? 'A Simple Machines powered discussion forum.' : $context['meta_description'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '


On the board index you have

Title: Forum Name - Index
Keywords: hard coded in template
Description: hard coded in template

On the message index you have

Title: Board Name - Forum Name
Keywords: Board Name, keywords hard coded in template
Description: Board Description

On the message display you have

Title: Topic Subject - Forum Name
Keywords: Topic Subject, keywords hard coded in template
Description: Topic Subject Board Name


I've placed this code in my files but I'm getting some errors (in RED) on the meta tags as follows:

Quote <meta name="description" content="O maior portal para professores de Portugal. Se é professor, junte-se a nós!, Já descongelámos" />
<meta name="keywords" content="fórum,sala dos professores, saladosprofessores, professores, ensino, Portugal, ensino em Portugal, disciplina, disciplinas, educadores, educadoras, educadores de infância, professor universitário, português, inglês, francês, alemão, matemática, história, geografia, e.v.t., educação musical, educação física, filisofia, estudo acompanhado, formação cívica, área de projecto, professor, professores, fórum, ciências da natureza, biologia, fisico-química, economia, informática, desporto, e.m.r.c., , Já, descongelámosGeral,, Já, descongelámos" />

Could you please tell me how to remove the extra commas?

Thank you,
Raul Nunes
Sala dos Professores http://www.saladosprofessores.com

rsw686

Show me the code for the meta tags in index.template.php. You must have extra commas typed in there.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rucanunes

Here it is:

<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="keywords" content="', !empty($context['meta_keywords']) ? $context['meta_keywords'] . ', ' : '', '" />
<meta name="description" content="', empty($context['meta_description']) ? '' : $context['meta_description'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '


Thank you,
R Nunes
Sala dos Professores http://www.saladosprofessores.com

sturmkatze


Polymath

If you have another arcade or such mod description will be the hard coded.
* I don't suffer from insanity; I enjoy every minute of it. *
F.I.G.J.A.M

Advertisement: