Welcome to Geeklog Friday, July 10 2020 @ 10:13 am EDT

Geeklog Forums

Page title for 404.php (error page) ?

Status: offline


Forum User
Registered: 13/08/04
Posts: 15
Hi all,

wouldn't it be nice to give geeklog's error page (404.php) a meaningful title, like "Page Not Found"? I updated my own 404.php with the following lines (right after the PHP starting tag):

PHP Formatted Code


// added these two lines
global $_CONF;
$_CONF['pagetitle'] = "Page Not Found";

// here goes the rest
require_once ('lib-common.php');

$display = COM_siteHeader ('menu');


I found this change useful when doing a site analysis with tools like awstats, which can include the page's title in the statistics.

Status: offline


Site Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
If you add the $_CONF['pagetitle'] = ... after the require_once, then you don't need the global statement.

Also, the next release of Geeklog will accept a second parameter for COM_siteHeader which is then used as the page title, so you don't have to use that $_CONF['pagetitle'] hack any more (just an FYI).

bye, Dirk

All times are EDT. The time is now 10:13 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content