Thanks for the follow-up :-)
Yes, definitely a possible alternative. I was hoping they might have something a little simpler, but you could always query the database for that information. The username in WordPress should match up with the username in iDevAffiliate. So you would just query the iDevAffiliate database for the affiliate’s ID number, and then generate an affiliate link based on that.
Perhaps a better approach would be a custom API script integrated with iDevAffiliate.
Instructions
Step #1.
Create this file: /idevaffiliate/API/scripts/affiliate_url_via_username.php
This assumes you’re running iDevAffiliate with the SEO Links Module.
<?php
require_once('../../API/config.php');
include_once('../../includes/validation_functions.php');
if (isset($_REQUEST['username']) && mysql_num_rows($select = mysql_query("SELECT `id` FROM `idevaff_affiliates` WHERE `username` LIKE '".mysql_real_escape_string($_REQUEST['username'])."' LIMIT 1")))
{
$ID = mysql_result($select, 0);
$URL = 'http://'.$_SERVER['HTTP_HOST'].'/'.$ID.'.html';
echo "document.write('".$URL."');";
}
[/hilite]
<h4>Step #2.</h4>
Add this code snippet into a Post or Page within WordPress®, where a logged-in User will be.
This will display the affiliate URL wherever it is inserted in your HTML code.
<script type="text/javascript" src="/idevaffiliate/API/scripts/affiliate_url_via_username.php?username=[[s2Get user_field="user_login" /]]"></script>