MyBB Community Forums

Full Version: Add Google Authorship Markup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Guys how can I link my forum to Google Authorship?
I am thinking about how users can link their Google profiles to their threads!!
Maybe I can add a section to the postbit called something like G+ author profile or similar and users will have the option in newthread to add their g+ profile link!

I need to add this code
<a href="[profile_url]?rel=author">Google</a>

I am thinking what if I put it into my header!
(2013-12-10, 04:19 PM)marcus123 Wrote: [ -> ]
<a href="[profile_url]?rel=author">Google</a>

I am thinking what if I put it into my header!

if you add this is header, it will work only for one profile. you have to add new field in user profile and include this on every thread page created by him/her.

actually i don't know how to do that step by step but i know this is right way.
hope someone will help !
@kartic thanks very much man I appreciate you help
(2013-12-10, 04:19 PM)marcus123 Wrote: [ -> ]Guys how can I link my forum to Google Authorship?
I am thinking about how users can link their Google profiles to their threads!!
Maybe I can add a section to the postbit called something like G+ author profile or similar and users will have the option in newthread to add their g+ profile link!

I need to add this code
<a href="[profile_url]?rel=author">Google</a>

I am thinking what if I put it into my header!

You have your link wrong.
<a href="[profile_url]" rel="author">Google</a>

Of course, you need to change profile_url to a link to the author's profile.
Hi I am not sure please check it out and post here the correct link to use
https://support.google.com/webmasters/an...9557?hl=en
(2013-12-13, 11:10 AM)marcus123 Wrote: [ -> ]Hi I am not sure please check it out and post here the correct link to use
https://support.google.com/webmasters/an...9557?hl=en

Weird that Google would break standards like that. Also, how do you determine who the author of the page is? Several members each contribute posts to the thread.
They don't break anything, it's just part of URL for their own usage. rel="author" is something else, not only for Google profile.

As for topic, just add custom profile field in ACP for those profile urls and then add this code to postbit/postbit_classic:
<a href="{$post['fidX']}?rel=author">Google</a>
where X is the profile field ID.

Or even better with Template Conditionals (so it won't display if someone didn't fill profile link):
<if $post['fidX'] then>
<a href="{$post['fidX']}?rel=author">Google</a>
</if>

Another enhancement - install Additional Settings For Custom Profile Fields http://mybbhacks.zingaburga.com/showthre...271&page=1 and add regex for the field so it will allow only correct URLs. I guess this is a good start, I have no idea about regexes though:
^https?://plus.google.com/.*
Holy cow D666 you just nailed it baby thanks very much