Joomla! 1.5 Custom Groups in Easyblog Category Access Control
Introduction
In this article I will explain how to use Joomla! Custom Groups to control access to EasyBlog Categories while using Joomla! 1.5 (yes that's 1.5)
Background - Joomla!, EasyBlog and NOIXACL
Things have moved on a lot in the last couple of years in the world of Joomla! 1.5 -> 1.6 -> 1.7 ->2.5 to infinity and beyond. From my personal point of view this has been too fast, but that's just me? There are still a whole load of Joomla! 1.5.x sites out there which, for all sorts of reasons, will remain on 1.5.x for some time but would benefits from some of the features in 1.6+. One of these features is Custom Groups that allows the creation and use of more than the standard groups available in 1.5.x and the assigning of users to more that just one group. This provides site admins with much more flexibility in controlling access to resources by users.
EasyBlog is one of the Joomla! extensions that makes use of Joomla! Custom Groups. In Particular, when creating a Blog Category you can assign access to Groups that control viewing and posting to Blogs. Under Joomla! 1.5.x EasyBlog just displays the standard (no-custom) Groups that are already defined in the Joomla! system and nothing more. However, the good people at Stackideas support the use of Joomla! 1.6+ in the same code used to access all releases of Joomla! As Joomla! 1.6+ has Customer Groups, the EasyBlog code supports the use of Custom Groups. So it's just a matter of telling EasyBlog (by some small code modifications) to use the Custom Group support even when running in Joomla! 1.5.x and having a means to manage the Custom Groups themselves.
The Joomla! extension NOIXACL (available via the Joomla! Extension Directory) can be used to manage Custom Groups in Joomla! 1.5.x. In this particular example I only use it to edit Custom Groups and assign users to multiple Groups, although there are other features in the extension, I'm not using them. Joomla! 1.5.x already has some constructs in place to support Custom Groups, the Groups themselves are held in the 'jos_core_acl_aro_groups' table and NOIXACL can be used to edit the contents of this table and add new entries. NOIXACL also extents the normal admin back-end Joomla! user manager to include the ability to assign users to Custom Groups.
Fitting it All together
Start by installing NOIXACL (I'm using 2.06 Beta) on Joomla! (I'm using 1.5.23). This added the "Access Control" option to trhe "Components" menu in the Joomla! Admin Back-End. Here you can create your new Custom Groups. Then goto the Joomal! "User Manager", select a User and you will see the extra NOIXACL setction at the bottom of the page. Here you can assign the User to the Custom Group(s).
Next we need to made a couple of modifications to EasyBlog (I'm using 3.0.7987) code in one PHP file "/components/com_easyblog/helpers/helper.php". Remember to keep a copy of the original and modified code. If a new EasyBlog release is installed your local modifications will be lost!
Once this has been done, the new Custom Groups can be selected when setting up the access control for EasyBlog Categories.
Modifcation 1: Allows EasyBlog to "see" Custom Groups; helper.php around line 4060
// we need to filter out the ROOT and USER dummy records.
if(EasyBlogHelper::getJoomlaVersion() < '1.6')
{
$where[] = '(a.`id` > 17 AND a.`id` < 26)';
}
Change to;
// we need to filter out the ROOT and USER dummy records.
if(EasyBlogHelper::getJoomlaVersion() < '1.6')
{
$where[] = '((a.`id` > 17 AND a.`id` < 26) OR a.`id` > 30)'; // Support forCustom Groups with noixACL in Joomla 1.5
}
Modifcation 2: Allows EasyBlog to "use" Custom Groups; helper.php around line 4120
if( EasyBlogHelper::getJoomlaVersion() >= '1.6' )
{
$groupIds = $user->groups;
$grpId = array();
foreach($groupIds as $key => $val)
{
$grpId[] = $val;
}
return $grpId;
}
else
{
return array( $user->gid );
}
Change to;
if( EasyBlogHelper::getJoomlaVersion() >= '1.6' )
{
$groupIds = $user->groups;
$grpId = array();
foreach($groupIds as $key => $val)
{
$grpId[] = $val;
}
return $grpId;
}
else
{
// Support for Custom Groups with noixACL in Joomla 1.5
$grps = array($user->gid);
$db = JFactory::getDBO();
$noixacl_query = 'select `id_group` from `#__noixacl_multigroups` where `id_user` = '.$user->id;
$db->setQuery($noixacl_query);
$result = $db->loadObjectList();
foreach($result as $item)
{
$grps[] = $item->id_group;
}
return $grps;
// Support for Custom Groups with noixACL in Joomla 1.5
}
Love your losses, don't get mad, don't even get even
I feel the need to write about a recent experience, maybe as a means of letting it out of my head but also because it reminded me of a Share Trading maxim "Love your losses".
From time to time we all meet the "difficult client". Luckily these are few and far between and in most cases can be converted by trying harder to understand where the problems are and going that bit further to meet their needs. After all, a client who's issues are effectively and efficiently resolved will often come back for more work knowing that issues will get resolved.
There is, however, another class of difficulty that can emerge after a job has been completed. Even when it has been completed to everyone's satisfaction. The non-payer! Seeking to avoid payment for work by any means.
Much of the work undertaken by smaller businesses is of a size that means that lengthy contracts and legally binding agreements are too much of an overhead. So in these cases, less formal agreements are usually the norm. Also, attempting to get a client to sign their life away for a small piece of work will most likely put them off anyway. A verbal agreement feels more personal and is more in-line with building client relationships for small pieces of work. This is also the way that many of us prefer to work.
BUT there is the non-payer.
An example, we shall call him "C".
"C" was involved in a start-up business that was to supply a customisable product via a web site. There were problems with the web site hosting and some of the site's functionality. So "C" turned up at my office in real need of assistance with a tight deadline for the site to go live. "C" gave me access logins to the hosting and the site and agreed to pay for the work done. I resolved the hosting issues and started working on the site functionality issues. I reported back on progress, a number of e-mails were exchanged and a meeting was held. I brought it to "C"s attention that the site problems were more severe than originally thought due to a number of "short cuts" made by an "offshore" web developers. "C" concluded that a new site, developed from scratch, was required and agreed to pay for the work conducted so far. I prepared an invoice, only charging for resolving the hosting issues and the start of investigating the site problems. I sent the invoice via e-mail. A month passed. "C" said he didn't get the e-mail, so I printed a copy and hand delivered it. More time passed and I started to hear of problems. Then a moonlight flit and "C" went to ground leaving a business partner holding the baby.
Then, some six months after the work was done, I find "C" is in business again, a very different business this time. I e-mailed him asking that he pay the invoice. A short e-mail exchange took place during which it became apparent "C" had no intention of paying. "C" denied I was ever asked to do any work and says I was trying to extract money from him on false pretences. There were other accusations made that I won't go into. I realised I could not produce any formal agreement regarding the work.
All of which had a greater affect on me than I expected. I became very angry over the situation. Far more than was warranted by the amount of money involved. And then, as I became aware there was nothing I could do about this, my thoughts started to move to how I could have prevented it in the first place. Should I have insisted on some formal agreement?
I concluded that I was right in how I approached the work in the first place. I don't want to move to the position of over zealous formal agreement just because of one rotten apple. So back to the Share Trading maxim "Love your losses". In other words, realise when you have a loss, realise it's not going to recover, accept it, learn from it and move on.
The bleeding stops when you stop hitting your head against the brick wall.
Custom Built Phone Systems from CommuniG8
Custom Built PBX Phone System from CommuniG8 for BSC Solutions
Growing business BSC Solutions recently moved to new office space and required an internal phone system. As the office space would be used by BSC Solutions and also their sister company Baby Loves Organics they needed to have phone lines for each company. They also wanted extensions which would enable them to transfer calls between the office phones, and also between the two companies.
CommuniG8 were able to build a custom system using Asterisk and FreePBX. Asterisk is open source software which is used to build communication solutions. FreePBX is used to control and manage Asterisk.
The phone system CommuniG8 built has features which included voicemail, connection to external VOIP trunk providers and detailed call reporting. As a strategic business partner of BSC Solutions, we have also included CommuniG8’s own extensions on the system, making it work across two separate locations.
For Your Organisation
If you would like to investigate the use of Asterisk/FreePBX within your organisation then contact CommuniG8 Limited. You can also read this article on Open Source VOIP for Small Businesses.
Contact
Richard Gate, CommuniG8 Limited
Vintage Lodge
Ings Lane
Keyingham
East Riding of Yorkshire
HU12 9RB
United Kingdom
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
+44 (0)1964 603111






