views:

43

answers:

2

Okay I'm a little confused on how to do this due to the fact that I'm new to Joomla.

I have a site where users need to be logged in to view certain articles. I want restricted articles to basically pick up weather or not the user is logged in, if so proceed as normal, else display a login/registration form.

I looked at the plugins section and found a "Joomla-Authentication" plugin. Now, how do I use that in an article in the same fashion I use other plugins in article? i.E {plugin_name}params{/plugin_name}

A: 

NO... You do not need plugin for this AT ALL.

In Joomla you have "Access Type" for modules/articles/pretty much everything.

  • Public - Visitors
  • Registered - logged in users
  • Special - back-end users

In Back-End go to Modules and create new Log-In module. In the access type selected "Public".

When you create articles select "Registered Access" this way only signed-in users will see the article.

This will help you. Log-In the admin Back-End (Administrator Screen), go to Help->Joomla Help. In the Alphabetical Index find following topics:

  1. Module Manager (it explains access types)
  2. Module - New
  3. Article Manager (it explains access types)
  4. Article Manager - New/Edit
Alex
When I do the Registered user thing, I get this big ugly red message saying "Restricted Access" I want the user to be shown a signup form. How do I do that?
Yo Momma
You need to have 2 different Menus. Main menu for Public, the other User Menu for Registered. The main menu will have items to all PUBLIC content, the USER MENU only to "Registered Users", make sure to change Access Level for the user menu to registered. Basically, do not create "Public" menu items to "Registered Only" content. If you do that make sure both the menu link and the article have the same access level.Also add a new Module, "Login Module" it will have the "Create New Account" link
Alex
A: 

I found a solution that works for me. I downloaded and installed JUMI. Jumi is a Joomla extension that allows you to include files such as php and then executes the code in those files. Through PHP I check user access and do redirects accordingly.

JUMI can be downloaded here

Yo Momma