Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
popupuser select form
djmerlyn
Jamroom Ustad


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?


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


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 Wink

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)

- the popup window, when it loads, loads a "mode" from your script. This would be formatted just like other CP pages, but you would set the "header" parameter to jmHtmlBegin to false:
http://www.jamroom.net/Function_jmBodyBegin
as well a the action menu ($show_menu) option to jmHtmlBegin to false:
http://www.jamroom.net/Function_jmHtmlBegin

For example - this would create a popup window in a Jamroom form:


Code

$_btn[0]['type']    = 'button';
$_btn[0]['value']   = "click me to popup"
$_btn[0]['onclick'] = "popwin('yourscript.com?mode=your_mode','window_name',500,500,'yes');return false;">';
jrFormElementCell('Options',$_btn);


Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 01/29/09 12:36 
I see. So there is no template at all, this is all taken care of in the formelement?

I reference the core code quite a bit to hack away at this, but sometimes its confusing Smile

I'll try this and see if I can make heads or tails Confused

Thanks!


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
djmerlyn
Jamroom Ustad


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 Laughing

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)?


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


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 Laughing

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)?


no - only 1.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


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?

Thanks!


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Brian
Jamroom Team


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).

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
djmerlyn
Jamroom Ustad


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 Laughing

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 Smile

Thanks, and sorry for all the dumb questions today Smile


_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.