Jump to content

Need help to move affiliate banner codes to stand alone page


peeta

Recommended Posts

I want to place the affiliate codes on its own page because the banner images are displayed on the page and it has now become a clutter and lengthened the page significantly.

 

I created a template file called affiliatelinks.tpl and added

 

{if $loggedin}

{if $affiliatelinkscode}

{$affiliatelinkscode}

{/if}{/if}

 

but the links do not display. What can I do to show the banner codes separately from the aff report page? Ideally I'd like to have several pages categorized as 728x90, 300x250, 160x600 etc.

Link to comment
Share on other sites

I don't get what you are suggesting here and with all due respect, did you not note in my initial post that I have already extracted and used that code? It just is not calling the data so there must be a query in the encoded affiliates.php which is making the call then output to the $affiliatelinkscode definition.

 

I just don't know how that query is written and this is where I seek assistance. I don't know how else to clarify my quest.

 

So in repetition here is what I have already done with no success

 

Created files affiliatelinks.php and affiliatelinks.tpl

Inserted in affiliatelinks.tpl the code copied from affiliates.tpl and wrapped within the logged in condition as below;

{if $loggedin}

{if $affiliatelinkscode}

{$affiliatelinkscode}

{/if}

{/if}

 

The page opens without error but the affiliate codes do not display.

Link to comment
Share on other sites

It just is not calling the data so there must be a query in the encoded affiliates.php which is making the call then output to the $affiliatelinkscode definition.

 

Yes, you will need to "paste" the details you've put in the text-area in whmcs into your new page, and change the text area display in the affilaite tpl to be a link to your new page

Link to comment
Share on other sites

What exactly do you have in affiliatelinks.php? Did you follow the instructions located on the wiki article I pasted to you a while ago?

 

the code you're looking for is in the template vars. You can output them with this:

 

print_r($smarty->get_template_vars());

 

Then reference them within your template code, or manipulate them as an array reference and assign them to a new smarty tag.

Link to comment
Share on other sites

Yes, you will need to "paste" the details you've put in the text-area in whmcs into your new page, and change the text area display in the affilaite tpl to be a link to your new page

 

The manual method will show the code but the affliate's ID is not displayed with this code

 

<(a href="[AffiliateLinkCode]")><(img src="banner.png" width="728" height="90" border="0")><(/a)>

 

What can I do so the code interprets the logged in affiliate's ID?

Link to comment
Share on other sites

This is what I have in the php file

<?php

define("CLIENTAREA",true);

require("dbconnect.php");
require("includes/functions.php");
require("includes/clientareafunctions.php");

$pagetitle = "Affiliate Banners";
$pageicon = "images/support/clientarea.gif";
$breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>';
$breadcrumbnav .= ' » <a href="affiliatelinks.php">Affiliate Banners</a>';

initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav);

if ($_SESSION['uid']) {
 # User is Logged In - put any code you like here
}

# To assign variables in Smarty use the following syntax.
# This can then be used as {$variablename} in the template

$smartyvalues["variablename"] = $value;

$templatefile = "affiliatelinks";

outputClientArea($templatefile);

?>

I tried many smarty variables relative to affiliate codes and still no result.

Link to comment
Share on other sites

I got this working now with help from WHMCS but now I have another issue. I have 8 categories which require 8 pages and I want to load each template file with the single afflinks.php file using a url query similar to clientarea.php?action=invoices so mine would be as afflinks.php?action=728x90, afflinks.php?action=300x250 and so on.

 

I have created each of the .tpl files for the categories but just cannot figure how to load them. Can anyone offer instructions?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated