First find the header.tpl file in your templates folder.
Now go down to the clientarealinks paragraph and find the line that looks like :
Code:
<a href="affiliates.php"><img src="images/affiliates.gif" border="0" hspace="5" alt="" />{$LANG.affiliatestitle}</a>
Now replace that line with the following code
Code:
{* Check for active affiliate *}
{php}
extract($this->_tpl_vars);
$query = 'SELECT count(*) as count FROM tblaffiliates WHERE clientid = '.$clientsdetails['userid'];
$result = mysql_query ($query);
$data = @mysql_fetch_array ($result);
if ($data['count'] > 0) {
{/php}
<a href="affiliates.php"><img src="images/affiliates.gif" border="0" hspace="5" alt="" />{$LANG.affiliatestitle}</a>
{php} } {/php}
Save and reupload to your server. Let me know if you find it useful!










































Hi, good post. I have been wondering about this issue,so thanks for posting. I’ll definitely be coming back to your site.
Link | June 2nd, 2009 at 7:59 am