Component Content Control Plugin

This native Joomla 1.5 plugin allows you to specify the pages of a particular component that are visible to guests versus those pages of the component that require the user to login first. This is useful if you have a component - such as myblog, and you want certain blog pages to be viewable by guests, however, you want other blog pages to be viewable only by logged-in users.

NEW WITH V1.51 - NOW you can control multiple components - see below.

It works for any component - just provide the component name - the part that comes after "/index.php?option=" (for example: com_myblog) in the plugin parameter "Component Name".

There are 2 modes:

Mode 0 requires guests to login in order to see ANY of the pages for the specified component, EXCEPT for pages tagged with the substring. Use this mode if you want most of the component's pages to be viewable only by logged-in users.

Mode 1 allows guests to see all pages of the specified component, EXCEPT for pages tagged with the substring. Use this mode if you want most of the component's pages to be viewable by anybody, with only a few pages that require the user to login.

The plugin parameter called "Substring Tag" is the tag that you enter to identify component pages that you want to be made viewable by guests (mode 0) or only viewable by logged-in users (mode 1). You can enter several tags - just leave a blank space betweeen them. As an example, for myblog you can use tags such as : blogger=xyz category=public , etc to allow certain blog pages to be viewable by guests (mode 0).

Likewise if you use comcontrol with other components, the pages that you want to make private vs public need to be separate pages. For example if you use comcontrol with the joomla poll component (com_poll) - use the "id=xx" as a substring tag to make a certain poll page private or public.

There is a parameter called "Redirect URL" - if you are using the standard joomla 1.5 login page, then leave this blank. If you are using a 3rd party login page, such as community builer, etc , then put in the full path URL (http:....) of the login page you are using.

There is also a parameter for showing a specific login message when the plugin detects that a guest should login to view a particular page of the component specified. Leave this blank unless you want to show an additional message along with the standard joomla login message.

Remember to go to the Plugin Manager and enable the plugin and setup the plugin's parameters after installing it.

Read the documentation at http://joomlacode.org/gf/project/plgcomcontrol/ for more details on using plg_comcontrol with MyBlog 2.0 .

V1.51 PLUGIN CHANGES:
V1.51 makes a small change that allows the plugin to control multiple components. If you have installed V1.50 of the plugin already, just uninstall it and install the new version. To enter multiple component names that you wish to control, just go into the plugin manager for this plugin and type in the compone

Report

byadrian.rosian on August 24, 2009
Very good work, Roger! Nice code, clean and to the point. You should consider striping the parameters from the plugin and combining this with a component to create a true acl system, with groups and permissions to access every component. It's a start.
Having tried many ACL type components, which did not work with JArtforms, I was delighted to find this little GEM and ecstatic that it worked easily and without issue.
Simple install & clear docs.

Multiple components would be great.

Many thanks.

Ivan
Owner's reply

Hi - thanks for the kind words! Now with V1.51, it supports multiple components.

byNicMason on May 24, 2009
Excellent work! This is exactly what I needed to restrict EventList event details to registered users only.
Cheers!
Nic
byazerty on February 6, 2009
but no way to set several components!!!
too bad!!!
Owner's reply

Hi,
Thanks for the review! I've been thinking of modifying it to work with more than one component. I'll post an update here when there is a multi-component version available.