The options provided in this section of the site replication banner differ based on your license type. Monthly / hosted with us customers can only replicate external URL, while standalone / self-hosted customers can replicate also local files uploaded directly on their server.

 

Replicate external URL

this is the only option you'll have with hosted with us (monthly) accounts and it is pretty straightforward to set up, you just need to fill in the URL of the website/files which you wish to replicate. So you can either decide to replicate directly your main website or create some specific site only.

If you should want to display also affiliate details on the site then you need to add the variables into your site's code so that the replication can replace them.

Replicate local files

this option is only available for self-hosted/standalone customers who can upload the files which should be processed directly onto the server where their Post Affiliate Pro is installed. After the banner is created the Replicate local files option will tell you to which folder you can upload files you wish to replicate and it will also show you the content of the folder, if the depicted folder does not exist, create it and upload files to it.

You can upload static html pages, php scripts, images, css files, ... After you upload these files you need to specify which files to process, so in which files the variables will be replaced. Filenames are comma separated and can contain * wildcard. You can use various variables in these files and they will be replaced by correct values. List of all currently available variables is in the list next to the file tree.

 

Files to process

You can specify in which files, variables will be replaced and what paths on the replicated website will be replaced with the replicated sites URLs, so basically which files/paths should be called instead of directly via the replicated URL. Normally it is enough to have the Files to process specified as *.html,*.htm,*.php,DIR_INDEX, this would replicate all the paths which end with html, htm, php OR which end as if they were directories, so for example https://domain.com/product/.

 

Available variables

in your replicated sites you can use variables which will load details from affiliate profile fields. The variables list which you can see during banner creation is dynamically generated based on the fields you have set in Configuration->Affiliate signup->Fields tab.
This is a list of all available variables, however if you do not use for example data22 it will not display anything:

{$firstname} - first name
{$lastname} - last name
{$username} - username
{$ip} - IP address from which the affiliate signed up to your system.
{$photo} - photo
{$parentuserid} - system ID of affiliate's parent affiliate, use API to load more parent info
{$refid} - referral ID
{$notificationemail} - notification email
{$data1} - content of data1 field
{$data2} - content of data2 field
{$data3} - content of data3 field
{$data4} - content of data4 field
{$data5} - content of data5 field
{$data6} - content of data6 field
{$data7} - content of data7 field
{$data8} - content of data8 field
{$data9} - content of data9 field
{$data10} - content of data10 field
{$data11} - content of data11 field
{$data12} - content of data12 field
{$data13} - content of data13 field
{$data14} - content of data14 field
{$data15} - content of data15 field
{$data16} - content of data16 field
{$data17} - content of data17 field
{$data18} - content of data18 field
{$data19} - content of data19 field
{$data20} - content of data20 field
{$data21} - content of data21 field
{$data22} - content of data22 field
{$data23} - content of data23 field
{$data24} - content of data24 field
{$data25} - content of data25 field

The variables must be used in client side code so that the replication can see/access them and replace them with content, therefore you can't use them directly in your PHP code.

 

How to hide variables on the website you want to replicate

Iif you don't want the replication variables visible when someone accesses directly the URL which you are replicating then you need to maintain the visibility of the variables. The easiest way to do it is with a javascript code added to your website.
Site Replication dynamically adds a tracking code which defines AffiliateID and BannerID variables in a javascript added right after <body> tag of your page so you can a javascript code which will check if AffiliateID variable is set in javascript or not. If it is set then you can display your content, if it isn't then your content will remain hidden. Here is a simple example:

<!-- PAP Integration snippet -->
<span id="affinfo" style="display:none">You have been referred by {$firstname} {$lastname}</span>
<script type="text/javascript">
if (typeof AffiliateID != "undefined") {
    document.getElementById('affinfo').style.display = "block";
}
</script>
<!-- PAP Integration snippet ends here -->
 

Tips for standalone users

Replicated PHP applications
- you can upload php applications to the replicated site folder. For example you can create a replicated blog. Upload and install e.g. Wordpress to the replicated site folder and use variables in posts, blog name, ... This blog will normally work and will be personalized per affiliate
Note:
- there are some limitations and some php applications may not work fully, but you can try it and you will see :-)

Installing Wordpress as a local replicated site
  1. Create a replicated site banner. Remember the path of the replicated site folder (e.g. /home/qualityc/public_html/affiliate/accounts/default1/sites/9fc26f66/)
  2. Set the 'Files to process' to: *.php, DIR_INDEX
  3. Download Wordpress, unzip it and copy all the files to the replicated site folder /home/qualityc/public_html/affiliate/accounts/default1/sites/9fc26f66/ (if this folder does not exist, create it)
    There are two ways how to access the replicated site:
    1. Direct access: https://www.yourdomain.com/affiliate/accounts/default1/sites/9fc26f66/
      - no variables will be replaced in this case. use this access for administration and installation
    2. Replicated access: https://www.yourdomain.com/sites/blog/testaff/ (example link for replicated site named blog and affiliate having referral id testaff)
      - variables will be replaced by correct values of affiliate having referral id testaff
  4. Run the Wordpress installer using the direct access: https://www.yourdomain.com/affiliate/accounts/default1/sites/9fc26f66/ and follow the instructions
  5. To manage your Wordress installation use the direct access: https://www.yourdomain.com/affiliate/accounts/default1/sites/9fc26f66/wp-admin/
  6. Check the replicated site using the preview link (replicated access)
In case you wanted to use 'Replicated site at custom location' with your WordPress site and make sure it does not conflict with permalinks, then check out the following article:
×