jackgordon Posted January 27, 2009 Share Posted January 27, 2009 I am having a bit of trouble trying to create extra template pages within WHMCS that the user could have access to without logging in. I want to create a page that is linked to from the header menu. I want this to be available to people who are not logged in. I can get the link in the menu, but I can't get a page to display the data I put into it. Normally, I would emulate one of the php pages in the root directory, but since they are all encrypted that does not seem to be an option. I do not want to link to outside of WHMCS if I don't have to. Is there a way to do this? 0 Quote Link to comment Share on other sites More sharing options...
cafreamoroso Posted January 27, 2009 Share Posted January 27, 2009 way too easy.. if everything else fails.. read the manual http://wiki.whmcs.com/Creating_Pages 0 Quote Link to comment Share on other sites More sharing options...
jackgordon Posted January 27, 2009 Author Share Posted January 27, 2009 Thanks Cafe. I found that page, but am still having trouble. Here are some questions that may help clear things up... I copied the code verbatim into a text file and saved it as "links.php". Then the directions are unclear. They say: Edit $breadcrumbnav and $templatefile to match the filename of the page you want to create. Eg. If you were creating a page called aboutus, you would edit $templatefile = "homepage"; to $templatefile = "aboutus";. Save this as a php file and upload to your root WHMCS directory (eg. example.com/whmcs) I understand what to do to the "$templatefile", but there are two lines called "$breadcrumbsnav": $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>';$breadcrumbnav .= ' > <a href="mypage.php">My Page</a>'; So what do I do with these? The php file is named "link.php" - do one or both of these get defined as "links.php"? If not both, then which one? And what do I do with the other one? Then, for the template file, can it be pure html or does it require any smarty or php code? 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted January 28, 2009 Share Posted January 28, 2009 $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="YOU NEW PAGE LINK HERE.php">YOU NEW PAGE NAME HERE</a>'; # Define the template filename to be used without the .tpl extension $templatefile = "THE NAME OF YOUR NEW .TPL PAGE HERE"; outputClientArea($templatefile); 0 Quote Link to comment Share on other sites More sharing options...
jackgordon Posted January 28, 2009 Author Share Posted January 28, 2009 hmmm... still having an issue here is what I have in the main WHMCS directory, called links.php <?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="links.php">Industry Links</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; # Define the template filename to be used without the .tpl extension $templatefile = "links"; outputClientArea($templatefile); ?> Then, for links.tpl in the template directory, I just copied contact.tpl and renamed the copy links.tpl to test it. But when I go to domain.com/whmcs/links.php, all I get is a completely blank page. Can you see what I am doing wrong? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted January 28, 2009 Share Posted January 28, 2009 Possibilities 1. You must be using V3.8 or later for that code to work 2. You have white space after or before the php tags 0 Quote Link to comment Share on other sites More sharing options...
jackgordon Posted January 28, 2009 Author Share Posted January 28, 2009 I was not on V3.8.1 - that turned out to be the problem. I upgraded, and it works now. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.