This site is run by Nucleus CMS, and this is just to recapitulate how it was set up. It wasn’t all that hard, but it might be useful to remember.
First step was to create the blog in Nucleus which is straightforward.
Second step was to clone the grey skin and two templates, and edit them to my liking. I didn’t change all that much, just enough to make it mine. The blog-settings obviously have to be changed to use the new skin, and the skin to use the new templates.
Now for the more interesting parts. I want my blogs to have separate domain names and I want URIs without the query string, the part after the question mark.
My Nucleus setup has a directory layout like this:
TOP is the directory where I keep web-site’s files. The
nucleus/conf directory contains the apache configuration files,
nucleus/nucleus the installation of Nucleus,
nucleus/media is the media uploads and
nuclues/linux is the document root for this site. Other sites have their directories too.
Setting a blog up with a separat domain name requires a separate Apache setup, as a virtual host. I have the configuration file in
nucleus/conf/linux.conf which is included from the main Apache configuration file. The most important thing is the DocumentRoot, which points to
index.php files looks like this:
$CONF['Self'] = 'http://linux.seindal.dk/index.php';
which is fairly straightforward, except for the absolute address of the
index.php file. This is necessary since posting a comment would otherwise cause a change to my main Nucleus site.
With this setup the site can be used from the address http://linux.seindal.dk/.
The last part is to get Nucleus to work with URLs without a query string. Using long query strings are suboptimal in relation to some search engines, and it is suboptimal from an aesthetic point of view: an URL should be short and clear.
Since I have my own server, I can use the mod_rewrite approach, as explained in the Nucleus online docs. I have augmented the rules a bit to be more complete, and hardwired the blog specific parts:
RewriteRule ^item([0-9]+).html index.php?itemid=$1
RewriteRule ^archive([0-9]+-[0-9]+).html index.php?archive=$1&blogid=2
RewriteRule ^archive.html index.php?archivelist=linux
RewriteRule ^category([0-9]+).html index.php?catid=$1&blogid=2
RewriteRule ^member([0-9]+).html index.php?memberid=$1
As it is evident, the blogid of my site is 2, and the short name of the blog is ‘linux’. It eludes me completely why the arguments are used so inconsistently. What would be the problem with using either blogid or the short name every time? Of course, clarity and consistency would rise uncontrollably, but besides that?
With these rules in place, all that remains is to work through all the parts of the skin and the related templates to use links of the above kind.
The only other change I have made to my Nucleus installation is that I have installed the SmartParagraphs plugin. It makes writing a lot easier. I have extended the plugin a bit and fixed few bugs, as described on the Nucleus CMS forum. A gzipped copy of my updated SmartParagraphs plugins can be downloaded here: NP_SmartParagraphs.php.gz