Thanks dev_cw, it’s working great! PHx is great stuff - it runs natively in Ditto, so there was no need to install it. I’m not a PHP guy, but I use PHx currently for things like: [+thing:notags+]. I never knew you could write custom modifiers for it. Thanks again.
The comma was still tripping up the orderBy, but I didn’t notice until today. So, I switched up the ditto call. Previously, I had &orderBy=`tvsize DESC` and it wasn’t working so I replaced it with sortBy=`tvsize` and sortDir=`DESC` now all works as advertised. FYI for anyone looking for a solution to similar issues.