Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 12:08
This stuff has me feeling like an idiot...good thing I don't mind posting stupid questions, you can bet someone else has the same stupid question :0)
What I want, is a popup window like you see in users -> modify user -> assign artist
You get that nice formatted popup window with a search and a list of bands and the add/remove buttons.
What I want is that nice formatted popup window with a search, but I want a list of users. I want the admin to be able to sift through the list and add users from the list which will have access to the module.
I can't for the life of me figure out how to do this.
Is there a form function call to create and format my window? Or does it take a template of some type that I need to parse?
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 01/29/09 12:32
This is a really a multi-part question, but yes - all of this doable (of course, since Jamroom does it
None of the Jamroom code is "encrypted" - all the formatting and comments is intact, so I'd recommend checking out the section of code you want to emulate. Basically you need to:
- from the form create a "popup" window (using popwin like other areas)
Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 13:55
Ok, starting over with this now, I've got my popup window working and things are actually going forward with some amount of momentum like I know what I'm doing
I'm having weirdness though with "power" users. So here's the ??
Some users have "user_power_quota" set to 1 and some set to 5 in the user column, which I assume is just saying that user is a power user that can create accounts and such?
And, that number represents the quota ID that they belong to? Or the quota ID they are allowed to assign artists to?
Is there anything else making a user a "power user" does to the database, or is it just the 1 flag in user_power_quota in the user table?
*and can a "power user" ever have more the 1 user_power_quota (such as 1;5;10)?
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 01/29/09 17:35
djmerlyn:
Ok, starting over with this now, I've got my popup window working and things are actually going forward with some amount of momentum like I know what I'm doing
I'm having weirdness though with "power" users. So here's the ??
Some users have "user_power_quota" set to 1 and some set to 5 in the user column, which I assume is just saying that user is a power user that can create accounts and such?
The user_power_quota column contains the quota_id that will be applied to any new profiles the power user creates.
Quote:
And, that number represents the quota ID that they belong to? Or the quota ID they are allowed to assign artists to?
The quota_id that will be assigned to profiles they create.
Quote:
Is there anything else making a user a "power user" does to the database, or is it just the 1 flag in user_power_quota in the user table?
the user_max_accounts column will be set to the number of profiles that they can create (including any they are already assigned to).
Quote:
*and can a "power user" ever have more the 1 user_power_quota (such as 1;5;10)?
Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 17:38
Thanks man, one question I forgot to ask...
Is there any way to see what users a power user created? I would like to give a power user access to control switches in my module for their users but only for their users. I sorta expected user_group_id to contain this info but it doesn't?
Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA
Posted: 01/29/09 17:45
djmerlyn:
Thanks man, one question I forgot to ask...
Is there any way to see what users a power user created? I would like to give a power user access to control switches in my module for their users but only for their users. I sorta expected user_group_id to contain this info but it doesn't?
Thanks!
user_group_id will contain a semi-colon separated list of band_id's the user is either associated with or has created (i.e. they have edit access to the profile).
Joined: 18 Dec 2003
Posts: 13497
Location: Behind You
Posted: 01/29/09 17:49
bigguy:
djmerlyn:
Thanks man, one question I forgot to ask...
Is there any way to see what users a power user created? I would like to give a power user access to control switches in my module for their users but only for their users. I sorta expected user_group_id to contain this info but it doesn't?
Thanks!
user_group_id will contain a semi-colon separated list of band_id's the user is either associated with or has created (i.e. they have edit access to the profile).
Hope this helps!
- Brian
ughgh, I'm a retard
; not :
I can't believe it, I've looked at that about 50 times in the DB trying to figure it out. Well cool, finally my first real chunk of a module is working
Now you can login, go to the module, pop open a user window and select some users or assign a power user to access the module and assign his users if he should want to.
Now I just need to make it do something, that part will be easy
Thanks, and sorry for all the dumb questions today