-
Hello,
I’m a FV Player Pro customer. I want to be able to disable video ads for logged-in users, to encourage people to sign up.
Is this possible?
Thanks in advance
Foliovision › Forums › FV Player › Requests and Feedback › Disable Video Ads For Logged-in Users
I think I might have figures this out by editing line 2788 on fv-player-pro.class.php
Old:
if (count($aVideoAdsEnabled) == 0 ) {
return $aItems;
}
New:
if (count($aVideoAdsEnabled) == 0 OR is_user_logged_in() ) {
return $aItems;
}
Do you agree this is the right place to put the code? I’m guessing there could be an easier way but I just don’t want to wait for another update. Can I keep this as it is without problems?
Thank you
Hello MBD,
you shouldn’t be modifying any plugin core code.
Instead, you can unhook the function which puts in these video ads via WP filters API by putting this code into your theme functions.php file:
add_action( 'init', 'fv_tweak_video_ads' ); function fv_tweak_video_ads( $arg ) { if( is_user_logged_in() ) { global $FV_Player_Pro; remove_filter( 'fv_flowplayer_playlist_items', array( $FV_Player_Pro, 'video_ads' ), 10, 2 ); remove_filter( 'fv_flowplayer_playlist_item_html', array( $FV_Player_Pro, 'video_ads_item_html') ); } }
Please let us know how it goes. We could add an option for this as well, but then some websites will require that the user has a paid membership and then it goes really complex. We should master that though.
Thanks,
Martin
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie allow you to log in and download your software or post to forums.
We use the WordPress login cookie and the session cookie.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.
We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.
Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.
Please enable Strictly Necessary Cookies first so that we can save your preferences!