[META] meta-description: add custom prefix

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

Moderator: Moderators

[META] meta-description: add custom prefix

Postby cesare2008 » Mon Oct 20, 2008 3:10 pm

i've given it a try. the mod works fine so far (except that on phpbb3 it doesn't use the search_ignore_words list...). at least i haven't double meta-tags anymore.

1) can i add some custom prefix, i.e. "XY FORUM: " in front of every meta-description? would you recommend that (readability)? how would i do that?

P.S: does google penalize (seo-wise) forums with double meta-tags so heavily? do you know?

cheers,
cesare
cesare2008
 
Posts: 42
Joined: Thu Sep 11, 2008 8:05 am

Advertisement

Postby dcz » Sun Oct 26, 2008 10:44 am

Well, adding few repeated content in the meta tags should not hurt if you do not add to many and unrelated content.
This mean that doing so, you should only add few and general content.
The difference would mostly be cosmetic given the importance of meta tags nowadays, but here is how to do it, in includes/function.php find :
Code: Select all
      $this->meta['meta_desc'] = ( !empty($this->meta['meta_desc']) ) ? $this->meta['meta_desc'] : $this->meta_filter_txt($page_title . ' : ' . $this->meta['meta_desc_def']);
      $this->meta['keywords'] = ( !empty($this->meta['keywords']) ) ? $this->meta['keywords'] : $this->make_keywords( $page_title . ' ' . $this->meta['meta_keywords_def']);


and replace it with :
Code: Select all
      $extra_desc = "my extra description that will be added to the regular ones";
      $extra_keywords = "coma,separated,list,of,addtional,keywords";
      $this->meta['meta_desc'] = ( !empty($this->meta['meta_desc']) ) ? $this->meta['meta_desc'] . " $extra_desc" : $this->meta_filter_txt($page_title . ' : ' . $this->meta['meta_desc_def']);
      $this->meta['keywords'] = ( !empty($this->meta['keywords']) ) ? $this->meta['keywords'] . ",$extra_keywords" : $this->make_keywords( $page_title . ' ' . $this->meta['meta_keywords_def']);


Just make sure you only add few words in $extra_desc and $extra_keywords ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby cesare2008 » Mon Oct 27, 2008 7:27 am

thanks a lot for your valuable input.

cheers,
cesare
cesare2008
 
Posts: 42
Joined: Thu Sep 11, 2008 8:05 am

Re: [META] meta-description: add custom prefix

Postby Goroman » Sun May 03, 2009 11:30 am

very usefull

thx ;)
User avatar
Goroman
PR1
PR1
 
Posts: 138
Joined: Fri Mar 28, 2008 2:58 pm
Location: Poland

Re: [META] meta-description: add custom prefix

Postby Professional » Wed Jun 10, 2009 4:29 am

hi i have 2 question, because my language is persian,so won't cuase error using unicode keywords on includes/function.php ?

and my scond question is using keywords on overall_header at template,is it good or not?
like this:
Code: Select all
<meta name="description" content=" Mobile Hardware, windows mobile 3, windows mobile 5, windows mobile 6  ,...">
<meta name="keywords" content=" Mobile Hardware, windows mobile 3, windows mobile 5, windows mobile 6  ,...">
User avatar
Professional
PR5
PR5
 
Posts: 543
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: [META] meta-description: add custom prefix

Postby dcz » Fri Jun 12, 2009 8:26 am

Nope, unicode (utf-8) is fully supported by phpBB and our mods.

Then, if you install the meta tag mod, you will have to drop the hard coded phpBB meta tags. What you did is not good since it will repeat the same exact keywords on all pages.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: [META] meta-description: add custom prefix

Postby Professional » Fri Jun 12, 2009 1:41 pm

sure,tnx :)
User avatar
Professional
PR5
PR5
 
Posts: 543
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: [META] meta-description: add custom prefix

Postby worthy » Thu Jun 25, 2009 10:10 pm

works
worthy
 
Posts: 43
Joined: Wed Mar 18, 2009 3:04 pm

