Hi, guys.
I'm currently working on a video sitemap for a website running on ModX Revo 2.2.4-pl. Each video has its own rating (0-100). Each rating is entered on a template variable for each resource.
My problem stems from the fact that Google doesn't accept percentile rating. So I have to convert the current rating to a 0.00 to 5.00 marking.
Is there a way to automate this? Like dividing the current percentile rating by 20 before it shows up on the video sitemap.
By the way, I'm using getResources to create the sitemap with the following call:
[[!getResources? &parents=`108,2,5,163,39,3,4,6,7,8` &depth=`10` &limit=`1000` &tpl=`videositemap` &hideContainers=`1` &includeTVs=`1` &processTVs=`1`]]
The TPL (videositemap):
<url> <loc>http://www.domain.com/[[~[[+id]]]]</loc> <video:video> <video:thumbnail_loc>http://www.domain.com/[[+tv.thumbimage]]</video:thumbnail_loc> <video:title>[[+longtitle]]</video:title> <video:description>[[+tv.description]]</video:description> <video:content_loc>http://www.domain.com/[[+tv.swflocation]]</video:content_loc> <video:player_loc allow_embed="yes" autoplay="ap=1">http://get.adobe.com/flashplayer/</video:player_loc> <video:view_count>[[+tv.HitsPage]]</video:view_count> <video:rating>[[+tv.vidrating]]</video:rating> <video:publication_date>[[+publishedon:strtotime:date=`%Y-%m-%d`]]</video:publication_date> <video:family_friendly>yes</video:family_friendly> <video:uploader info="Uploaderl">Uploader</video:uploader> <video:live>no</video:live> </video:video> </url>
I would appreciate any insight regarding this.
Thanks in advance.
[[+tv.vidrating:div=`5`]]
Quote from: neil at Oct 27, 2012, 10:37 PMHi, guys.
I'm currently working on a video sitemap for a website running on ModX Revo 2.2.4-pl. Each video has its own rating (0-100). Each rating is entered on a template variable for each resource.
My problem stems from the fact that Google doesn't accept percentile rating. So I have to convert the current rating to a 0.00 to 5.00 marking.
Is there a way to automate this? Like dividing the current percentile rating by 20 before it shows up on the video sitemap.
By the way, I'm using getResources to create the sitemap with the following call:
[[!getResources? &parents=`108,2,5,163,39,3,4,6,7,8` &depth=`10` &limit=`1000` &tpl=`videositemap` &hideContainers=`1` &includeTVs=`1` &processTVs=`1`]]
The TPL (videositemap):
<url> <loc>http://www.domain.com/[[~[[+id]]]]</loc> <video:video> <video:thumbnail_loc>http://www.domain.com/[[+tv.thumbimage]]</video:thumbnail_loc> <video:title>[[+longtitle]]</video:title> <video:description>[[+tv.description]]</video:description> <video:content_loc>http://www.domain.com/[[+tv.swflocation]]</video:content_loc> <video:player_loc allow_embed="yes" autoplay="ap=1">http://get.adobe.com/flashplayer/</video:player_loc> <video:view_count>[[+tv.HitsPage]]</video:view_count> <video:rating>[[+tv.vidrating]]</video:rating> <video:publication_date>[[+publishedon:strtotime:date=`%Y-%m-%d`]]</video:publication_date> <video:family_friendly>yes</video:family_friendly> <video:uploader info="Uploaderl">Uploader</video:uploader> <video:live>no</video:live> </video:video> </url>
I would appreciate any insight regarding this.
Thanks in advance.
try:[[+tv.vidrating:div=`5`]]