[meta] Display meta keywords on the page

Support for the phpBB3 SEO mods released in the phpBB3 SEO Toolikt forum.

Moderator: Moderators

[meta] Display meta keywords on the page

Postby austin881 » Tue Nov 10, 2009 6:44 pm

I'm using the phpBB SEO Premod application and my question concerns the phpBB SEO Dynamic Meta Tags toolkit part of it.

I'd like to display the Meta Keywords directly on my viewforum pages. How can this be done? Is this a bad idea SEO-wise?

I want these keywords...
Code: Select all
<meta name="keywords"    content="site, welcome, seems, working, everything, example, post" />


Displayed on my viewforum_body.html pages here:
<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
<div>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
<!-- IF FORUM_DESC --><div>{FORUM_DESC}<br /></div><!-- ENDIF -->
<!-- If there are forum meta keywords, display them here. -->
<!-- IF MODERATORS --><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}<!-- ENDIF -->
</div>
<!-- ENDIF -->
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Advertisement

Re: [meta] Display meta keywords on the page

Postby SeO » Thu Nov 12, 2009 11:20 am

Keywords are stored into $seo_meta->meta['keywords'], and can be for example added to a template variable in page_header() (includes/functions.php) for later usage anywhere in the template.
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Re: [meta] Display meta keywords on the page

Postby austin881 » Fri Nov 13, 2009 5:50 pm

Thank you! Your solution works perfectly.

This is what I added in includes/functions.php
Code: Select all
'META_KEY_DISPLAY' => $seo_meta->meta['keywords'],


...and then added this in styles/prosilver/template/viewforum_body.html
Code: Select all
<p>{L_COMMON_SEARCH_TERMS}: <em>{META_KEY_DISPLAY}</em></p>


Which gives me:
Common search terms: site, welcome, seems, working, everything, example, post

Pretty neat! :P
Your responses are always very helpful. Thank you and keep up the good work.
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: [meta] Display meta keywords on the page

Postby austin881 » Tue Nov 24, 2009 4:15 pm

Ok I've updated to 3.0.6. Now how do I accomplish this?
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: [meta] Display meta keywords on the page

Postby SeO » Tue Nov 24, 2009 5:42 pm

The exact same way ;)
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Re: [meta] Display meta keywords on the page

Postby austin881 » Tue Nov 24, 2009 6:10 pm

Oops, okay sorry. It works the same way. Thanks.

I was confused thinking I had to use $seo_meta->collect( or something.
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: [meta] Display meta keywords on the page

Postby SeO » Tue Nov 24, 2009 7:12 pm

No, this would only be to collect the keywords, here we display the collected one, and the variable filled is the same in both versions ;)
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm


Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests