Saturday, 25 October 2014 01:31
beggarly

Last modification date from last vote

An open forum for opinions and general questions

Last modification date from last vote

Postby pienso » Thu Nov 15, 2012 12:34 pm

Hi,

Is there an option to use as last modification date in xml format not modification date of article but date of last vote?
We use microformatsvotes and from its columns you can get date of last vote for each article.

We need this beacause of this situation: article is indexed by google without voting, then after new votes google doesn't index article again - because of old modification time.
pienso
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Mon Jun 25, 2012 6:13 pm

Re: Last modification date from last vote

Postby pienso » Tue Nov 27, 2012 2:42 pm

We did it for ourselves.
In xmap com_content plugin query from includeCategoryContent() is altered with lines

Code: Select all
SELECT ....., UNIX_TIMESTAMP(comment.date) as modified_comment, UNIX_TIMESTAMP(vote1.submitted) as modified_vote1
....
LEFT JOIN ( select c1.contentid, max(c1.id) as id FROM #__comment c1 WHERE c1.published=1 and c1.component=\'com_content\' GROUP BY c1.contentid ORDER BY c1.contentid) AS commentMax ON (a.id = commentMax.contentid)
LEFT JOIN #__comment AS comment ON (comment.id = commentMax.id)
               
LEFT JOIN ( select v1.content_id, max(v1.submitted) as submitted FROM #__mfv_anonymous v1 GROUP BY v1.content_id ORDER BY v1.content_id) AS vote1Max ON (a.id = vote1Max.content_id)
LEFT JOIN #__mfv_anonymous AS vote1 ON (vote1.submitted = vote1Max.submitted )


then in loop I use the newest time from comment, vote or article modification time.
Mayby there is a way to put something similar to new release of xmap content plugin?
pienso
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Mon Jun 25, 2012 6:13 pm


Return to General



Who is online

Users browsing this forum: Google [Bot] and 4 guests