solved Allow Quota

nate
@nate
11 years ago
917 posts
I can't find it in any of the templates, so I apologize in advance.

I need to check if he profile owner is allowed to use a module.

{if $quota_is_allowed blah blah..} or something like that.
updated by @nate: 05/20/14 09:28:30PM
michael
@michael
11 years ago
7,802 posts
Its going to be different depending on what the module has defined.

Here are some of them:
{if $_user.quota_jrComment_allowed == 'on'}
{if $_user.quota_jrTicket_write_access == 'on'}
{if $_user.quota_jrForum_can_post == 'on'}
{if $_user.quota_jrTags_allowed == 'on'}
brian
@brian
11 years ago
10,149 posts
The "default" one when you register a module for Core quota support is:

quota_ModuleDir_allowed

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
michael:
Its going to be different depending on what the module has defined.

Here are some of them:
{if $_user.quota_jrComment_allowed == 'on'}
{if $_user.quota_jrTicket_write_access == 'on'}
{if $_user.quota_jrForum_can_post == 'on'}
{if $_user.quota_jrTags_allowed == 'on'}

I am not checking the user but rather the profile.
brian
@brian
11 years ago
10,149 posts
Natedogg265:
I am not checking the user but rather the profile.

A user's profile info is accessed as part of the $_user array.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
So if I am writing code to see if the profile has access to the jrAudio module I check the user array?

Isn't the user the person visiting the profile?
brian
@brian
11 years ago
10,149 posts
Natedogg265:
So if I am writing code to see if the profile has access to the jrAudio module I check the user array?

Isn't the user the person visiting the profile?

Yes - $_user is the active user that is viewing the site. To check if a profile has access to a quota feature, it depends on where it is at. If it is in a profile template, it's directly accessible - i.e.

$quota_ModuleDir_allowed

If it is in a foreach loop in a skin template:

$item.quota_ModuleDir_allowed

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
11 years ago
917 posts
Thanks.

That's what I was thinking after I saw your first post but wanted to be sure.

Thanks again.
brian
@brian
11 years ago
10,149 posts
No problem!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags