Site statistics

Filed under: — Erlend at 4:19 pm on Thursday, November 16, 2006
require("/home/erlendg/erlendgausen.net/bbclone/var/access.php");
$totalvisits = $access["stat"]["totalvisits"];
$totalcount = $access["stat"]["totalcount"];
$visitorsmonth = $access["time"]["month"][date("n")-1];
$visitorstoday = $access["time"]["wday"][date("w")];
$wday = $access["time"]["wday"];

for($week = 0; list(,$wdays) = each($wday); $week += $wdays);

echo " "." ".date ("l")." ".date ("d F Y")." ".date ("G:i:s")." ".date ("T")." GMT ".date("O")

."

n”
.”

n”
.”

n”
.”

n”
.”

n”
.”

n”
.”

n”
.”

Total visitors n”
.”
$totalcount
Total pages n”
.”
$totalvisits
Pages this month  n”
.”
$visitorsmonth
Pages this week n”
.”
$week
Pages today n”
.”
$visitorstoday

n”;
?>

Registering WordPress pages correctly with BBClone

Filed under: — Erlend at 2:08 am on Thursday, November 16, 2006

When using BBClone with WordPress, useful page titles do not appear automatically in the statistics. This is a short description of the solution I settled on to solve the problem.

Replace ‘< ?php get_header(); ?>‘ in index.php, page.php in your theme folder with this code:

< ?php
define('_BBC_PAGE_NAME', $_SERVER['REQUEST_URI']);
define('_BBCLONE_DIR', '/location/of/bbclone/');
define('COUNTER', _BBCLONE_DIR . 'mark_page.php');
if (is_readable(COUNTER)) include_once(COUNTER);
get_header();
?>

The statistics will even reflect your chosen permalink/rewrite style and create functional page links on the BBClone lists. To register and discern 404 errors, I use this entry in the 404.php file of my theme:

< ?php
define('_BBC_PAGE_NAME', '404 - ' . $_SERVER['REQUEST_URI']);
define('_BBCLONE_DIR', '/location/of/bbclone/');
define('COUNTER', _BBCLONE_DIR . 'mark_page.php');
if (is_readable(COUNTER)) include_once(COUNTER);
get_header();
?>

Gallery2 will not be covered by adding the line above to the WordPress theme, so if you are using WPG2 to integrate Gallery2 and WordPress, add this below the header comment block in wp-gallery2.php in your WordPress directory:

define(‘_BBC_PAGE_NAME’, $_SERVER['REQUEST_URI']);
define(‘_BBCLONE_DIR’, ‘/location/of/bbclone/’);
define(‘COUNTER’, _BBCLONE_DIR . ‘mark_page.php’);
if (is_readable(COUNTER)) include_once(COUNTER);

Trouble or questions? Please comment.

Aviation

Filed under: — Erlend at 3:55 pm on Wednesday, November 15, 2006

Certificates

I currently hold the following pilot licenses and ratings issued by the Norwegian CAA:

  • JAR CPL-A
  • IR SE/ME
  • FI-A flight instructor
  • Frozen ATPL
  • MCC credit
  • Cessna SET (C208B Grand Caravan)
  • SEP land (Piper PA28, PA38, Cessna 172, Grob G-115D, Diamond DA40, Scheibe SF25C Falke)
  • MEP land (Piper PA34 Seneca V, Cessna 310)
  • Aerobatics rating (Grob G-115D)
  • Tail wheel/touring motor glider (Scheibe SF25C Falke)
Experience

I trained at SAS-owned Norwegian Aviation College, and have flown with these organizations:

  • Benair AS – My employer, cargo airline operating the Cessna Grand Caravan from Oslo airport Gardermoen
  • Nedre Romerike flyklubb – The largest Norwegian flying club, where I currently work as flight instructor
  • Oslo flyveklubb – Local flying club, operating from Kjeller airport
  • Karlog Air Charter – Airline in Sønderborg, Denmark. Now defunct.
  • Svævethy – Glider club in Denmark
  • Værnes flyklubb – Flying club at Værnes, Trondheim

Articles

Links

VFR navigation flight checklist

Filed under: — Erlend at 11:33 pm on Tuesday, November 14, 2006

Preparations

  • Print NOTAM, METAR, TAF, IGA, AUP for all AD
  • Check AD opening hours and fuel availability
  • Complete operational flight plan with winds
  • Complete load sheet
  • Send ATC flight plan
  • Verify ATC flight plan (Norway: +47 64819000)
  • Notify customs (Norway: +47 22181718, desken@toll.no)
  • Check certificate validity and assess your currency
  • Check aircraft schedule for changes
  • Leave notice about passengers, route and expected return time
  • Check fuel
  • Pre-flight walkaround
  • Passenger briefing

Bring onboard

  • Maps
  • Flight documents, load sheet
  • Headset
  • Cell phone (turned off)
  • Landing charts, approach charts
  • Pens and rulers
  • Aircraft maintenance log
  • Life vest, survival pack, clothes
  • Draining bottle
  • Flight confuser or calculator
  • (GPS, calculator and camera)

After landing

  • Complete aircraft log
  • Register flight and close booking system entry
  • Update pilot logbook
  • Close flight plan
  • Turn on cell phone in case ATC tries to reach you

Domain migration in Apache using .htaccess

Filed under: — Erlend at 10:53 pm on Tuesday, November 14, 2006

The Apache method

I used to have my old web site at erlend.gausen.net where my relative Monica had some space to spare, but when I decided to remake the site dynamically I had to move it to my own hosting here at erlendgausen.net.

To let visitors still reach me and to avoid confusion, the following lines added to the .htaccess file at the old site instructs Apache to redirect the visitor to my new domain:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !erlendgausen.net$ [NC]
RewriteRule ^(.*)$ http://erlendgausen.net/$1 [L,R=301]

Any files, folders and arguments behind the domain name will be kept the same. Only the domain name is rewritten.

The ‘R=301′ is an instruction to the HTTP client (browser/search engine) that the move is permanent. Some search engines might take notice of it. Otherwise, the switch should be quite transparent to readers.

To check out the result, you can test these two similar links that just have a subtle difference between them:

A client-side alternative without javascript

An alternative to redirecting directly and transparently is using HTML meta data to perform client-side browser redirection. This is most usually done using javascript, but I prefer using this method for it’s better compatibility, reliability and efficiency.

meta content=”5;url=http://erlendgausen.net” http-equiv=”Refresh” /

The code is a tag, so enclose it in < and > brackets.

The digit, in this case 5, determines the delay in seconds to the redirection should take place. Also, this function can be used to set up a simple slide show where new pages are automatically displayed at given time intervals.

New home page…

Filed under: Uncategorized — Erlend at 2:35 am on Sunday, November 12, 2006

Welcome to the personal web site of Erlend Gausen.

The contents of the site is categorized into sections for articles and links related to aviation, technical information and a personal section with information about me. In time, there will also be a photography section.

Please feel free to snoop around, and don’t be afraid to contact me or comment.

Contact me

Filed under: — Erlend at 2:05 am on Sunday, November 12, 2006

Contact information for personal and professional inquiries:

Erlend Gausen / Gausen Aviation and Engineering