A little over a year ago I wrote a PHP script that could be used as a very basic and simple Get Paid To website. The script was called the Vidcoin GPT Script which allowed your users to earn credits by watching short videos from the Virool network.
However Virool decided that offering cash rewards in any way or form was bad for business so they stopped accepting new publishers who were rewarding their users with money. The Vidcoin Script was left and forgotten, gathering dust on a virtual shelf…
Incentive WordPress plugin
Until one morning I asked myself: hey, if money’s no good, could I reward my users with something else? And so came the idea for a WordPress plugin that lets your already existing registered users earn coins by watching videos from the Virool network.
It’s totally up to you what you offer them in exchange for their coins as these coins are essentially your very own virtual currency and from Virool’s perspective, everything should be alright unless you let your users exchange their coins into fiat currency.
- For example, you could let a user publish a guest post on your blog once they have accumulated enough credits.
- Or if you are using the WooCommerce plugin and have listed something for sale, they could use coins to partially pay for these things.
- How about using coins to pay for banner impressions?
WP Plugin: Ynef’s Offerwall
Once again I have concentrated on the basics and so there aren’t a lot of built in features in the beta version, but it’s stable and functional and can be used right now. Here’s how it works:
First you need to create two files and put them into your child theme’s root directory (the folder where you have functions.php, single.php, style.css and so on). I promise this is the only technical part you have to do!
NB! It’s worth noting that my theme is based on the underscores starter theme so depending on your theme, the div containers could be different.
<?php /* Template Name: offerwall */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main"> <?php ynef_offerwall_content(); ?> </main><!-- #main --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
<?php /* Template Name: withdraw */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main"> <?php ynef_offerwall_withdraw(); ?> </main><!-- #main --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>
The next part involves creating custom pages in your blog using the WordPress built in Pages section. I’m sure you’ve already done something like this before:
- Create a new page called Offerwall
- From the page attributes -> Template drop down menu choose offerwall
- Save the page
- Create a new page called Withdraw
- From the page attributes -> Template drop down menu choose withdraw
- Save the page
Installing the Plugin
To install Ynef’s Offerwall plugin, simply put the ynef-offerwall folder into your wp-content/plugins directory and activate the plugin from your WordPress admin panel -> Plugins section.
Plugin and Virool settings
Currently there is only one setting in the plugin’s settings page and that’s for your Virool API key. You can get one if you join the Virool network and set up your website. Here are the settings you need to use in your Virool site:
- ActivSocial as Site Type
- Currency: 1 coin = 0.01 USD
- Callback URL: http://yoursite.com/offerwall?id=[USER_ID]&coins=[REWARD]
- Leave everything else as default and hit save
It’s advised that you remove them only when you have come to an agreement with the user as to what they will be receiving from you because once removed, these withdrawal requests cannot be recovered and the user is left with no balance.
Note: The remove function doesn’t yet exist even though the link is there. Stay tuned!
What this plugin does exactly?
When you first activate the plugin, it creates a new database table called wp_offerwalldata where it will store the username, ip address, coins balance and the amount of pending withdrawals for your user(s).
The coins balance is updated each time your user successfully watches a video until the end and they can withdraw it immediately without any minimum requirements.
If they continue doing this, the script will simply add up the numbers and the requests from one user will still show as just one single request instead of spamming your settings page with hundreds of requests.
It’s up to you how you advertise your virtual currency (coins) and explain what your users can get in exchange. One good example as I mentioned above is to either give special privileges to your users or allow them to publish a guest post on your blog. The choice is really up to you!
This post was written by ynef