Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Help:
GigMemories button
musiccreatures



Joined: 20 Jun 2009
Posts: 344
Location: Portland Oregon

Posted: 08/03/09 10:50 
Anyone know how I can add a conditional statement to the GigMemories button, in the control panel? If a user logs in, and gigmemories is part of their quota, and they have "No gigs available for submission to GigMemories" They get an error.

I figured I could put some sort of condition on the button so that if they have a gig that they could submit to gigmemories, it would display the button. Otherwise the button would remain invisible.

Any Ideas?
Tim
http://www.music-creatures.com

Back to top
Paul
Jamroom Team


Joined: 20 Aug 2003
Posts: 5341
Location: Nottingham, UK

Posted: 08/03/09 12:22 
A good idea, but not that easy to do Sad
The module performs a database query to get eligible gigs for submission and only after that query does it know that there may be none, so that query would need to be included in the module /cp/artist_gmSubmitGigMenu.php and/or section_event.php files.
Not impossible, I guess, but something I haven't tried.

It might be easier to change the module language file to suggest to the user that all their gigs have already been submitted, or that they have no gigs in the first place.

Also maybe change the code in gmSubmitGig.php from


Code
    else {
      jrSetFormNotice('error',$language['gmSubmitGig'][3]);
      jrLocation("gmSubmitGig.php?mode=no_gigs");
    }


to


Code
    else {
      jrSetFormNotice('warning',$language['gmSubmitGig'][3]);
      jrLocation("gmSubmitGig.php?mode=no_gigs");
    }


hth
Pa


_________________
Paul Asher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
musiccreatures



Joined: 20 Jun 2009
Posts: 344
Location: Portland Oregon

Posted: 08/03/09 12:53 
Thanks for the reply and the ideas. A warning is the perfect solution. When the error is displayed, it sounds like its an issue with the website, not the users action.

-Tim

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Help

 
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.