jeds Posted April 4, 2009 Share Posted April 4, 2009 followed the documentation for adding a new page and get the following in my browser: Warning: require(dbconnect.php) [function.require]: failed to open stream: No such file or directory in /home/jedsweb/public_html/whmcs/templates/terms.php on line 4 Warning: require(dbconnect.php) [function.require]: failed to open stream: No such file or directory in /home/jedsweb/public_html/whmcs/templates/terms.php on line 4 Fatal error: require() [function.require]: Failed opening required 'dbconnect.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jedsweb/public_html/whmcs/templates/terms.php on line 4 What am I doing wrong? Thanks 0 Quote Link to comment Share on other sites More sharing options...
jeds Posted April 4, 2009 Author Share Posted April 4, 2009 sorry for the double post, IE crashed on me and it wasn't there, now it is. I need to get a different browser, it keeps doing this and I just re-installed. (send recommends and urls for new browser) 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 4, 2009 Share Posted April 4, 2009 "No such file or directory in /home/jedsweb/public_html/whmcs/templates/terms.php on line 4" shows the problem. It can't find the file where it's looking for it on line 4 of your script. Note this line from the instructions: "Save this as a php file and upload to your root WHMCS directory (eg. example.com/whmcs)". You placed it in the templates directory. http://www.mozilla.com/firefox/ Pretty darn good. http://www.opera.com/ http://www.google.com/chrome 0 Quote Link to comment Share on other sites More sharing options...
jeds Posted April 5, 2009 Author Share Posted April 5, 2009 Thanks for browser download links, trying Firefox, hasn't crashed yet8) http://jedsweb.com/whmcs/terms.php is loading now, without content of the terms.tpl. (which are: <p align="center" class="cartheading">JEDsWEB</p>JEDsWEB <h1>Terms of Service</h1> ) Is this a "Smarty" thing 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 5, 2009 Share Posted April 5, 2009 Is "terms.tpl" in the templates directory? I see it is, but I also see your breadcrumb nav has the default link in it, so this may be an editing error. If you post or PM me the code in your "terms.php" page, maybe something will stand out. 0 Quote Link to comment Share on other sites More sharing options...
jeds Posted April 6, 2009 Author Share Posted April 6, 2009 the location is whmcs/templates/terms.tpl I fixed the breadcrumb, I think the code for terms.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="terms.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="terms.php">Terms of Service</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 = "terms"; outputClientArea($templatefile); ?> Thanks 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 6, 2009 Share Posted April 6, 2009 This line is incorrect: $breadcrumbnav = '<a href="terms.php">'.$_LANG['globalsystemname'].'</a>'; Should be "index.php". Found the issue, I believe. The TPL file does not go in the template directory root, it goes in the template directory you have set to use for your site. I just tested on my install, and in the template root it failed, once I moved it to the set I'm using it worked. Try that. 0 Quote Link to comment Share on other sites More sharing options...
jeds Posted April 6, 2009 Author Share Posted April 6, 2009 Thanks Bear8) 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 6, 2009 Share Posted April 6, 2009 No problem, good job! 0 Quote Link to comment Share on other sites More sharing options...
jeds Posted April 11, 2009 Author Share Posted April 11, 2009 one further question - shouldn't there be a way to change the page title from "JEDsWEB - Client Area" to whatever you want, or at least " JEDsWEB - Terms of Service"? I tried this: $title = "title here"; in the next line after $pagetitle = $_LANG['clientareatitle']; 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.