WP Plugin: Virool offerwall (videos wall) for earning credits

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.


/* 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(); ?>


/* 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

Ynef's Offerwall Settings Admin Panel Page ScreenshotOnce your users start to withdraw their coins you’ll notice them appear on the plugin’s settings page under the save settings button.

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!

Author: ynef

29 year old freelance writer and web developer. A technophile who appreciates and respects mother nature in all of its glory. Favorite skills in Runescape include Farming, Herblore and Magic.

  • SwedishGuy86

    Is there an referral option?
    Like: A invites X amount of friends (B) they invite their own friends (C), A earns 0.05 points everytimes one the guys B and C complete and offer individually. And the B guys from their own C friends and so on.
    If not, could you make it with like 3-5 (ref line) that would make this script so awesome ^^

    I’m going to try this script out tho after I get home from my travels, I’ve always wanted to run a video site like this!
    (great website/blog btw!)

  • Fränk Petser

    Hey Swedish Guy,

    Nope. Right now there is no referral system, but it’s a good idea. I’ll definitely implement it in a future version. When will you get home from your travels? :P

  • SwedishGuy86

    I got home earlier then expected and have set up a test site, I’m planing to use this script.
    well at least try it out, I see a potential in it =)
    atm, waiting for my virool code, to set it up properly.

  • Fränk Petser

    Hey, how are you progressing? Would love to see your site!

You may also like