[META] custom title prefix

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

Moderator: Moderators

[META] custom title prefix

Postby anandharaj » Mon Jul 06, 2009 4:32 am

Hi,

I want to put custom prefix (basically my site name) to the META Title, but somehow it doesnt work. I have change the setting in functions.php page as below:

$this->meta['meta_title_def'] = 'TamilMinnal.Net' . $config['sitename'];

But it still does not reflect - even after i purge the cache. What else im missing? Aslo, i do i put the variable name of my sitename instead hardcode the "TamilMinnal.Net" - this name = SITENAME

but the above $config['sitename'] i believe referring to "site description" or "forum name" or "topic name"
anandharaj
 
Posts: 26
Joined: Sat Jul 04, 2009 2:42 pm

Advertisement

Re: [META] custom title prefix

Postby dcz » Sat Jul 11, 2009 1:59 pm

To do so, you'd need to add something like :
Code: Select all
      global $config;
      $this->meta['meta_title'] .= ' - ' . $config['sitename'];

after :
Code: Select all
      $this->meta['meta_title'] = ( !empty($this->meta['meta_title']) ) ? $this->meta_filter_txt($this->meta['meta_title']) : $page_title;


in includes/functions.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: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Re: [META] custom title prefix

Postby anandharaj » Sat Jul 11, 2009 2:22 pm

Hi dcz,

Its working, but how if i want to put it as first word?

Also, i think there is a small bug. My forum title is "abc & def". In the META description, it display as "abc & def"
Why there is extra 'amp'?
anandharaj
 
Posts: 26
Joined: Sat Jul 04, 2009 2:42 pm

Re: [META] custom title prefix

Postby dcz » Sat Jul 11, 2009 2:41 pm

Then use :
Code: Select all
      global $config;
      $this->meta['meta_title'] = $config['sitename'] . ' - ' . $this->meta['meta_title'];
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: 21376
Joined: Fri Apr 28, 2006 9:03 pm

Re: [META] custom title prefix

Postby anandharaj » Sat Jul 11, 2009 3:07 pm

Thanks.
anandharaj
 
Posts: 26
Joined: Sat Jul 04, 2009 2:42 pm

Re: [META] custom title prefix

Postby samysoft » Sun Jul 11, 2010 1:42 pm

Hello I'm new to you and love is all useful topics that learning from them
samysoft
 
Posts: 5
Joined: Sun Jul 11, 2010 1:37 pm


Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google [Bot] and 9 guests