My Opera is closing 1st of March
photo of Espen André Øverdahl

I read blogs for a living

And I think I like it

My first Web site

So, I finally got myself a domain name, Web hosting service and free time which resulted in this:

I've done all the markup with help from Robert with the PHP scripts. I particulary like to script that fetches automatically my latest blog posts from here. cool

How does the site look on your screen? Do you see any bugs or things just out of place? I'd appreciate if you could report it here so I can look into fixing them. bigsmile

I'm leaning toward implementing Chyrp as a basic CMS, but if you have any other suggestions, please let me know. bigsmile

Nice carBus fail

Comments

Tri M. NguyenTriMN Sunday, July 12, 2009 12:33:29 PM

cheers congrats! bigsmile

It looks perfect(or should I say, very neat) on my 22" LCD cool . It can somehow get very sluggish. The contact link. Since its the only link working on your page(except external links) rolleyes . Its a "known" issue for your webhost tho:D

Chyrp is a good lightweight CMS. If you want some heavy shit, you can get Joomla! I "expect" you're ain't gonna do some heavy bloggings on this page so Wordpress won't be an alternative(eller hur?) p


Oh, and I spotted an intersting CMS yesterday. Haven't tried it yet but you could give it a try. It takes about 6 KB, txt CMS http://cms.thewikies.com/

Mad Scientist (عادل)qlue Sunday, July 12, 2009 12:58:55 PM

cool.
I'm interested in the script for the feeds. I'd like to implement something like that myself. up.

Robert Jacobsenrobertj Sunday, July 12, 2009 2:29:56 PM

qlue, I'll probably write a blog post about it later on. There are probably more efficient ways to do it, but... it works! wink

Espen, the only bug I see is that you link to ipwn.se instead of robertjacobsen.net wink

Awezum sait!

~ Robert

Espen André ØverdahlEspenAO Sunday, July 12, 2009 2:39:19 PM

Originally posted by TriMN:

Oh, and I spotted an intersting CMS yesterday. Haven't tried it yet but you could give it a try. It takes about 6 KB, txt CMS http://cms.thewikies.com/

Looks good! Thanks for the tip. I'll definitely check it out.

Noob question: I have elements (e.g. the footer and the menu) I want to be displayed on all pages. What's best way to do this? Create scripts and embed into every page? Right now I just copy/paste the code to each page.

agony Sunday, July 12, 2009 2:43:00 PM

bookmarked!

Tri M. NguyenTriMN Sunday, July 12, 2009 2:49:47 PM

You can create a menu and footer .php/.html or something. And use PHP to include it: <?php include('footer.php'); ?> etc. on each page. That might be the easiest way. You can also create an include script in the index file so the menu and footer/header is "static", while the content is dynamic.

I made this simple script for my site: http://trimn.net/media/php/include.phps it's placed at the content area in the index file. By default it'll include my profile.php file. Headers, menus and footer are static. They're surrounding this script in the index file. My links is somthing like this: trimn.net/?p=cv (notice the ?p= and the $_GET['p'] part in the script wink ), which means it will search a cv.php file and include it. If its not found, it'll return: "404 - Siden finnes ikke". (waiting for someone to do some nasty things with my site ninja ).


... But the CMS _might_ help you with this part.

Robert Jacobsenrobertj Sunday, July 12, 2009 6:44:59 PM

Espen, I'll show you tomorrow if TriMN didn't nail it for you. smile

Robert Jacobsenrobertj Sunday, July 12, 2009 6:55:20 PM

TriMN, what occurs if you write nameofpage.php?p=nameofpage ? From what I read of your script, it will loop forever. Although the script is solid, it should check whether or not p equals the caller page, to prevent loop (and possibly lockup of your Web server).

Angelikiellinidata Sunday, July 12, 2009 7:10:08 PM

wow! Conratulations Espen !!!!
This is great!

" a domain name"
so now you are "Master of your Domain! " p
I don't know if Seinfeld is known in Europe...
http://en.wikipedia.org/wiki/The_Contest

Dark FurieFurie Sunday, July 12, 2009 8:00:47 PM

Are CV and Archive meant to link to the same place?

Dark FurieFurie Sunday, July 12, 2009 8:02:05 PM

The Contest? Did you just call him a wanker? bigeyes

Angelikiellinidata Sunday, July 12, 2009 8:20:08 PM

lol not at all! "Master of my domain" means the oposite!


Robert Jacobsenrobertj Sunday, July 12, 2009 9:06:21 PM

Originally posted by ellinidata:

I don't know if Seinfeld is known in Europe...


It is. known, yes. At least in Norway it went in prime time like 15 years ago. Although I never was a huge Seinfeld fan. smile

Originally posted by Furie:

Are CV and Archive meant to link to the same place?


They are linking to #, which is a pretty standard way of doing placeholder links, so I would assume it's intentional. smile

Angelikiellinidata Sunday, July 12, 2009 9:11:34 PM

thanks Robert
smile

Tamil Monday, July 13, 2009 3:57:21 AM

up

Espen André ØverdahlEspenAO Monday, July 13, 2009 8:30:09 AM

Originally posted by Furie:

Are CV and Archive meant to link to the same place?

They don't work yet because it's nothing there. They're just placeholders for now. smile I only needed a few more menu items.

Dark FurieFurie Monday, July 13, 2009 9:52:12 AM

Got it. up I thought Mini wasn't loading it. Good job on making it mobile accessible by the way. bigsmile Have an Espy-snack.

Tri M. NguyenTriMN Monday, July 13, 2009 12:11:25 PM

amnith, theoretical the script will check if p is true, if yes it'll check if the file $_GET['p'].'.php' exist in the given directory. In this case its ./ if not found it'll execute something else. But ye, I almost see what you're pointing at knockout . And thanks cheers

Charles SchlossChas4 Monday, July 13, 2009 7:52:12 PM

You might want to fix your Opera link at the bottom wink

Robert Jacobsenrobertj Monday, July 13, 2009 11:55:41 PM

I understand your code, but if you include files from the same directory you have to check that the file is not including itself. smile

Tri M. NguyenTriMN Tuesday, July 14, 2009 12:15:43 AM

AHA! Now I see what you're pointing at *banging head towards the wall*. Ye, that's why I got a damn good FILTRÆ on my site so it won't be affected by that little " bug " smile

(I did angel modify the script so nobody can see include path wink But I didn't think of what it could cause others sad ).

Robert Jacobsenrobertj Tuesday, July 14, 2009 7:03:01 AM

A simple fix is to simply do something like this, given that the script is run from index.php:

<?php
$p = $_GET['p']; 
if(isset($p) && $p != "index")
{
  if(!file_exists("$p.php"))
  {
    // 404 error handling or something
  } 
  else
  {
    include "$p.php"; 
  }
}
else
{
  include "standard.php"; 
}
?>

Dustin WilsonKhadgar Tuesday, July 14, 2009 2:25:04 PM

It'd probably just be better to use require rather than include. The page will not load at all if the file doesn't exist and will error out telling you such. I'd suggest using require_once so if the file is specified to be required elsewhere it won't error saying it's already been done.

<?
require_once("$p.php");
require_once("standard.php");
?>


Robert Jacobsenrobertj Tuesday, July 14, 2009 2:53:39 PM

Good point. require_once does the trick.

Also worth noting: you can require_once("$p.php"), while you cannot require_once('$p.php'). This is due to the single quote not escaping characters, resulting in the require script attempting to to include the file $p.php instead of what $p was pointing to. This goes for everything in single quotes.

Write a comment

New comments have been disabled for this post.