How to put the topic title before site name in overall header file?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
WWu777
Registered User
Posts: 537
Joined: Tue Aug 14, 2007 12:40 pm
Contact:

How to put the topic title before site name in overall header file?

Post by WWu777 » Wed Nov 22, 2017 2:57 pm

Dear support,

I was told to come to this board for this coding questions. I'm currently editing the installation files in my phpbb 3.2 installation package.

If I want to change the title tag so that the topic title appears first and then the site name after, what do I change in the code below from the overall header file so that it displays in search results like this "Topic Title - Site Name":


<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>


Btw why does the site title showing first before the topic title? It should be topic title first. That's much better for SEO. So why isn't it the default too? I thought that would have been fixed by now?

Also, is there a way to make the topic title longer when submitting posts? I find that some titles are too long for the post forum. Can that field be made longer in the post form? The title field on this forum seems to allow you to have longer titles than the default.

Thanks.
Last edited by WWu777 on Wed Nov 22, 2017 4:15 pm, edited 2 times in total.

User avatar
david63
Jr. Extension Validator
Posts: 13899
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: How to put the topic title before site name in overall header file?

Post by david63 » Wed Nov 22, 2017 3:02 pm

I am not sure that it makes the slightest bit of difference with SEO (which is not really needed for a phpBB board - but that has been argued to death elsewhere!). I have a board that is top ranked in Google UK and in the top five in Google generally and I have not made one single change to accommodate SEO.

Anyway I believe that this will have been fixed in an upcoming version of phpBB where the Site name/Topic title will be consistent.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

WWu777
Registered User
Posts: 537
Joined: Tue Aug 14, 2007 12:40 pm
Contact:

Re: How to put the topic title before site name in overall header file?

Post by WWu777 » Wed Nov 22, 2017 4:17 pm

Well it seems I was wrong. The default template is showing the topic title before the site title after all. I just looked at one of my topic pages and noticed the topic title is shown first in the title tags.

http://www.happierabroad.com/forum/view ... 15&t=29185

Btw, of course SEO matters, and you gotta put the most important keywords at the front. Google is only gonna pay attention to the first 10 words or so. That's basic SEO 101 that everyone knows. There's no debate about it.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 2690
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: How to put the topic title before site name in overall header file?

Post by HiFiKabin » Wed Nov 22, 2017 5:14 pm

Q: Does Google ever use the "keywords" meta tag in its web search ranking?

A: In a word, no. Google does sell a Google Search Appliance, and that product has the ability to match meta tags, which could include the keywords meta tag. But that's an enterprise search appliance that is completely separate from our main web search. Our web search (the well-known search at Google.com that hundreds of millions of people use each day) disregards keyword metatags completely. They simply don't have any effect in our search ranking at present.
https://webmasters.googleblog.com/2009/ ... a-tag.html

(... and yes I know that quote is from 2009. It hasn't been updated since then so is therefore still the case)

WWu777
Registered User
Posts: 537
Joined: Tue Aug 14, 2007 12:40 pm
Contact:

Re: How to put the topic title before site name in overall header file?

Post by WWu777 » Wed Nov 22, 2017 5:47 pm

HiFiKabin wrote:
Wed Nov 22, 2017 5:14 pm
Q: Does Google ever use the "keywords" meta tag in its web search ranking?

A: In a word, no. Google does sell a Google Search Appliance, and that product has the ability to match meta tags, which could include the keywords meta tag. But that's an enterprise search appliance that is completely separate from our main web search. Our web search (the well-known search at Google.com that hundreds of millions of people use each day) disregards keyword metatags completely. They simply don't have any effect in our search ranking at present.
https://webmasters.googleblog.com/2009/ ... a-tag.html

(... and yes I know that quote is from 2009. It hasn't been updated since then so is therefore still the case)
Meta tags were outdated years ago. We are talking about TITLE tags here. In the tab at the top in your browser, hold your mouse over it and you will see the words in the title tags. In this forum, each title tag starts with "phpBB" first before the title of the topic. TITLE tags are very important, along with the words in the permalink, or URL with words in it. Look it up on any SEO site. It's basic knowledge.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 18884
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: How to put the topic title before site name in overall header file?

Post by Mick » Wed Nov 22, 2017 7:02 pm

WWu777 wrote:
Wed Nov 22, 2017 4:17 pm
There's no debate about it.
Ya reckon?
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

WWu777
Registered User
Posts: 537
Joined: Tue Aug 14, 2007 12:40 pm
Contact:

Re: How to put the topic title before site name in overall header file?

Post by WWu777 » Wed Nov 22, 2017 7:33 pm

Mick wrote:
Wed Nov 22, 2017 7:02 pm
WWu777 wrote:
Wed Nov 22, 2017 4:17 pm
There's no debate about it.
Ya reckon?
Yes. When someone googles a word, Google will show results right? Well Google searches for results from the title tags of webpages as well as the text and permalink URL. The words in the title tag show up in the Google search results. So of course they are of primary importance. For example, use the Google search box at the top of this forum and you will see. The title of topics come up and those titles are in the title tags. Everyone knows this right? Are you being sarcastic here? lol

See this for instance:

https://www.google.com.tw/search?dcr=0& ... FSYUsBxMwg

Notice how Google shows results from this site using the topic title tag. So of course it is of major importance. This has nothing to do with meta tags. The person above mistakenly connected the two. I guess you folks aren't familiar with basic SEO? Well I guess now you learned something today. :P

User avatar
warmweer
Registered User
Posts: 963
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: How to put the topic title before site name in overall header file?

Post by warmweer » Fri Nov 24, 2017 9:42 am

WWu777 wrote:
Wed Nov 22, 2017 7:33 pm
...
I guess you folks aren't familiar with basic SEO? Well I guess now you learned something today. :P
Wow!! (and that's about the only comment I'm going to make, since there's no debate :lol: ).
A bug is a feature that hasn't made it to the manual (yet)

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 5 guests