Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 10 Jan 2012, 19:58
Anyoldname Anyoldname is offline
 
Join Date: Jan 2009
og image, title & url - Title doesn't display

I added the following code to headerinclude to display the correct thumbnail, title & url when people share links in facebook.
The thumb & the url work ok, but the link in facebook just displays {TITLE}. Not sure what I did wrong.
I'm using 4.4.0


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 10 Jan 2012, 20:15
LifesGreatestGift's Avatar
LifesGreatestGift LifesGreatestGift is offline
 
Join Date: Jul 2009
Title of thread or forum?

Thread is {vb:raw thread.title} and must be used in SHOWTHREAD template
FORUM title is {vb:raw vboptions.bbtitle}
Reply With Quote
  #3  
Old 10 Jan 2012, 20:38
Anyoldname Anyoldname is offline
 
Join Date: Jan 2009
Ah ok great thanks!

So, I put: <meta property="og:title" content="{vb:raw thread.title}"/> in showthread and that does indeed now show the thread title when it is shared on fb.

But I tried putting <meta property="og:title" content="{vb:raw vboptions.bbtitle}"/> in headinclude and forumhome (one after the other, not both at the same time), but the title still displays as {TITLE}.

Should it go somewhere else?
Reply With Quote
  #4  
Old 10 Jan 2012, 20:56
LifesGreatestGift's Avatar
LifesGreatestGift LifesGreatestGift is offline
 
Join Date: Jul 2009
there is no need to put anything in headinclude.

make sure you delete your original
<meta property="og:title" content="{TITLE}"/>
from whatever template you put it in, then in FORUMHOME
add
<meta property="og:title" content="{vb:raw vboptions.bbtitle}"/>

and in FORUMDISPLAY add

<meta property="og:title" content="{vb:raw foruminfo.title_clean} - {vb:raw vboptions.bbtitle}"/>
incase someone decides to manually share a link to a forum instead of the main forum page (FORUMHOME) or a thread (SHOWTHREAD)


SO....
------------------------------------------------------------------

FORUMHOME
<meta property="og:title" content="{vb:raw vboptions.bbtitle}"/>

FORUMDISPLAY
<meta property="og:title" content="{vb:raw foruminfo.title_clean} - {vb:raw vboptions.bbtitle}"/>

SHOWTHREAD
<meta property="og:title" content="{vb:raw thread.title}"/>
if you'd like to include the name of your site after a thread title then do the following
<meta property="og:title" content="{vb:raw thread.title} - {vb:raw vboptions.bbtitle}"/>
Reply With Quote
  #5  
Old 10 Jan 2012, 21:04
Anyoldname Anyoldname is offline
 
Join Date: Jan 2009
Aha, worked a treat. Thank you so much!
Reply With Quote
  #6  
Old 03 Feb 2012, 23:11
CouponWCents CouponWCents is offline
 
Join Date: Jun 2011
I had this in headinclude:
<meta property="og:title" content="{vb:raw vboptions.bbtitle}"/>
<meta name="description" content="{vb:raw vboptions.description} " />
<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" />
<meta id="e_vb_meta_bburl" name="vb_meta_bburl" content="{vb:raw vboptions.bburl}" />
<base href="{vb:raw basepath}" /><!--[if IE]></base><![endif]-->
<meta name="generator" content="vBulletin {vb:raw vboptions.templateversion}" />

I removed it all and added what you said above in those templates and it still isn't working.
Reply With Quote
  #7  
Old 07 Feb 2012, 21:03
xertox xertox is offline
 
Join Date: Apr 2011
Real name: William Tower
This is what I used in showthread. Adds description to the facebook share. Google plus and twitter preview as well... Also adds page number if link is manually shared from page 2+ of the thread.


<meta property="og:site_name" content="Fatwillie.Net - Forums" />

<meta property="og:title" content="{vb:raw thread.prefix_plain_html} {vb:raw thread.title}<vb:if condition="$pagenumber > '1'"> - {vb:rawphrase page_x, {vb:raw pagenumber}}</vb:if>" />

