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 our enterprise hosting helped SBHPP get more leads

Read about how we helped SBHPP improve the performance of their website to get more leads

Read more →

How do I allow users to view but not download documents?

DOCman with Google Drive allows users to view but not download documents.

Read more →

TEXTman 2.1 - introducing image enhancements for your Joomla articles.

TEXTman 2.1 introduces a slew of file and image specific enhancements for your Joomla articles.

Read more →