Forgot?

Ninja Access Plugin

Ninja Access - Plugin allows you to hide or show portions of content depending on the access level of the viewer.

It is useful for selectively hiding content from different users, such as hiding ads from administrators and subscribers. Or hiding valuable content from un registered users while still allowing access to those with a specific groupid.

This plugin is used extensively throughout this site to restrict  access to specific content to certain groups.

This extension is designed to work in conjunction with other ACL extensions such as JACL Plus or noixACL. It will operate with just the default Joomla groups, but you cannot create new groups via this extension.

 

Documentation

Please note that a space has been inserted into the second position in the activation tags in the examples below to stop them being parsed by the plugin. It has been highlighted in blue. Remove this space when you wish to use the bot yourself.

{ njaccess groupid[,groupid]}...some content...{ /njaccess}

One or more group ids should be passed in seperated by commas.
These id's are checked individually and not recursive so you need to enter child groups as well if you want them to have access.


Default Joomla 3.0 Group IDs:

  • 9 - Guest
  • 2 - Registered
  • 3 - Author
  • 4 - Editor
  • 5 - Publisher
  • 6 - Manager
  • 7 - Administrator
  • 8 - Super Administrator

Default Joomla 2.5 Group IDs:

  • 0 - Guest
  • 2 - Registered
  • 3 - Author
  • 4 - Editor
  • 5 - Publisher
  • 6 - Manager
  • 7 - Administrator
  • 8 - Super Administrator

Default Joomla 1.5 Group IDs:

  • 0 - Guest
  • 18 - Registered
  • 19 - Author
  • 20 - Editor
  • 21 - Publisher
  • 23 - Manager
  • 24 - Administrator
  • 25 - Super Administrator

Usage

{ njaccess groupid[,groupid]}
Content for allowed groups
{ !njaccess}
Error message for not-allowed groups
{ /njaccess}

One or more Group IDs should be passed in seperated by commas. These IDs are checked individually and not recursive so you need to enter child groups as well if you want them to have access.
Note:
groupid can be either a Group ID or a Pre-defined Group Name.
Pre-defined groups: [Guest, Registered, Author, Editor, Publisher, Manager, Administrator, SuperAdmin]

Example:

{ njaccess 0} Shows only to guest users { /njaccess}
{ njaccess 18,19,20,21,23,24,25} Shows to all users who are not a guest { /njaccess}
{ njaccess 24} Shows to administrators { /njaccess}

{ njaccess Administrator, SuperAdmin}
You can see this because you are either an Administrator or a Super Administrator
{ !njaccess}
Sorry, you don't have the permission to see this message!
{ /njaccess}
Note:
The { !njaccess} tag is optional, if you don't want the not-allowed groups to see anything, don't include it.

Changelog

Version: 2.2.1 Date:10 Dec, 2012 State: Bugfix release

  • Fixed fatal preg_match issue.

Version: 2.2 Date:4 Dec, 2012 State: Feature Release

  • Feature - Added the ability to show a message to people without access.

Version: 2.1 Date:31 Oct, 2012 State: Feature Release

  • Feature - Joomla 3.0 compatibility added.

Version: 2.0 Date: 21 June, 2012 State: Feature Release

  • Feature - Joomla 2.5 compatibility added.

Home Extensions Ninja Access Plugin