Website | Windows Tips | SEO

Wednesday, November 09, 2005

Nucleus Blog Software Review - Part 3


The size of the page that Nucleus produces is acceptable:

Total HTTP Requests: 18
Total Size: 33871 bytes

Object Size Totals
HTML: 8725
HTML Images: 1508
CSS Images: 1885
Total Images: 3393
Javascript: 11544
CSS: 10209

External Objects
Total HTML: 1
Total HTML Images: 1
Total CSS Images: 13
Total Images: 14
Total Scripts: 1
Total CSS imports: 2

Blogger is about 1/3 smaller for a similar looking page but Nucleus is in an acceptable range,  14 images is a little high and 11k of javascript is too much. But 33k for an over all page size is not that bad.

First Problem With Nucleus

I started trying to change the URLs and this is the first thing I ran across

FancyURLs without ForceType's
If you want fancyurls, but don’t want the extension-free files and forcetypes in your htacces, try this one.

Create a .htaccess file (or edit it) so that it contains this:

RewriteEngine On
RewriteRule ^member/(.*) index.php?arr=member/$1
RewriteRule ^item/(.*) index.php?arr=item/$1
RewriteRule ^category/(.*) index.php?arr=category/$1
RewriteRule ^blog/(.*) index.php?arr=blog/$1
RewriteRule ^archive/(.*) index.php?arr=archive/$1
RewriteRule ^archives/(.*) index.php?arr=archives/$1

Now the fanyurl style will be translated in an array with all the params. Now just edit your index.php so that it rebuilds it to normal getvars ($_GET[”var”] = “value”;). Don’t forget to change the $CONF[’SELF’] line to the absolute url to your domain without ending slash!

<?php

$requestvars = $_GET["arr"];
$request_arr = explode("/", $requestvars);
if ($request_arr[0] == "item") {
   $_GET["itemid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "member") {
   $_GET["memberid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "category") {
   $_GET["catid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "blog") {
   $_GET["blogid"] = $request_arr[1];
   $firsti = 2;
}
elseif ($request_arr[0] == "archive") {
   $_GET["blogid"] = $request_arr[1];
   $_GET["archive"] = $request_arr[2];
   $firsti = 3;
}
elseif ($request_arr[0] == "archives") {
   $_GET["archivelist"] = $request_arr[1];
   $firsti = 2;
}

$xflag = true;
for ($i = $firsti; $i < count($request_arr); $i++) {
   if ($xflag == true) {
      $j = $i + 1;
      $_GET[$request_arr[$i]] = $request_arr[$j];
      $xflag = false;
   }
   elseif ($xflag == false) {
      $xflag = true;
   }
}

// This file will generate and return the main page of the site
$CONF = array();
$CONF['Self'] = 'http://www.example.com/blog';

include('./config.php');

selector();

?>

This looks like way more that I want to get into and I am not sure it will give me the URLs that I want.

I found another option for FancyURL method using mod_rewrite.

This method completely mimics the ForceType method using only mod_rewrite, thus allowing it to be extended further with NP_FancierURL for WordPress-like URLs.

Put this code in your .htaccess file:

RewriteRule ^member/(.*) /member.php/$1
RewriteRule ^item/(.*) /item.php/$1
RewriteRule ^blog/(.*) /blog.php/$1
RewriteRule ^archive/(.*) /archive.php/$1
RewriteRule ^archives/(.*) /archives.php/$1Then rename all the FancyURL files (item, member, etc) by giving them .php extensions. Once this is done, follow the rest of the normal FancyURL directions.

(The list above is missing the rule for ‘category’ as well as the ‘RewriteEngine On’ line that needs to go at the top.)

This is not going to do what I want either, and it also looks like too much work.  Plus I have no idea how the software is going to know that I have rewritten all these URLs.