Adding site name to topic and forum name

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

Moderator: Moderators

Adding site name to topic and forum name

Postby Silverado05 » Fri Sep 05, 2008 3:49 pm

Hello, I have a quick question. I am running the optimal tittles and it is a great mod, ran it on my other board for a couple years and it does a great job. I have set up a new board and I think I did this with the other board but not sure.

Now when you view a topic is does as I like and what it is suppose to with the format...

[topic] > [forum title] > Mozilla Firefox

I would like to add the site name to that as well like this.

[topic] > [forum title] > [sitename]

Now my question is would adding the site name be an overkill? The title is very relavant to the keywords of the site. The site is called Texas Camping Forum. So the most popular Keywords would be "Texas" and Camping".

I asked this because someone was asking when hunting season started in Texas. So the title was like this.

When..? : General Hunting - Mozilla Firefox

I think if it was like this it might make targeting my audience easier because of the keywords....


When..? : General Hunting : Texas Camping Forum - Mozilla Firefox

That way when some searches for "Texas" and "Hunting" boom it is in the title and keywords are in place.

Am I in the right ballpark here? Would this be overkill, and if not how would I go about doing this. I know viewtopic.php and viewforum.php has to be edited but how would I add that the mod code now? I know this wouldn't pertain to every site, but I think in my case it would be beneficial to have my site name in the title as well.

-Thanks
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Advertisement

Postby dcz » Sat Sep 06, 2008 1:23 pm

In includes/functions.php, you can replace :

Code: Select all
      'PAGE_TITLE'               => $page_title,


with :

Code: Select all
      'PAGE_TITLE'               => $page_title . ' : ' . $config['sitename'],


Should do it. We did not did his by default because it's not necessarily this good to repeat too many keywords in every titles, texas and camping are for example already included in your domain's name.

++
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby Silverado05 » Sat Sep 06, 2008 5:28 pm

So SE take in account domain names too when looking for keywords?

Would their be any ill effect from adding this on?

-Thanks
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby dcz » Sat Sep 13, 2008 8:13 am

Silverado05 wrote:So SE take in account domain names too when looking for keywords?


They do it a lot ;)

Silverado05 wrote:Would their be any ill effect from adding this on?

-Thanks


Well as said, the difference will not be very big, but in your case, the keyword "texas" and "camping" will most likely be related to all of your topics content, so it won't hurt an could even have a minimal but positive impact ;)

++
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby jrbeilke » Tue Oct 28, 2008 7:28 pm

Exactly what I was looking for, as I wanted to add the site name to the titles as well. Thanks!
jrbeilke
 
Posts: 1
Joined: Tue Oct 28, 2008 7:27 pm
Location: White Bear Lake, MN

Re: Adding site name to topic and forum name

Postby buddz98 » Fri Apr 24, 2009 10:03 am

Silverado05 wrote:Hello, I have a quick question. I am running the optimal tittles and it is a great mod, ran it on my other board for a couple years and it does a great job. I have set up a new board and I think I did this with the other board but not sure.

Now when you view a topic is does as I like and what it is suppose to with the format...

[topic] > [forum title] > Mozilla Firefox

I would like to add the site name to that as well like this.

[topic] > [forum title] > [sitename]

Now my question is would adding the site name be an overkill? The title is very relavant to the keywords of the site. The site is called Texas Camping Forum. So the most popular Keywords would be "Texas" and Camping".

I asked this because someone was asking when hunting season started in Texas. So the title was like this.

When..? : General Hunting - Mozilla Firefox

I think if it was like this it might make targeting my audience easier because of the keywords....


When..? : General Hunting : Texas Camping Forum - Mozilla Firefox

That way when some searches for "Texas" and "Hunting" boom it is in the title and keywords are in place.

Am I in the right ballpark here? Would this be overkill, and if not how would I go about doing this. I know viewtopic.php and viewforum.php has to be edited but how would I add that the mod code now? I know this wouldn't pertain to every site, but I think in my case it would be beneficial to have my site name in the title as well.


-Thanks



well thanks for the further information you given here, now i know


[mod]link removed[/mod]
Last edited by dcz on Sat Jul 25, 2009 9:40 am, edited 1 time in total.
Reason: As per rule5a : Linking offsite is allowed if links are being offered in a "relevant discussion context"
buddz98
 
Posts: 1
Joined: Fri Apr 24, 2009 10:01 am

Re: Adding site name to topic and forum name

Postby Goroman » Sat Apr 25, 2009 7:31 am

I have similar question

I want add only in viewtopic my own keywords

So I add "{SITENAME}" In overall_header.html

And I changed In ACP sitename to "my 2 keywords"

but my new sitename appears in index page, viewforum and viewtopic

I want that only in viewtopic

HOw to do that ?
User avatar
Goroman
PR1
PR1
 
Posts: 139
Joined: Fri Mar 28, 2008 2:58 pm
Location: Poland

Re: Adding site name to topic and forum name

Postby dcz » Sun Apr 26, 2009 12:53 pm

If you want to force some keywords only for viewtopic.php pages, then do it in viewtopic.php :

Code: Select all
page_header($topic_data['topic_title'] . ' : ' .  $topic_data['forum_name'] . $extra_title);

