Enable global checkin for managers in Joomla 1.0.x

Homepage > Home > Coding > Enable global checkin for managers in Joomla 1.0.x

Tue 01/27/2009

in Coding, PHP

Due to a comment request in a preview post i’ve worked out an hack to enable global checkin for managers in Joomla 1.0.x (1.0.13 in my case).

Open file includes/gacl.class.php and add below line 162 (after the comment “add additional components for a manager as desired, or give access to all“) the following code:

$this->_mos_add_acl( 'administration', 'config', 'users', 'manager', null, null );
$this->_mos_add_acl( 'administration', 'edit', 'users', 'manager', 'components','com_checkin');

As a side effect, this will also enable other menus such as Site (with configuration’s options) and Messages.

If you want to show only a Global Checkin menu item you should modify the full menu module in administrator/modules/mod_fullmenu.php by editing line 35 from:

$canConfig = $acl->acl_check( 'administration', 'config', 'users', $usertype );

to:

$canConfig = (bool) ($acl->acl_check( 'administration', 'config', 'users', $usertype ) && strpos($usertype,"Administrator") !== false );

Then add at about line 303 (there’s a closing curly bracket ):

if ($usertype == 'Manager') {
?>
     [null, 'Global Checkin', 'index2.php?option=com_checkin', null,'Check-in all checked-out items'],
<?php
}

Note: On some installations or different versions of 1.0x lines can differ.

————————————-

03/02/09 UPDATE: I’ve zipped the hacked files to make it simpler to patch your installation. Note that these files belong to a english Joomla 1.0.13 clean install. You can browse change with a compare software like WinMerge.

Joomla 1.0.x Global Checkin for Manager (7.69 kB)
No Related Posts

Tags: ,

One Response to this post:

Leave a Reply ()

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

* required.