2013-01-30, 22:46
(2013-01-30, 20:23)`Black Wrote: You need to use substrings (or multiple string compares) because there is no exact naming convention for ratings. Take a look at the flags code from Aeon Nox.
thanks I'll look it out and yes I noticed you did lot's of conditioning for USA ratings but I'm not sure I want to go down that route. Supporting most used name convention should be enough
e.g.
I did this for Italian ratings based on @Dakkars findings from the SQL database and seems to be working fine (well at least for him as I have no feedback from anyone else)
PHP Code:
<!-- IT ratings-->
<control type="image">
<description>IT-T Rating label</description>
<include>MPAADimensionsSmall</include>
<texture>flags/mpaa/IT/rating-t.png</texture>
<visible>StringCompare(ListItem.MPAA,T)</visible>
</control>
<control type="image">
<description>IT-VM14 Rating label</description>
<include>MPAADimensionsSmall</include>
<texture>flags/mpaa/IT/rating-vm14.png</texture>
<visible>StringCompare(ListItem.MPAA,VM14)</visible>
</control>
<control type="image">
<description>IT-VM18 Rating label</description>
<include>MPAADimensionsSmall</include>
<texture>flags/mpaa/IT/rating-vm18.png</texture>
<visible>StringCompare(ListItem.MPAA,VM18)</visible>
</control>
IMO this things should be standardized and forced upon a scrapers to avoid unnecessary conditioning.