Re: [META] meta-description: add custom prefix

Postby worthy » Tue Dec 21, 2010 4:26 am

: my description ? How to remove : ?

I dont want to add Site name in Board settings because then write in header besides logo and there is my

random notices to my members. Thanks for advice
worthy
 
Posts: 43
Joined: Wed Mar 18, 2009 3:04 pm

Re:

Postby WorldLife » Fri Mar 25, 2011 9:12 pm

dcz wrote:Well, adding few repeated content in the meta tags should not hurt if you do not add to many and unrelated content.
This mean that doing so, you should only add few and general content.
The difference would mostly be cosmetic given the importance of meta tags nowadays, but here is how to do it, in includes/function.php find :
Code: Select all
      $this->meta['meta_desc'] = ( !empty($this->meta['meta_desc']) ) ? $this->meta['meta_desc'] : $this->meta_filter_txt($page_title . ' : ' . $this->meta['meta_desc_def']);
      $this->meta['keywords'] = ( !empty($this->meta['keywords']) ) ? $this->meta['keywords'] : $this->make_keywords( $page_title . ' ' . $this->meta['meta_keywords_def']);


and replace it with :
Code: Select all
      $extra_desc = "my extra description that will be added to the regular ones";
      $extra_keywords = "coma,separated,list,of,addtional,keywords";
      $this->meta['meta_desc'] = ( !empty($this->meta['meta_desc']) ) ? $this->meta['meta_desc'] . " $extra_desc" : $this->meta_filter_txt($page_title . ' : ' . $this->meta['meta_desc_def']);
      $this->meta['keywords'] = ( !empty($this->meta['keywords']) ) ? $this->meta['keywords'] . ",$extra_keywords" : $this->make_keywords( $page_title . ' ' . $this->meta['meta_keywords_def']);


Just make sure you only add few words in $extra_desc and $extra_keywords ;)

++


I couldnt find any of those lines in includes/functions.php :| (3.0.8 )

I checked the original function.php in the seo premod too.. but its still not there.. :shock:

Please help
WorldLife
 
Posts: 13
Joined: Mon Sep 20, 2010 2:44 pm

Re: [META] meta-description: add custom prefix

Postby dcz » Sun Mar 27, 2011 9:52 am

Yes this code is not compatible with latest version. Even though I really do not encourage you do add any static content in you meta tags, you could add:

Code: Select all
      $meta_code['description'] = (isset($meta_code['description']) ? $meta_code['description'] . ' - '  : '') . $this->meta_filter_txt($this->meta_def['description']);
      $meta_code['keywords'] = (isset($meta_code['keywords']) ? $meta_code['keywords'] . ','  : '') . $this->make_keywords($this->meta_def['keywords']);


Before :
Code: Select all
      if (!$return) {
         $template->assign_var('META_TAG', $meta_code);
      } else {
         return $meta_code;
      }


in phpbb_seo/phpbb_seo_meta.php.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: [META] meta-description: add custom prefix

Postby WorldLife » Sun Mar 27, 2011 11:12 am

I just want to add few other words before each topics description :)

Please guide me how to :roll:

Didnt quite get what you said there :oops:
WorldLife
 
Posts: 13
Joined: Mon Sep 20, 2010 2:44 pm

Re: [META] meta-description: add custom prefix

Postby dcz » Sun Mar 27, 2011 11:36 am

If you just want few words before the description, use :
Code: Select all
          $meta_code['description'] = "The few words you want" . (isset($meta_code['description']) ? ' - ' . $meta_code['description'] : '');
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: [META] meta-description: add custom prefix

Postby WorldLife » Sun Mar 27, 2011 3:15 pm

Add that before that If command in phpbbseo-meta?? :|
WorldLife
 
Posts: 13
Joined: Mon Sep 20, 2010 2:44 pm

Re: [META] meta-description: add custom prefix

Postby dcz » Sun Mar 27, 2011 6:33 pm

Yes, that was in replacement for the suggested code in the same position.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Next

Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests