Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
Create custom user variables using mathematical functions

Did you like Bruce Springsteen's Superbowl performance?
Yes
100%
 100%  [ 2 ]
No
0%
 0%  [ 0 ]
No Opinion
0%
 0%  [ 0 ]
Total Votes : 2

radioindy



Joined: 03 Aug 2004
Posts: 4

Posted: 02/12/09 11:25 
I have a test project using variables with mathematical calculations. I am testing a scoring module for a game-like point system.

I have a user variable {$user_total_point} which keeps track of cumulative score.

I have a variable called {$user_points} which is the points for the current event.
I have a deduction variable called {$user_minus} which I want to be a random number from say 1-5.

I want {$user_total_point} = {$user_total_point} + {$user_points} - {$user_minus} so i can update the variable as it changes.

What is the systax in the user profile template needed to achieve this result?

Also, can the artist pages display these user variables?

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 02/12/09 12:32 

radioindy:
I have a test project using variables with mathematical calculations. I am testing a scoring module for a game-like point system.

I have a user variable {$user_total_point} which keeps track of cumulative score.

I have a variable called {$user_points} which is the points for the current event.
I have a deduction variable called {$user_minus} which I want to be a random number from say 1-5.

I want {$user_total_point} = {$user_total_point} + {$user_points} - {$user_minus} so i can update the variable as it changes.

What is the systax in the user profile template needed to achieve this result?


You will need to do your calculation in a custom PHP script - you won't be able to effectively do this via a template.


Quote:

Also, can the artist pages display these user variables?


yes - if done as a Jamroom 4 module:

http://www.jamroom.net/Module_Developer_Guide

Hope this helps!

- Brian


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



Joined: 26 Jun 2006
Posts: 627

Posted: 02/14/09 21:06 
Really Interesting! I would love to know more about where this goes!..

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.