Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 09:30 pm EST

Geeklog Forums

Page title for 404.php (error page) ?


Status: offline

Elegantly

Forum User
Junior
Registered: 08/13/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):

Text Formatted Code

<?php

// 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.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/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
 Quote

All times are EST. The time is now 09:30 pm.

  • 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