Actions

J1.5 talk

Difference between revisions of "Custom user groups"

From Joomla! Documentation

(I've seen this thread but my issue unresolved.)
Line 61: Line 61:
  
 
6. The NGrp only appears as selectable under Menus ?? (can live with this unless anyone can suggest a solution?)
 
6. The NGrp only appears as selectable under Menus ?? (can live with this unless anyone can suggest a solution?)
Changed access an existing menu item, say Nmenu from Registered to NGrp
+
Changed access to an existing menu item, say Nmenu from Registered to NGrp
  
 
8. Logged in as NUser, I went to click on the Nmenu item- it's not visible to me (or any other type of user - not even publisher)
 
8. Logged in as NUser, I went to click on the Nmenu item- it's not visible to me (or any other type of user - not even publisher)
Line 67: Line 67:
 
Well, something is wrong… The question is, what am I doing wrong?
 
Well, something is wrong… The question is, what am I doing wrong?
 
AND what is the function of lft and rgt in the jos_core_acl_aro_groups table?
 
AND what is the function of lft and rgt in the jos_core_acl_aro_groups table?
 +
 +
== Source script error? ==
 +
 +
Hey, I think the php source provided to rebuild the lft and rgt values is wrong.
 +
 +
If you run it against the un-modified jos_core_acl_aro_user_groups table, you will find that the values assigned are different from the original values.
 +
 +
The problem appears to be in the first call to rebuild_tree:
 +
rebuild_tree ( 0 , 1);
 +
 +
If you change this to
 +
rebuild_tree ( 0 , 0);
 +
 +
Then run it against the original jos_..._groups table, the values remain as they were originally.
 +
 +
Not sure if it fixes anything though!
 +
 +
== One more trick... ==
 +
 +
(Using Joomla 1.5.14)
 +
If you allow new registrations and want those newly registered users to go into one of your newly created custom groups, you would set this on the Global Configuration/System Tab, under "User Settings".  The problem is that the original options of Registered/Author/Editor/Publisher are the only values available in the drop down list.
 +
 +
To fix that, edit the file <joomla root>\administrator\components\com_users\config.xml.
 +
 +
In my case, I am setting up a site which needs to provide additional content to verified users (members of a club.)  So I've added them like so:
 +
 +
  <param name="new_usertype" type="list" default="Registered" label="New User Registration Type" description="TIPNEWUSERTYPE">
 +
  <option value="Registered">Registered</option>
 +
  '''''<option value="Members">Members</option>'''''
 +
  <option value="Author">Author</option>
 +
  <option value="Editor">Editor</option>
 +
  <option value="Publisher">Publisher</option>
 +
  </param>
 +
 +
The ''value'' needs to match what you have inserted into jos_core_acl_aro_groups (not sure which column - name or value - but *personally* I'd suggest they are both the same anyway!)
 +
 +
== Problem under Joomla! 1.5.15 and GMAccess 5.15... ==
 +
The new groups aren't displayed on Joomla! 1.5.15 : in the backend, when you edit an user, you can only see the commun groups provided by Joomla!.
 +
But the "jos_core_acl_aro_groups" table is correctly modified by the php script.
 +
 +
However, the new groups are displayed in Community Builder 1.2 .
 +
 +
The problem came from the component GMAccess which also hackes the Joomla! code : This component modifies the file "/administrator/components/com_users/views/user/view.html.php"
 +
 +
Sorry for the noise.
 +
 +
== Need more documentation on rebuild_tree() ==
 +
<ol>
 +
<li>I created a new group under registered.</li>
 +
<li>Did not assign lft or rgt values.</li>
 +
<li>assigned parent_id=18</li>
 +
<li>Then I ran rebuild_tree(0,1) as it shows in the doc</li>
 +
</ol>
 +
 +
All the lft and rgt numbering is messed up. Their are duplicates and their is no order at all.
 +
 +
Whoever wrote the original doc needs to clearly explain what this function does and how to use.
 +
 +
If im changing a child node then the very top root has to be changed also. So do not know what else to put for first parameter besides 0.
 +
 +
How does this function know what order to place the new group within the same node level?
 +
 +
== Do not see this bug in 1.5.11 ==
 +
 +
This looks more like a bug report and how to fix it.
 +
 +
== I've seen this thread but my issue unresolved. ==
 +
 +
hi all
 +
I've seen this thread but my issue unresolved.
 +
please help me.
 +
i have joomla 1.5.25 [http://POLNET.IR]

Revision as of 19:31, 7 July 2012