Setting up Nucleus blogs

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/nucleus
TOP/nucleus/conf
TOP/nucleus/nucleus
TOP/nucleus/media
TOP/nucleus/linux
TOP/nucleus/othersite

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 nuclues/linux.

DocumentRoot TOP/nucleus/linux

Here the index.php files looks like this:

<?php
$CONF['Self'] = 'https://rene.seindal.dk/index.php';
include('../nucleus/config.php');
selectBlog('linux');
selector();
?>

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 https://rene.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:

RewriteEngine On
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


Comments

3 responses to “Setting up Nucleus blogs”

  1. thanks …

  2. Thanks for the information. I’m a website builder, but don’t have a clue as to using nucleus for my blog, which is to accompany a book I’ve got launching in January. So far I’ve fumbled through it, but there’s one thing I can’t seem to get a grip on. At the top of my blog, miscarriagehelp.com
    there are two tabs, ‘about’ and ‘links’.
    I want these to work, and thought by assigning different URLS to them it’d work. Although I have full administrative access, as does my pubisher, only she can seem to make any changes happen. When I run my cursor over the two tabs, the right addresses appear, (or so I think, this is foreign to me and I may be thinking in website terms, not blog terms), but they now come up with a page not found when clicked on. Thought I’d take a chance a post this comment to see if there’s some easy to understand help out there.
    Thanks for your time, Ellen
    http://miscarriagehelp.com

  3. Shekhar avatar

    Hi friend !

    Thanks for your nice post. A problem regarding activating mod_rewrite on my website is bothering me a lot. As I was searching for a solution for it, I found ur post. Hope you can help me.

    Here is my problem :

    http://forum.nucleuscms.org

    I have posted it on nucleus forum, but have got a very little (& incomplete response). I’ll be happy if you can help me. Kindly email me or just make an entruy into the above mentioned post.

    Regards

Leave a Reply

Your email address will not be published. Required fields are marked *