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
Phoca Open Graph ignore the default image
-
- Phoca Newbie
- Posts: 2
- Joined: 25 Apr 2013, 19:35
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Open Graph ignore the default image
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:
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
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
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
If you find Phoca extensions useful, please support the project