phpBBHacks.com - Adding Meta Tag Description and Keywords in phpBB 3
Managing Online Forums, a manual for the community admin
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 3: Customizing Your phpBB
 See a User Guidelines violation? Please contact us.
Author Message

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: March 22nd 2009, 10:21 am    Post subject: Adding Meta Tag Description and Keywords in phpBB 3 Reply with quote

Would you like to add meta tags to your phpBB 3? That's what I'm going to discuss in this tutorial.

The two main meta tags that are probably the most requested and talked about are description and keywords. But, if you happen to want to use any other meta tags, it'll be easier enough to add them, once you have read the following.

Introduction

Meta tags are edited and added in the overall_header.html file in your style's template directory. The two default phpBB styles (and the ones that the vast majority of styles are based off of) are prosilver and subsilver2.

For prosilver, the overall_header.html file is located at your main phpBB directory/styles/prosilver/template/overall_header.html. For subsilver2, it would be your main phpBB directory/styles/subsilver2/template/overall_header.html. If you are using a different style, you can find the overall_header.html file in the very same way, just by going to that styles folder rather than prosilver or subsilver2.

Where Do I Find Them?

The meta tags are in the top of the overall_header.html file. For both of the default phpBB 3 styles, they are in the first 13 lines. Here is the first 13 lines of prosilver:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />

And here are the first 13 lines of subsilver2:

Code:
<!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" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="" />
<meta name="description" content="" />

The tags that start with "<meta" are the meta tags and if you look at the final two, you will see the tags for keywords and description. If they aren't there, feel free to take the ones shown here and add them to your style, below whatever meta tags are present. You can add any additional meta tags that you would like, as well.

Please note that meta tags should always be within the opening and closing of the head tag, i.e.:

Code:
<head>
META TAGS MUST GO IN HERE
</head>

The Description Tag

The description tag is generally used as a general description of the website, article, etc. Let's say that we were doing one for the phpBBHacks.com Support Forums. Here is what we might write:

Code:
<meta name="description" content="Friendly, moderated support community dedicated to phpBB, hacks, styles and more." />

Please note that the entire description is within the quotation marks. You want to keep it to below 200 or so characters, generally, as only so much will be indexed and displayed.

The Keywords Tag

The keywords tag is generally used for keywords related to the website, article, etc. Again, let's say that we were doing this for the phpBBHacks.com Support Forums. Here is what we might write:

Code:
<meta name="keywords" content="phpBB, support, forums, hacks, styles, templates, customization, help, community, software, programming" />

You want to keep the keywords relevant to your site and targeted.

Bringing it All Together

So, if we took the two examples above and added them into our prosilver style, here is what the first 13 lines of overall_header.html would look like:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
<meta name="keywords" content="phpBB, support, forums, hacks, styles, templates, customization, help, community, software, programming" />
<meta name="description" content="Friendly, moderated support community dedicated to phpBB, hacks, styles and more." />

Once we are happy with the edits, the overall_header.html file must be uploaded to it's location on the server and you could clear your cache by going to your admin panel index page and clicking the "Run now" button next to "Purge the cache."

You should now be good to go with your new or adjusted meta tags.

Conclusion

The value of meta tags is debatable. At best, they probably have only a small impact. At worst, they have none. The description tag is still supported in a meaningful way, while the keywords tag is generally considered to be unimportant. This is not my area of expertise, so I would recommend doing your own research, as well as reviewing this article at SearchEngineWatch.com for more.

Thank you for reading.
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 3: Customizing Your phpBB All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.