Using Joomla! as an intranet

If you’re using Joomla! for an intranet, or any site that is closed down completely for all non-registered, there’s a simple trick: put your site in offline mode. Out of the box this will lock down everything for everyone who hasn’t got backend permissions, but there’s a way to change that.

Offline mode

Step one is to put the site offline. There’s an option for that in the Global Configuration. You’d normally use that when making significant changes to your site, to keep users out, but allow managers and administrators in. In our case, we want to allow all registered users. I suppose that with the new ACL in Joomla! 1.6, there will be a place where you can change this. For now, we’ll just make a small hack to /includes/application.php

// Find this line:
if ($this->getCfg('offline') && $user->get('gid') < '23' ) {

//Change it to: 
if ($this->getCfg('offline') && $user->get('gid') < '18' ) {

The template

You might also want to adapt the look of the login page to your site. Here we don’t need to hack a thing, as we can use template overrides. Copy the file /templates/system/offline.php to /templates/[YOUR_TEMPLATE]/offline.php. It’s plain HTML with some PHP tags, so you should have no problem editing it to your liking. Changing the graphics and some text will be sufficient for most people.

Up next

How to link to a page in a pdf file.

How to link to a given page in a PDF file when rendered in the browser.

Read more →

Switching from WordPress to Joomla and setting up a document repository

Demistifying the switch from WordPress to Joomla and DOCman

Read more →

How Meltdown and Spectre affects your Joomla site

Here's what we learned so far about the Meltdown and Spectre vulnerabilities.

Read more →