Hi,
I'm using Phoca OpenGraph for a client website where the most images are from external urls, in this case OpenGraph doesn't work, because it create a wrong url for the image (the website url + the url of the image itself).
Can this be changed?
It would be really great!
Thanks
Viviana
OpenGraph with external images
-
- Phoca Hero
- Posts: 2818
- Joined: 28 Nov 2010, 17:20
Re: OpenGraph with external images
Hi Viviana,
Found this older thread: viewtopic.php?t=38952
The modified lines were from previous version 3.0.5. Downloaded & checked the latest one now: 3.1.2 and it's implemented starting line: 230. Sorry, I don't know, if above info will help you.
Kind regards
Christine
Found this older thread: viewtopic.php?t=38952
The modified lines were from previous version 3.0.5. Downloaded & checked the latest one now: 3.1.2 and it's implemented starting line: 230. Sorry, I don't know, if above info will help you.
Kind regards
Christine
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph with external images
Hi, which version of the extension do you use? System or Content plugin?
The plugin tries to find the images with full url:
So there should not be any problem with external images
Jan
The plugin tries to find the images with full url:
Code: Select all
$absU = 0;
// Test if this link is absolute http:// then do not change it
$pos1 = strpos($src[1], 'http://');
if ($pos1 === false) {
} else {
$absU = 1;
}
// Test if this link is absolute https:// then do not change it
$pos2 = strpos($src[1], 'https://');
if ($pos2 === false) {
} else {
$absU = 1;
}
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 6
- Joined: 24 Jan 2018, 11:45
Re: OpenGraph with external images
Hi Jan,
I have the content plugin version 3.1.2
That is how it shows on the page:
<meta name="og:image" content="http://clienturl.eu/https://gdb.rferl.o ... 3_r1_s.jpg">
The code you posted above search for a url in images inside the article, right. But my client has intro images...
Regards
Viviana
I have the content plugin version 3.1.2
That is how it shows on the page:
<meta name="og:image" content="http://clienturl.eu/https://gdb.rferl.o ... 3_r1_s.jpg">
The code you posted above search for a url in images inside the article, right. But my client has intro images...
Regards
Viviana
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph with external images
Hi, Ok, so this explains it all. For now there is no support for external urls in intro image, so I will implement it in next version.
Thank you for the info.
Jan
Thank you for the info.
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: OpenGraph with external images
Hi, should be Ok now in version 3.1.3 (Content plugin), 3.0.5 (System plugin):
https://www.phoca.cz/news/1027-phoca-op ... 5-released
Jan
https://www.phoca.cz/news/1027-phoca-op ... 5-released
Jan
If you find Phoca extensions useful, please support the project