Jump to content

adding new page error


jeds

Recommended Posts

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

Link to comment
Share on other sites

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):?

Link to comment
Share on other sites

"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. :D

 

http://www.mozilla.com/firefox/

Pretty darn good.

http://www.opera.com/

http://www.google.com/chrome

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. ;)

Link to comment
Share on other sites

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'];

 

:?

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