to :
Code: Select all
page_header($topic_data['topic_title'] . ' : ' .  $topic_data['forum_name'] . $extra_title . " my extra title to always add");


;)
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Re: Adding site name to topic and forum name

Postby Goroman » Sun Apr 26, 2009 3:58 pm

Working Fine .. thx dcz.

I have another question .

I want use mod Topic Tag .. for eg. http://www.phpbb.com/community/viewtopi ... 0&t=559217
to correct a little topics urls

I added few tags (short cuts) eg.
[SP] - SUPPORT
[PB] - PROBLEM
[SL] - SOLVED

etc.

Now I want have them in topics urls
eg.
I someone put in topic , tag - [PB]
url look like:
http://mysite.org/ask-bob/problem-odliczanie-t322.html



I saw that on few Vbulletin Boards

If it's difficult to do .. I pay :wink:
User avatar
Goroman
PR1
PR1
 
Posts: 139
Joined: Fri Mar 28, 2008 2:58 pm
Location: Poland

Re: Adding site name to topic and forum name

Postby dcz » Sat May 02, 2009 5:07 pm

I don't think that it would be such a good idea to replace [PB] in title with "problem" in url, because that would most likely increase the topic url update, when the topic status changes, from [PB] to [SL] for example.

But, it's rather easy to do if you really want it, and if the custom [] tags are in the topic title, in phpbb_seo_class.php you could add :
Code: Select all
      static $find = array('[SP]', '[PB]', '[SL]',);
      static $replace = array('support-', 'problem-', 'solved-',);
      $url = str_replace($find, $replace, $url);

before :
Code: Select all
      $url = preg_replace('`\[.*\]`U','',$url);

Note that the ending hyphen ("-") is required to make sure that "[PB]My title" will result in "problem-my-title" and not in "problemmy-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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Re: Adding site name to topic and forum name

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

many thx, dcz
User avatar
Goroman
PR1
PR1
 
Posts: 139
Joined: Fri Mar 28, 2008 2:58 pm
Location: Poland

Re: Adding site name to topic and forum name

Postby korb » Tue Oct 20, 2009 1:08 am

Hello,

First of all, let me show you my latest work, my forum fully integrated visually with Joomla :) LINK HERE
I've done this integration once I updated to SEO-PREMOD 3.0.5.

The includes/function.php modification would be great to have a config option in phpBB seo class the next versions.

I want titles for my site like this, and options eventually in the next versions to do this:

for home - SITENAME - unchanged
------------not mandatory--------------
UCP - UCP |* SITENAME
MCP - MCP | SITENAME
------------not mandatory--------------
FORUM - SUBFORUM | FORUM | SITENAME
TOPIC - TOPIC | LATEST SUBFORUM* | SITENAME

*Symbol " | " is not mandatory.
*LATEST SUBFORUM* - for this setting, we can choose all forum structure, the last one, or none.

How can I do this trick modifying only overall_header? Pretty easy trick?


Regards,
Danny

PS - phpBB3-SEO-PREMOD 3.0.5 succesfully updated since 3.0.1 version.
User avatar
korb
PR0
PR0
 
Posts: 89
Joined: Thu Aug 21, 2008 2:42 am
Location: Planet 3

Re: Adding site name to topic and forum name

Postby dcz » Sat Oct 31, 2009 12:28 pm

As a matter of fact, next version of dynamic meta tags and optimal titles will have option in acp when using the ultimate seo url mod.

One of them will be to keep the site name at the end of all page titles.

To manually do it now, you can just add :
Code: Select all
   $page_title = $page_title && strpos($page_title, $config['sitename']) === false ? $page_title . ' - ' . $config['sitename'] : $page_title;

before :
Code: Select all
   // The following assigns all _common_ variables that may be used at any point in a template.
   $template->assign_vars(array(

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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Re: Adding site name to topic and forum name

Postby korb » Sat Oct 31, 2009 7:18 pm

Thanks for reply,
So if I replace : with • ?
would it make this change in all pages?

Danny
User avatar
korb
PR0
PR0
 
Posts: 89
Joined: Thu Aug 21, 2008 2:42 am
Location: Planet 3

Re: Adding site name to topic and forum name

Postby korb » Thu Nov 05, 2009 9:42 am

OK, tested your fix, but it gives an error, because there is an array that requires a 'PAGE_TITLE' = $page_title..................

What I did and solved my need brilliantly is this: commented that line, and added a new one with your code, but your code have to finish with , (comma) instead of ; dotcomma. Example:
Code: Select all
      //'PAGE_TITLE'               => $page_title,
      'PAGE_TITLE'                     =>  $page_title = $page_title && strpos($page_title, $config['sitename']) === false ? $page_title . ' • ' . $config['sitename'] : $page_title,



BUT: there is a tiny problem: USER CONTROL PANEL PAGE TITLES! Example:
Edit Profile - SitenameUsercontrol Panel

So Sitename string is unified with User Control Panel string. I gues this is a phpBB 3.0.x issue?


Good day
User avatar
korb
PR0
PR0
 
Posts: 89
Joined: Thu Aug 21, 2008 2:42 am
Location: Planet 3

Next

Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 6 guests