I got some WONDERFUL help from @Michael Bissett on this thread, and I was wondering if I would possibly have any good luck again and get someone to help me out with a NEW problem I'm trying to figure out?! (I'm trying to learn some programming on my own, and I'm starting to put some of the pieces together here and there -- but I still need to learn a LOT).
In the previous thread we were able to come up with a solution for restricting uploads of videos to my site for free subscribers. Now I'm wondering if it's at all possible to also HIDE videos altogether for those same free subscribers.
I'm using the rtMedia plugin for uploads, and the s2Member plugin for Membership.
Unfortunately it's not like I have all videos relegated to a certain page -- because if that was the case, it would be really easy just to use s2Member to restrict access to that page for paid users only. Instead, videos populate the site in several places that free subscribers will have access too -- including many member's profiles.
So is it possible to HIDE videos for my free members? Or at the very least prevent them from playing them??
I asked the guys at rtMedia if they had any filters or hooks or whatever that would help in this situation, and this is what they said:
Yes, it is possible to hide media from certain member roles. Please have a look at the available hooks for SQL query to fetch media: https://github.com/rtCamp/rtMedia/blob/master/app/helper/RTMediaModel.php#L102 Using these filters, you can alter the SQL query to fetch media.
So apparently the rtmedia-model-select-query filter is the key, here. But...I know nada about altering SQL queries. Is this something relatively easy, or quite difficult to do?
Any help/suggestions/leads/clues/sample code that anyone could offer would be HIGHLY appreciated!