Open Graph - Intro Image

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
User avatar
componentegd
Phoca Member
Phoca Member
Posts: 21
Joined: 31 Mar 2015, 22:39
Location: Rio de janeiro - Brazil
Contact:

Re: Open Graph - Intro Image

Post by componentegd »

Jan wrote:Ok, will be great if you can paste whole code of the phocaopengraph.php

If you will use GIST (on GitHub) will be great - to see the changes.

Jan
Ok, I did it. It is in this link below:
https://gist.github.com/anonymous/139d7d8e29128b798a10

As you can see, I just added the following code starting in line 79 ending in line 86.

Hope it can be helpful.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph - Intro Image

Post by Jan »

Ok, thank you, did you finish the changes?

Jan
If you find Phoca extensions useful, please support the project
User avatar
componentegd
Phoca Member
Phoca Member
Posts: 21
Joined: 31 Mar 2015, 22:39
Location: Rio de janeiro - Brazil
Contact:

Re: Open Graph - Intro Image

Post by componentegd »

Jan wrote:Ok, thank you, did you finish the changes?

Jan
Well, for today it is fitting me, but only for one website. It would be better if I could choose from wherever I want the image from. Or just find the image automatically.

But like I said before, I don't have the skills to do that. I just manage to find how to get the intro image.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph - Intro Image

Post by Jan »

Hi, in the plugin, there is a feature to try to find the image in article, so maybe such can be used or modified?

Jan
If you find Phoca extensions useful, please support the project
User avatar
componentegd
Phoca Member
Phoca Member
Posts: 21
Joined: 31 Mar 2015, 22:39
Location: Rio de janeiro - Brazil
Contact:

Re: Open Graph - Intro Image

Post by componentegd »

Jan wrote:Hi, in the plugin, there is a feature to try to find the image in article, so maybe such can be used or modified?

Jan
Hi, Jan.
I believe this feature can be improved to also be able to find an image from "Intro Image".
I wish I had the skills to improve to do that, but I don't.
sven@mediafish.es
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 12 May 2015, 10:02

Re: Open Graph - Intro Image

Post by sven@mediafish.es »

Hi,

Adding the possibility to choose the intro image for articles and category image for categories would really help.
As it is now phoca chooses a random image from the article which in my case has nothing to do with the main topic of the article - basically the same as FB does...so the Plugin makes not much sense for images

Also I tested the code from Github and it does not choose my intro images.
User avatar
componentegd
Phoca Member
Phoca Member
Posts: 21
Joined: 31 Mar 2015, 22:39
Location: Rio de janeiro - Brazil
Contact:

Re: Open Graph - Intro Image

Post by componentegd »

sven@mediafish.es wrote:Hi,

Adding the possibility to choose the intro image for articles and category image for categories would really help.
As it is now phoca chooses a random image from the article which in my case has nothing to do with the main topic of the article - basically the same as FB does...so the Plugin makes not much sense for images

Also I tested the code from Github and it does not choose my intro images.
Hi!
I even think would be great if we could just select and image to use each article or category to Facebook. But you gave a nice idea!

About the code, it worked for me, you can see here working: www.jornaljbp.com.br

It's not 100%. Some articles it just doesn't get the image, it capture from modules calling articles. About the main page won't work, cause this template uses different menu item.

Thanks for the help!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph - Intro Image

Post by Jan »

Ok, thank you, Jan
If you find Phoca extensions useful, please support the project
sotisanis88
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 18 May 2015, 08:53

Re: Open Graph - Intro Image

Post by sotisanis88 »

hello, please help me, i have the same problem, i copy the code but when i share hidden the photo, please tell me how i find the solution, or how i can select the image when i share?
sotisanis88
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 18 May 2015, 08:53

Re: Open Graph - Intro Image

Post by sotisanis88 »

pleaseee tell me if you have any solution!!!
Post Reply