Osclass forums
Support forums => Tips, tricks, and tutorials => Topic started by: keerthi on July 13, 2014, 10:12:00 pm
-
I m not sure if its ethical or not. but I am very sure it will help all affiliates to make some more money. this is a cookie maker. works if your affiliate program injects a cookie into user to keep track of its affiliate. its only four line of code. Actually I did some search and found that this was a old plugin in wordpress.
If some one could help with how to use it for osclass. I am sure all affiliates could improve income. this will create a tiny iframe which opens your affiliate links o that your vistors need not click it. and if they buy in the stipulated time you earn commission.
<?php
/*
Plugin Name: Affiliate Link Cookie Maker
Plugin URI: http://zafrira.net/services/wordpress-plugins/affiliate-link-cookie-maker/
Description: To make sure affiliate link cookies are activated upon page visit and not by link clicking. Put the shortcode in stead of a normal link <i>Use: [afflink url=&#34;url&#34; name=&#34;name&#34;]</i>
Version: 2.0.1
Author: Zafrira
Author URI: http://zafrira.net
*/
if(!is_admin()){
add_shortcode('afflink','Zafrira_AffiliateLinkMaker');
}
function Zafrira_AffiliateLinkMaker($atts)
{
$newlink = '<a href="' . $atts[url] . '" target="_blank">' . $atts[name] . '</a>';
$embedder = '<div style="width:1px;height:1px;position:absolute;top:0;left:0;z-index:-100;" id="Zafrira_AffiliateLinkMaker_Div"><iframe id="Zafrira_AffiliateLinkMaker_Frame" frameborder="0" src="' . $atts[url] . '" style="width: 1px; height: 1px; margin: 0px;" scrolling="no" allowTransparency="true"> </iframe></div>';
return $newlink . " " . $embedder;
}
GOOD LUCK! Use it under your own discretion. Also pls help with how to use it for osclass.