Page 1 of 2
Phoca Open Graph images
Posted: 20 Oct 2019, 08:34
by Bensch14
Hello together,
hope you can help me.
I installed the Phoca Open Graph Content Plugin, but the point 6 from the documentation doesn't work.
6) If the image is not found in article, then the folder on the server: images/phocaopengraph will be searched. So if there is some image inside this folder, this will be used.
I have an image in this folder, but it doesn't show If an article have no image. Can you help me?
Re: Phoca Open Graph images
Posted: 21 Oct 2019, 12:57
by Jan
Hi, what is the meta tag in this case? Is empty, doesn't exist or includes another item?
Which plugin do you use? System or Content?
Jan
Re: Phoca Open Graph images
Posted: 21 Oct 2019, 16:51
by Bensch14
Hello Jan,
thanks for your reply. I use the content plugin, but don't know the difference^^
In this case the meta tag doesn't exist.
For example:
<meta name="og:title" content="M1: SG gibt Punkte in der Heimat ab" />
<meta name="og:type" content="article" />
<meta name="og:url" content="
https://mysg.de/mysg/index.php/maenner/ ... -heimat-ab" />
<meta name="og:site_name" content="mySG.de - Aktuelles - Berichte - Mannschaften" />
<meta name="og:description" content="Die SG Nebringen/Reusten muss nach einem spannenden Spiel gegen die Spvgg Renningen zwei Punkt abgeben." />
Kind regards,
Bensch
Re: Phoca Open Graph images
Posted: 22 Oct 2019, 00:15
by Jan
So, this means, the image is not found:
It seems like the documentation was not complete, I have fixed it:
- image should be stored in folder: images/phocaopengraph
- it should be named by article ID. So if you want to display an image for article with ID 36, the image should be: images/phocaopengraph/36.png
Jan
Re: Phoca Open Graph images
Posted: 22 Oct 2019, 18:46
by Bensch14
thanks, but this didn't work for me.
I named the image 591.jpg, but nothing happend.
However, this is not an solution for me, I don't want the same image 100 times, for each article without an individual image. That don't make sence for me.
Is there any other solution? If there is no image in the article, take a specific image. Hope you understand my question.
Kind regards
Bensch
edit: ok now the 591.jpg image works
Re: Phoca Open Graph images
Posted: 22 Oct 2019, 22:05
by Jan
If the image should be always the same, then just set it into Phoca Open Graph parameters:
Jan
Re: Phoca Open Graph images
Posted: 22 Oct 2019, 22:25
by Bensch14
Hey,
No not always the same, only if no image in the article selected.
1. Preview article image
2. Complete article image
3. Specific Image (always the same)
Is this possible?
Re: Phoca Open Graph images
Posted: 23 Oct 2019, 16:59
by Jan
Hi, all it is based on this flow:
https://www.phoca.cz/documents/70-phoca ... open-graph
So it depends if it will just meet the rules:
If there is no image set in menu link category options, article options, intro image, full image and not inside the article, not in the folder, then the image from plugin parameters will be set.
Jan
Re: Phoca Open Graph images
Posted: 23 Oct 2019, 17:26
by Bensch14
lol, thank you very much, so all is fine.
I had a problem with this description in the plugin:
Set image. If image will be not set here, plugin will try to find the image in article content. If article does not contain any image, plugin will try to search /images/phocaopengraph/ folder for image which has the same name as article ID has (e.g. article ID=1 ==> 1.jpg). See documentation to understand this behaviour.
I thought, if I set an image in the plugin, the plugin always use this image.
Re: Phoca Open Graph images
Posted: 25 Oct 2019, 13:37
by Jan
The problem is, there is some flow of possible scenarious and there can be e.g. 7 ways how to set the image and you only have one first place. So "the plugin always use this image" could be done only for first option and if the first option is not the right, the flow needs to be customized manually in the plugin code. So only first option can be marked as "always use" - any other option then is dependend to previous option.
Jan