access levels

gapper

Member
Is it possible with Fabrik to create a a Register form by assigning a joomla access level for every new member depending on which selected profile?
E.g.: there are 3 membership kinds: free; standard and professional. How can I assign with Fabrik different levels depending on their choices in registering forms in the frontend? The members are all registered, but with different content views.
 
By itself, the JUser plugin will assign new users to only one group, so you can use a PHP plugin, running onAfterProcess that would handle the change of the levels, based on the selected profile.
 
Thanks for answer. I am not a programmer, so I don't know yet the PHP code, but am doing my best to learn what I can. It is my first experience with the website creation.
I have just read about the user group plugin in the wiki. It won't be useful for the access levels, but maybe I can get the same aim by creating new user groups
 
There might be a way to do it without any programming by using a first form that just ask your users which profile they fit, the redirect to the form specific to this profile, with the JUser plugin recording user in the appropriate group. You can have as many form as you have profiles.
Don't create seperate database tables in the database: create a first list, set the form for the first user group, then copy this list as many times as needed, each time editing the juser plugin according to the corresponding group.
That way you can also have custom intro text for each type of user and custom "thank you" page for each one after they submit the form.
 
As JFQ says, definitely don't use separate tables. Just copy the list in Fabrik, and set each copy up appropriately.

-- hugh
 
I thought that the redirect plugin allows to let appear a page or a message after submitting.
In my case, the specific pages for every profiles aren't immediately subsequent to the submit click:
A menu voice should show a link to a page. This page (the same link) should be different depending on which user (which profile he belongs) clicked on the link.
Through the redirect plugin, can I get that?
 
I'm not sure what you mean by:

the specific pages for every profiles aren't immediately subsequent to the submit click:
A menu voice should show a link to a page[/page]

However, from the sound of it, what you may be looking for is the Condition on the redirect plugin. this allows you to write a PHP snippet which decides whether the redirect should happen or not.

So say you have a 'user_level' radio element, which can be 1, 2 or 3 (coresponding to something like "Bronze, Silver, Gold or whatever) and you want to redirect to different pages depending on which level they are. You would have three redirect plugins, one for each level, with the redirect url set accordingly, and each of which would have a condition of something like:

PHP:
return '{yourtable___user_level_raw}' == '1';

So that code would be on the redirect for level 1, and would only run if the level is set to 1. Obviously the other two would test for '2' and '3'. So only one redirect will be run.

-- hugh
 
My project includes two ways to assign the access levels.
1) Users submit a form. Each user submitting that form has the same access level because they submitted that form.
2) Users submit a form with dropdowns. A dropdown includes cities and another includes jobs. So if I select New York in a dropdown and fireman into another dropdown, then I will have a different access level from a user selecting Paris and teacher.
How can I assign these 2 different access levels kinds?
 
I have learnt to create a submission form just like that supplied from joomla. I don't know yet:
1) how to create a link about forgotten passwords. I know how to create the link, but I don't know how to build the content (its function).
2) how to create two fields: Username and Password and the Go button in my homepage template.

At the moment I am using the joomla module because it has generated everything automatically. Please can you show the procedure to get the two points above?
 
If your submission form is connected directly to the #__users table, you can use the Joomla functions to dop what you need:
  • Use the same link that Joomla uses for restting a new password
  • Use the Joomla login module to do the login process
In fact, there is no problem to use the Joomla login module when you have a "Fabrik made" registration form. Just do an override of the default Joomla login form to redirect the "create a account" link to your form instead of Joomla's.
I am pretty sure this is explained in the Fabrik wiki somewhere, otherwise, look for this in the forum.
 
That's one of the aspect that makes Joomla powerful: you can change the way Joomla's extension display the data by having your own "view" in a file the html folder of your site template.
I can't develop that here but if you google "joomla template override" you'll find plenty of info on this subject.
If you understand Frenc, I have also an extensive tuto on the use of Fabrik as registration for Joomla.
 
Hi,
yeeeeeeeeessss!!!!! It works ok! I have followed only the first tutorial.
What could happen if I set the user table (users Joomla) in the following way:
Alter field types: Yes

I think I could modify the Registration form by adding some extra fields (I think). If it is correct, then what are the consequences about that?
In other words, can I add some extra fields and then set Alter field types: No? I know that if I follow your second tutorial, I can add some extra fields, but can I add them wihout following your second tutorial? If yes, what consequences?
 
In theory, you can do it, but it is always a bad practice to alter a Joomla (or a third party extension) core table because it can raise some compatibility/update issues some time down the road.
That is why I say to set alter field types to No.
You can expand your form with all the extra fields you want by doing a join to the users table (explained in part 2).
 
Please let me sum the procedures explained in messages by jfquestiaux on 23 may and by chesegrits on 28 may.
There are two ways in order to assign level groups. The first without PHP code and the second with PHP code.

Procedure for the first without PHP code:
1) Cresting forms and lists users into joomla users table
2) Creating form and list with extra fields and joined to the joomla user table
3) Form with extra fields includes three links (gold, silver, bronze) each of which leads to corresponding form. The three forms linked to the form with extra fields have the main difference which is the settings of juser plugin

Procedure for the second with PHP code:
1) Cresting forms and lists users into joomla users table
2) Creating form and list with extra fields and joined to the joomla user table
3) The form with extra fields includes a dropdown with labels: gold, silver, bronze and corresponding values: 1, 2, 3.
4) The form with extra fields has three redirect plugins: each of which has corresponding url in the Jump page and corresponding PHP code in Conditions.

Are these procedures correct as I wrote them?
 
The first one is not clear: you have a seperate form where you ask your users which level they want to register to and, based on their choice, you redirect them to the appropriate form with extra fields.
 
The first one has three links into the extra fields form. The extra fields form is joined to the joomla user table.
The three links (into the extra fields form) lead to three forms. Each of these three forms has a juser plugin correspondent to its own profile (gold, silver, bronze).
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top