Phoca Graph - Issue

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
justme
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jul 2015, 02:28

Phoca Graph - Issue

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Graph - Issue

Post 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
If you find Phoca extensions useful, please support the project
justme
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jul 2015, 02:28

Re: Phoca Graph - Issue

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Graph - Issue

Post 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
If you find Phoca extensions useful, please support the project
justme
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Jul 2015, 02:28

Re: Phoca Graph - Issue

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Graph - Issue

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply