Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Help:
JR4 Battle Module
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 06/04/13 19:20 

Ambassador:
Also, the templates version of $battle_wager_amount carries in the dollar sign with it so "> 0" doesn't work. After running debug, it shows "$500" instead of "500" from the skins battle_list.tpl. Therefore "Bragging Rights" is always shown in the templates battle_view.tpl


This is set in jrBattle.php line1823

Code
$_rt['battle_wager_amount'] = jrGetCurrencySymbol($config['vault_currency']) . $_rt['battle_wager_amount'];


to


Code
$_rt['battle_wager_amount'] = $_rt['battle_wager_amount'];

to get rid of the currency symbol.

but > 0 should work too because '$500' is > 0.

The reason it might not be working is because of the case:
put {debug} in the template your using to make sure the case of the variable is correct:

Code
{if $BATTLE_WAGER_AMOUNT > 0}
will not work if only lowercase is defined.

in that case it would need to be

Code
{if $battle_wager_amount > 0}



_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Ambassador



Joined: 23 Jul 2012
Posts: 109

Posted: 06/13/13 19:03 
Thanks Michael,

Yea the case is correct. Skins & templates have it different. One has the symbol, the other doesn't. I decided to just enter the straight battle wager amount and create a new variable ($battle_other_prize). This way I avoid the "greater than" issue and I have a new field to enter an alternative prize. If nothing is entered in the other prize field, the wager will show. Here is the code in battle_view.tpl


Code
{if $battle_other_prize !== ""} 
                  <span class="media_title"><b>{$battle_other_prize}</b></span>
               {else}   
                  <span class="media_title"><b>{$battle_wager_amount}</b></span>
                  
                    {/if}


Does anyone know how to link directly to a specific battle? Or even to the Completed battle page? I can't seem to find a way to deeplink into any of these pages.

Back to top
Ambassador



Joined: 23 Jul 2012
Posts: 109

Posted: 08/30/13 08:38 
Does anyone know how to LINK to a specific battle?

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

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