-
AuthorPosts
-
Saguaros Moderator
Saguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 26, 2015 at 4:42 am #756711Hi
We override the com_content to support OG tag, you can try with this tweak:
– Open this file: root/templates/ja_magz_ii/html/com_content/article/default.php (remember to backup the old file first)
– At approx line 40, at below snippet of code:
JHtml::_('bootstrap.tooltip');// Add Facebook tags
$doc = JFactory::getDocument();
$fblog = '<meta property="og:type" content="article" />'."n";
$fblog .= '<link rel="image_src" content="'.JUri::base().$images->image_fulltext.'" />'."n";
$fblog .= '<meta property="og:image" content="'.JUri::base().$images->image_fulltext.'" />'."n";
if($this->item->tags->itemTags != null){
$this->item->rawtagLayout = new JLayoutFile('joomla.content.rawtags');
$fblog .= '<meta property="article:tag" content="'.$this->item->rawtagLayout->render($this->item->tags->itemTags).'" />'."n";
}
$doc->addCustomTag($fblog);
it looks like this: http://prntscr.com/971oxy
I also attach this file here so that you can make a comparison
November 27, 2015 at 5:51 pm #758717Its very close
Im using: – Phoca Open Graph Plugin and Al Plugin Face Comment
1. if I use the share botton, just pick up the image an the error, with the correct option on as first chose
2. If I copy and paste the link, happens the same as the 1 option.
Saludos
November 29, 2015 at 9:29 pm #758783<em>@Saguaros 504034 wrote:</em><blockquote>Hi
We override the com_content to support OG tag, you can try with this tweak:
– Open this file: root/templates/ja_magz_ii/html/com_content/article/default.php (remember to backup the old file first)
– At approx line 40, at below snippet of code:
JHtml::_('bootstrap.tooltip');// Add Facebook tags
$doc = JFactory::getDocument();
$fblog = '<meta property="og:type" content="article" />'."n";
$fblog .= '<link rel="image_src" content="'.JUri::base().$images->image_fulltext.'" />'."n";
$fblog .= '<meta property="og:image" content="'.JUri::base().$images->image_fulltext.'" />'."n";
if($this->item->tags->itemTags != null){
$this->item->rawtagLayout = new JLayoutFile('joomla.content.rawtags');
$fblog .= '<meta property="article:tag" content="'.$this->item->rawtagLayout->render($this->item->tags->itemTags).'" />'."n";
}
$doc->addCustomTag($fblog);
it looks like this: http://prntscr.com/971oxy
I also attach this file here so that you can make a comparison</blockquote>
I tried this and nothing happens.
Not sure why it is so difficult to add OpenGraph meta tags in the header?
Where are the images declared? Should be able to dynamically populate the large image.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
November 30, 2015 at 2:31 am #758787KIndly check the article you want to share and make sure that you add images for article via ‘Images and Links‘ tab: http://prntscr.com/98jfpa
-
AuthorPosts
This topic contains 19 replies, has 4 voices, and was last updated by Saguaros 8 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum