Page 1 of 1

Phoca Graph - Issue

Posted: 26 Jul 2015, 02:45
by justme
Hi,

I set up the Phoca Open graph on a website. It works almost perfect.
For article page is wonderfull.

I have an issue with a category page witch is the main page on the website uipt.ca
I use Easy Blog on website and the main page is basicly a category view.
I have 6 articles on the page.
I don't know why Phoca Open Graph choose for "og:title" the last article from the end of the page. It suposed to use the first article listed on the page.
For precision, the category view is listing the articles on descending order of creation date.

I would like if posible for Open Graph to choose for og:title the first article on the page or if not possible, I would like to disable it from the main page.
Is it possible?

The website is uipt.ca

Thank you

Re: Phoca Graph - Issue

Posted: 26 Jul 2015, 20:23
by Jan
Hi, see the code:
plugins\content\phocaopengraph\phocaopengraph.php

you can try to change the ordering here (cca line 67):

Code: Select all

$query = ' SELECT c.metadesc, c.title FROM #__categories AS c'
			    .' WHERE c.id = '.(int) $row->catid . ' LIMIT 1';
Add ORDER BY (ASC or DESC)

Jan

Re: Phoca Graph - Issue

Posted: 27 Jul 2015, 00:28
by justme
Hi,

Thanks for your time Jan,

I'm not good at php...
Do I need to add after the line 68 the following line?

Code: Select all

$row->orderBy('DESC');
Thanks for helping me

Re: Phoca Graph - Issue

Posted: 29 Jul 2015, 09:06
by Jan
Hi, sorry for confusing, the ordering can be change to:

Code: Select all

$query = ' SELECT c.metadesc, c.title FROM #__categories AS c'
			    .' WHERE c.id = '.(int) $row->catid . ' ORDER BY c.rgt DESC LIMIT 1';
(or change to ASC)

It can change the ordering of the category, not article, unfortunately the plugin is a content plugin which is part of the article, so it cannot influence the loading (ordering) or articles.


But for now really cannot say which part can change the ordering of the articles on your site (as the content plugin cannot influence it :idea: )

Jan

Re: Phoca Graph - Issue

Posted: 29 Jul 2015, 23:19
by justme
Thanks Jan for your time,
As you said it doesn't change the order.
No problem, I will redesign the first page.

Another thanks for your great products. I use and I'm verry happy with the Phoca Graph, Phoca Gallery, and Phoca Email.

Re: Phoca Graph - Issue

Posted: 05 Aug 2015, 00:19
by Jan
Ok