Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
Flash video chat integration module - !! NEED HELP !!
avchat



Joined: 26 Jun 2009
Posts: 9

Posted: 08/20/09 06:18 
Hello to all of you.

I started developing a module which intergrates AVChat 3 in JR 4.

I managed to build most of it, but I am stuck in bringing a menu section to Member menu. I should add that no item it's showed in Member Menu (not even Home tab) and if I log in as admin I cannot find the Member Quota in Quotas List.

For Artists is working fine.

I created a file all_AVChat3Menu.php under /modules/AVChat3/cp/ just like in the development guide.


Code

<?php
defined('IN_JAMROOM') or exit();

function AVChat3Menu(&$_user) 

   global $language;
   
   if (!isset($GLOBALS['JR_MENU_SECTIONS']['section_AVChat3Menu'])) { 
      return(true); 
    }
   
   
   if ($_user['quota_id'] == 0 || $_user['quota_avchat3_access'] != 'yes') { 
        return(false); 
    } 

    jmTextBanner($language['AVChat3'][1],'false','false','false','section_AVChat3Menu');
   jmButton($language['AVChat3'][33],'AVChat3.php?mode=artist_login'); 
   jmTextBannerEnd();
   return(true);
}
?>


If I place a die(); before the function it works. Inside the function it doesn't.
The site is installed on a local machine with Ubuntu 9.04 and no core files were modified.

I don't know what I'm doing wrong.

Any help would be really appreciated.

Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/20/09 07:27 
Give this a try:


Quote:
<?php
defined('IN_JAMROOM') or exit();

function AVChat3Menu(&$_user)
{
global $language;

if (!isset($GLOBALS['JR_MENU_SECTIONS']['section_AVChat3Menu'])) {
return(true);
}


if ($_user['quota_avchat3_access'] != 'yes') {
return(false);
}


jmTextBanner($language['AVChat3'][1],'false','false','false','section_AVChat3Menu');
jmButton($language['AVChat3'][33],'AVChat3.php?mode=artist_login');
jmTextBannerEnd();
return(true);
}
?>


Hope this helps Smile


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
avchat



Joined: 26 Jun 2009
Posts: 9

Posted: 08/20/09 07:40 
Thank you for the reply, but is not working.

The function is not even called if I am looged in as a member.


SixString:
Give this a try:


Quote:
<?php
defined('IN_JAMROOM') or exit();

function AVChat3Menu(&$_user)
{
global $language;

if (!isset($GLOBALS['JR_MENU_SECTIONS']['section_AVChat3Menu'])) {
return(true);
}


if ($_user['quota_avchat3_access'] != 'yes') {
return(false);
}


jmTextBanner($language['AVChat3'][1],'false','false','false','section_AVChat3Menu');
jmButton($language['AVChat3'][33],'AVChat3.php?mode=artist_login');
jmTextBannerEnd();
return(true);
}
?>


Hope this helps Smile


Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/20/09 07:49 
Did you create a quota.php for your module?

http://www.jamroom.net/Jamroom_Modules_quota_php


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
avchat



Joined: 26 Jun 2009
Posts: 9

Posted: 08/20/09 08:05 
yes


Code
<?php
defined('IN_JAMROOM') or exit();


$AVChat3_quota_tab = 'Media Support';



function AVChat3_quota_config($quota)
{
   global $language;
   // Allow AVChat3 to be turned on/off per Artist quota
    if (isset($quota['quota_type']) && $quota['quota_type'] == 'artist') {
       jmSpanCell($language['AVChat3'][1],$language['AVChat3'][2]);
        jmYesNo($language['AVChat3'][3],'quota_avchat3_access',$language['AVChat3'][4],$quota['quota_avchat3_access']);
        jmYesNo($language['AVChat3'][5],'quota_avchat3_allow_streaming',$language['AVChat3'][6],$quota['quota_avchat3_allow_streaming']);
        jmYesNo($language['AVChat3'][7],'quota_avchat3_allow_private_streaming',$language['AVChat3'][8],$quota['quota_avchat3_allow_private_streaming']);
        jmYesNo($language['AVChat3'][9],'quota_avchat3_allow_pm',$language['AVChat3'][10],$quota['quota_avchat3_allow_pm']);
        jmYesNo($language['AVChat3'][11],'quota_avchat3_allow_send_file_user',$language['AVChat3'][12],$quota['quota_avchat3_allow_send_file_user']);
        jmYesNo($language['AVChat3'][13],'quota_avchat3_allow_send_file_room',$language['AVChat3'][14],$quota['quota_avchat3_allow_send_file_room']);
        jmYesNo($language['AVChat3'][15],'quota_avchat3_allow_create_rooms',$language['AVChat3'][16],$quota['quota_avchat3_allow_create_rooms']);
        jmYesNo($language['AVChat3'][17],'quota_avchat3_allow_emails',$language['AVChat3'][18],$quota['quota_avchat3_allow_emails']);
        jmYesNo($language['AVChat3'][19],'quota_avchat3_allow_urls',$language['AVChat3'][20],$quota['quota_avchat3_allow_urls']);
        jmYesNo($language['AVChat3'][21],'quota_avchat3_limit_freevideotime',$language['AVChat3'][22],$quota['quota_avchat3_limit_freevideotime']);
        jmInput($language['AVChat3'][23],'quota_avchat3_free_videotime_ammount','description',$quota['quota_avchat3_free_videotime_ammount'],$language['AVChat3'][24]);
        jmInput($language['AVChat3'][25],'quota_avchat3_text_char_limit','description',$quota['quota_avchat3_text_char_limit'],$language['AVChat3'][26]);
        jmYesNo($language['AVChat3'][27],'quota_avchat3_enable_floodcontrol',$language['AVChat3'][28],$quota['quota_avchat3_enable_floodcontrol']);
        jmInput($language['AVChat3'][29],'quota_avchat3_floodcontrol_delay','description',$quota['quota_avchat3_floodcontrol_delay'],$language['AVChat3'][30]);
        jmInput($language['AVChat3'][31],'quota_avchat3_maxstreams','description',$quota['quota_avchat3_maxstreams'],$language['AVChat3'][32]);
        return(true);
    }
    return(false);
}


I didn't paste the verification code.
Do I have to add quota settings for members too?[/code]

Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/20/09 08:47 
Yes, try changing this:


Code
if (isset($quota['quota_type']) && $quota['quota_type'] == 'artist')


to this:

Code

if (isset($quota['quota_type']) && $quota['quota_type'] == 'artist' || $quota['quota_type'] == 'member')


Hope this helps Smile


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
avchat



Joined: 26 Jun 2009
Posts: 9

Posted: 08/20/09 08:53 
I left only:


Code
if (isset($quota['quota_type']) && $quota['quota_type'] != "")


to allow changing settings for any defined quota.

The problem is that I don't find Members Quota in Admin Options->Jamroom Config->Jamroom Quotas and I have no menu item if I login as a member.

Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 08/20/09 08:56 
Do you have the bonus pack installed?

I believe you'll need that installed to get the member quotas.

Hope this helps Smile


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
avchat



Joined: 26 Jun 2009
Posts: 9

Posted: 08/20/09 09:01 
No I do not have it.

I developed the module on the free version.

Thank you very much for your support.

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 08/25/09 13:38 
You will not have the member menu if you have the free version installed.

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
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.