Jump to content

Help me with some header.tpl code


Recommended Posts

I am trying to install a Refer a friend module, and its asking me to install the following code;

 

Add following lines in templaes/{your-template}/header.tpl file

 

{php}
if(isset($_GET['uid']) && $_GET['uid']!='')
{
   $_SESSION['referrer'] = base64_decode($_GET['uid']);
}
{/php}

 

just after below lines of code

 

{$headeroutput}

 

But when I add

 

{php}
if(isset($_GET['uid']) && $_GET['uid']!='')
{
   $_SESSION['referrer'] = base64_decode($_GET['uid']);
}
{/php}

 

it breaks my website, im guessing it is NOT compatable with WHMCS 6.3.1, can someone help me make that little snipit of code compatable with 6.3.x

Link to comment
Share on other sites

do you have {php} tags enabled in your settings?

 

http://docs.whmcs.com/Security_Tab#Allow_Smarty_PHP_Tags

 

The use of {php} tags is depreciated in WHMCS v6 and above, but legacy support can be enabled here during a transition period. We recommend keeping this option disabled unless specifically required.

I would suspect that they won't remove the option until v7 is released, so you should be ok for the rest of the year at least.

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