Page 1 of 1
Phoca Open Graph ignore the default image
Posted: 23 Jul 2015, 09:36
by TankWart
Hello
I use Joomla 3.4.3 and Phoca open graph 3.0.3.
Now I have the problem that the default image will be ignored if there is an image in an article.
If there is no image in an article, the default image is selected.
Does anyone know the problem?
Here is the link to the website:
http://www.lengler-gmbh.hesta-it.de/
Greeting
TankWart
Re: Phoca Open Graph ignore the default image
Posted: 24 Jul 2015, 15:51
by Jan
Hi, it depends on which site it is displayed - do you get the same behavior when you have a link to article only (one article)
The code is following:
Code: Select all
if ($this->params->get('image'.$suffix, '') != '') {
plgContentPhocaOpenGraphHelper::renderTag('og:image', JURI::base(false).$this->params->get('image'.$suffix, ''), $type);
} if (isset($pictures->{'image_intro'}) && $pictures->{'image_intro'} != '') {
plgContentPhocaOpenGraphHelper::renderTag('og:image', JURI::base(false).$pictures->{'image_intro'}, $type);
} else if (isset($pictures->{'image_fulltext'}) && $pictures->{'image_fulltext'} != '') {
plgContentPhocaOpenGraphHelper::renderTag('og:image', JURI::base(false).$pictures->{'image_fulltext'}, $type);
} else {
// Try to find image in article
First - set image which is set in Options
Second - if no image is set - select the one from introtext image (article options)
Third - if no image then from fulltext image (article options)
Fourth - and if nothing above - then try to find the image in article
Jan