<meta property="og:description" content="{vb:raw thread.meta_description}" />

<meta property="og:url" content="{vb:raw vboptions.bburl}/{vb:raw thread_url}" />

<meta property="og:type" content="article" />


I think it would be pretty sweet if there were some way to grab the video or image URL so that could be embedded via meta tags as well. Anyone know of a way to grab the video/img URL when it is submitted via the editor?
Reply With Quote
  #8  
Old 11 May 2012, 15:09
dennisuello dennisuello is offline
 
Join Date: Mar 2005
Real name: Denis
Thank you for figuring this out. It's been bugging me for a while that when I share a link on facebook it doesn't pull the tile and description from the thread. Now, it's all good and both of my forums are "fixed".
__________________
OverlandHUB.com
Reno4x4.com
Reply With Quote
  #9  
Old 06 Jun 2012, 23:50
dennisuello dennisuello is offline
 
Join Date: Mar 2005
Real name: Denis
hmmm, this stopped working with 4.2.0 for me
__________________
OverlandHUB.com
Reno4x4.com
Reply With Quote
  #10  
Old 19 Jul 2012, 15:49
Domiav Domiav is offline
 
Join Date: Oct 2011
hello guys, i'm having the same problem on 4.2.0; any one have a solution for it?
Previous ones doesn't work.
Thank you!
Reply With Quote
  #11  
Old 19 Nov 2012, 14:29
Skierpetros's Avatar
Skierpetros Skierpetros is offline
 
Join Date: Feb 2008
Real name: Skierpetros
any solutions?
Reply With Quote
  #12  
Old 24 Nov 2012, 10:23
Kraxell's Avatar
Kraxell Kraxell is offline
 
Join Date: Jun 2010
Real name: Andi
Would be nice for me too.
__________________
Visit me on Youtube http://www.youtube.com/user/KraxellPlay
Reply With Quote
  #13  
Old 30 Dec 2012, 18:17
manuel4 manuel4 is offline
 
Join Date: May 2012
Same problem. Facebook doesn't include the meta tags I provided especially for FB
Reply With Quote
  #14  
Old 19 Mar 2013, 22:11
Divvy Divvy is offline
 
Join Date: Nov 2008
Thank you LifesGreatestGift

Worked perfectly on 4.2.0 version.

Btw, do you have any fix to display the first image of the topic on og:image ?

Regards,
Divvy
Reply With Quote
  #15  
Old 21 Jul 2017, 22:23
concepts's Avatar
concepts concepts is offline
 
Join Date: May 2005
Real name: Jamale
Originally Posted by LifesGreatestGift View Post
there is no need to put anything in headinclude.

make sure you delete your original
<meta property="og:title" content="{TITLE}"/>
from whatever template you put it in, then in FORUMHOME
add
<meta property="og:title" content="{vb:raw vboptions.bbtitle}"/>

and in FORUMDISPLAY add

<meta property="og:title" content="{vb:raw foruminfo.title_clean} - {vb:raw vboptions.bbtitle}"/>
incase someone decides to manually share a link to a forum instead of the main forum page (FORUMHOME) or a thread (SHOWTHREAD)


SO....
------------------------------------------------------------------

FORUMHOME
<meta property="og:title" content="{vb:raw vboptions.bbtitle}"/>

FORUMDISPLAY
<meta property="og:title" content="{vb:raw foruminfo.title_clean} - {vb:raw vboptions.bbtitle}"/>

SHOWTHREAD
<meta property="og:title" content="{vb:raw thread.title}"/>
if you'd like to include the name of your site after a thread title then do the following
<meta property="og:title" content="{vb:raw thread.title} - {vb:raw vboptions.bbtitle}"/>
Came here to say this method worked perfectly on my 4.2.3 board! Thanks!
__________________

Achieving Superior Aesthetic Conditioning
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forum Display Enhancements Forumdisplay Template - Sub Category Title & Description Display Fix phpdesk vBulletin 4.x Template Modifications 10 12 Dec 2011 09:12



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:43.

Layout Options | Width: Wide Color: