Jump to content

Free Error Pages Addon


Recommended Posts

This is the original error page addition to WHMCS, which has been out there for years, absolutely free, no charge, no linkback, nothing of the like.

 

You can download it here. You'll need to upload everything in error to your base WHMCS directory (be careful, you may have to edit .htaccess manually if you have one existing already).

 

Once uploaded, everything will work perfectly. I may consider adding administrative features (more template edits, sql based messages, etc) but considering someone's already tried to rip this off and call it "original", I probably won't bother.

 

Enjoy the free addon, as it was intended to be released!

Link to comment
Share on other sites

  • 1 year later...

Reviving quite the old thread, and this information may be available elsewhere, but I found this quick solution to work, but a couple changes were needed when using WHMCS >=3.8.1 :

In error.php, change

require("init.php");

to

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

and change

include("display.php");

to

outputClientArea($templatefile);

Link to comment
Share on other sites

  • 3 months later...

Thank you for your work, being very helpful.

 

I made changes in error.php to run well in version 4.4.2, follow the code.

 

 

$sid=1;

 

define("CLIENTAREA",true);

 

require("dbconnect.php");

require("includes/functions.php");

require("includes/clientareafunctions.php");

 

$pagetitle = "Error";

$pageicon = "images/support/clientarea.gif";

$breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>';

$breadcrumbnav .= ' > <a href="/">ERROR</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 = "errorpage";

 

 

$referer = $HTTP_REFERER;

$smarty->assign("refer", $referer);

switch($e)

{

default:

$e="404";

break;

case '400':

$e="400";

break;

case '401':

$e="401";

break;

case '403':

$e="403";

break;

case '404':

$e="404";

break;

case '500':

$e="500";

break;

case '503':

$e="503";

break;

}

$smarty->assign("e", "$e");

 

outputClientArea($templatefile);

 

 

Link to comment
Share on other sites

  • 6 months later...

I have downloaded this but can't get it to work.

 

I have installed the template file in the correct directory and the error.php in the whmcs install directory. I have also tried replacing the error.php file with what paulo B included above, but I just get a blank page.

 

the .htaccess file seems to be working (if I change the 404 error to point to the index file it works).

 

has anyone any ideas? I'm on latest version of WHMCS, would be nice to get this working as I have custom error pages for the rest of my site but they don't display properly when loaded from the WHMCS directory.

Link to comment
Share on other sites

I have downloaded this but can't get it to work.

 

I have installed the template file in the correct directory and the error.php in the whmcs install directory. I have also tried replacing the error.php file with what paulo B included above, but I just get a blank page.

 

the .htaccess file seems to be working (if I change the 404 error to point to the index file it works).

 

has anyone any ideas? I'm on latest version of WHMCS, would be nice to get this working as I have custom error pages for the rest of my site but they don't display properly when loaded from the WHMCS directory.

 

you can always try this from Sparky http://www.whmcs.com/members/communityaddons.php?action=viewmod&id=13

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