Creating a forest of permissions in Joomla! 1.6
Last Updated on Tuesday, 31 August 2010 09:30
By default, Joomla! 1.6 has a single tree for managing user groups. This tree is based upon the group "public" of which all branches of groups, and sub-groups, belong to.

However, is is possible to create a new tree, trees, or even a forest for other user groups and sub-groups. To do this, one needs to create the trees via SQL with a query such as:
ACL Escape Hatch
Last Updated on Tuesday, 31 August 2010 09:05
It's 5:32 PM Friday evening and time to go celebrate as you launched the biggest website of your career earlier in the week. You took great care to use the latest technology provided by Joomla! 1.6; nested categories for greater content control and carefully tuned permissions powered by the new ACL. You've even trained your client in all of the "ins and outs" of access control levels so that they can manage and create user groups on their own.
On the way out of the office, the phone things. You pick up the phone in one hand, notebook computer in the other, your client is freaking out "I can't log into my site. No one can!". You calmly ask your client what he was doing when this happened. "Oh, I was just adjusting the global admin permissions." Ah ha! So you boot up your notebook, FTP to the client website, download a current copy of configuration.php and add the following line of code:
public $root_user="42";
You upload the new configuration.php, ask your to client log in as the Super User and ask then to set Admin to allow for the Super Users group.
Client crisis over.
RokAjaxSearch 1.9 (MooTools 1.2) Beez Override Conflict
Last Updated on Monday, 09 August 2010 06:34
When enabling the Mootools upgrade system
plugin (which enables Mootools 1.2 in Joomla), RokAjaxSearch 1.9 stops fetching results on single article
layout pages. This occurs due to a conflict with the Mootools 1.2 JavaScript used by RokAjaxSearch and the Beez
com_content/article override. This can be worked around by changing
<div id="page"> in com_content/article.default.php to some else. For example,
you can use <div class="page"> or <div id="content">. You
may need to adjust your CSS to match your change.
This issue only occurs with Mootools 1.2 since RokAjaxSearch loads a
different JavaScript for that version of Mootools. I would expect
Rockettheme to adjust their
JavaScript since the Beez overrides are everywhere.
The long lost SyntaxHighlighter brush
Last Updated on Wednesday, 02 June 2010 13:11
We've been asked many times what brush we use with SyntaxHighlighter. It's generally the PHP brush, with html-script set to true. html-script: true is used for when you're writing HTML inside of another language, such as PHP. For example:
Read more about it at http://alexgorbatchev.com/wiki/SyntaxHighlighter:Demo:html-script<pre class="brush:php; html-script: true"></pre>
Redirecting New Joomla Users On First Visit
Last Updated on Monday, 24 May 2010 08:48
While fine-tuning the user flow of our [under development] Joomla Engineering website, we needed a way to redirect new users to a designated page immediately upon registering (we're not using the activation email feature). To accomplish that, we engineered a system plugin to do so. It checks whether or not the user's lastvisitDate is "0000-00-00 00:00:00", and if it is, it sets the date to the current time and sends them to the designated page.
Sound like something that would be useful to you? If so, download the Redirect First Login plugin version 1.5.1.
Quick tip: SyntaxHighlighter BloggerMode
Last Updated on Thursday, 22 April 2010 11:31
We love SyntaxHighlighter for an enhancing code display. But, some WYSIWYGs have a nasty habit of converting white space within <pre> tags to <br /> tags. To get around this, enable BloggerMode. Looking for SyntaxHighlighter for Joomla? Check out the Ruby Tags website or download the Ruby Tags SyntaxHighlighter Plugin 1.1, which is updated with SyntaxHighlighter version 2.1.364.
Component Only Template
Last Updated on Tuesday, 27 July 2010 21:13
The power and flexibility of Joomla allows for the creative use of template techniques to expand its capabilities. One such technique is the use of a component only template. It expands the possibilities of a Joomla website by providing the ability to include content such as splash pages, full-screen Flash movies, and even pseudo 404 pages for hiding a website from a casual passerby. The following tutorial will show you how to implement a component only template.
To give you an idea of what can be accomplished with a component only template, we have put together the following demos. Each one is an article contained in this website. The only difference is the template.
A component only template is exactly as the name implies, only the component. No module positions or other elements are included in this type of template. This allows for the possibility to exclusively display the content of an article.
Modify RokDownloads Date Format
Last Updated on Monday, 24 May 2010 08:32
RocketTheme produces some great Joomla! templates and extensions. Of them, we find ourselves using RokDownloads quite often. One of the most requested change that we need to make to it is the date format.Originally posted by Brian Towles of Team RocketTheme at the RocketTheme Forum:
Add this line for the languages/en-GB/en-GB.com_rokdownloads.ini
DATE_FORMAT_LC4=%m-%d-%Y
Call Joomla! Template Parameter From Template Override
Last Updated on Thursday, 04 February 2010 18:11
Here's a beauty of a gem for all of you template-override-happy, parameter junkies (I'm one too!). You can call template based parameters (hint: add your own) from within a template override. This first bit was originally posted at the Joomla! forums by okonomiyaki3000:
<?php
global $mainframe;
jimport('joomla.filesystem.file');
$tparams = new JParameter(JFile::read(JPATH_BASE.DS.'templates'.DS.$mainframe->getTemplate().DS.'params.ini'));
?>
This allows you to read the template parameters. Then you can call one of them as follows:
<?php echo $tparams->get('redirectUrl'); ?>
Now, if that's not enough fun for you, we can mix in some JavaScript. For example, we'll take a newly created redirect parameter and slap it in the middle of a redirect, resulting in:
<script type="text/javascript"> window.setTimeout('window.location="<?php echo ($tparams->get('redirectUrl')); ?>"; ',1); </script>NOTE: The Art of Web posted a nice write-up entitled "PHP: Passing variables to JavaScript that could come in handy.
Redirecting Joomla's View (MVC)
Last Updated on Monday, 24 May 2010 08:31
In some cases, redirecting the view of a component of module can be easily accomplished by a bit of JavaScript. For instance, the component ccNewsletter doesn't allow for an option (as of this writing) to redirect after a successful event occurs. To accomplish this task, simply add the following code at the end of a template override for the view of the component.
<script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.location="http://betweenbrain.com/"; ',1000);
// -->
</script>
You can control the time and destination of the redirect. Time is 1000 milliseconds in this case, and the destination is http://betweenbrain.com/.
For example, ccNewsleter's activate view was:
<?php
defined('_JEXEC') or die('Restricted access');
?>
><div>
<?php echo $this->pageTitle; ?>
</div>
<table>
<tr>
<td>
<?php echo $this->operationStatus; ?>
</td>
</tr>
</table>
<br/>
After the redirect code addition, it is now:
<?php
defined('_JEXEC') or die('Restricted access');
?>
<div>
<?php echo $this->pageTitle; ?>
</div>
<table>
<tr>
<td>
<?php echo $this->operationStatus; ?>
</td>
</tr>
</table>
<script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.location="http://betweenbrain.com/"; ',1000);
// -->
</script>
<br/>
Download the ccNewsletter Overrides v1.1. Extract the contents to the HTML folder of your template and enjoy.
Update May 18th 2010: We've improved this code to use the base URL of the website. The new code, also available in the above download, is:
<script language="javascript" type="text/javascript">
<!--
window.setTimeout('window.location="<?php echo $this->baseurl ?>"; ',1000);
// -->
</script>
More Articles...
Page 1 of 2