Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Third Party Products and Support:
Battle Module
Salfas



Joined: 23 Oct 2006
Posts: 129

Posted: 06/16/09 22:56 

barkerg:
also... Very Happy

this probley isnt how you would do it, but ...

I wanted the "competitors" to be able to select a battle from the battle vote screen, so I added the following code to battlevote.tpl though it does not limit them from clicking on the button if the battle is already full, it does have a little flexabuility.



Can you tell me what you mean by : "if the battle is already full" - is there a limit to the no of participants ?

Thanks.

Back to top
CAPER



Joined: 01 Jul 2006
Posts: 1554
Location: BRONX,NYC

Posted: 06/16/09 22:58 
i tried it but it didnt work for me



barkerg:
im not sure if this is how you guys would have done it, but I added a button to the {jrBattle_embed} so that a battle could be selected.

in function.jrBattle_embed.php I added this:


Code
$_desc[$_rcnt] = $_battle['Battle_Id_desc'];
       $_maxe[$_rcnt] = $_battle['Battle_Id_max_entries'];
       $_endd[$_rcnt] = $_battle['Battle_Id_end_dt'];
       [color=darkred]$_url[$_rcnt] = jrHtmlButtonCode('Select Battle',"window.location = 'index.php?module=jrBattle&t=battlevote&battleid={$_battle['Battle_Id_id']}'");[/color]
       $_rcnt++;

and then added:

 <tr>
      [color=darkred]<td width="25%" class="inner leader">Link</td>[/color]
     [color=darkred]<td class="spacer">&nbsp;</td>[/color]
     <td width="25%" class="inner leader">Battle Description</td>
      <td class="spacer">&nbsp;</td>
      <td width="25%" class="inner leader">Number Of Artists</td>
      <td class="spacer">&nbsp;</td>
      <td width="25%" class="inner leader">End Date</td> 
    </tr>

and finally:

<tr>
     [color=darkred] <td width="25%" class="item" valign="top">' . $_url[0] .'</td>
     <td class="spacer">&nbsp;</td>[/color]
     <td width="25%" class="item" valign="top">' . $_desc[0] .'</td>
      <td class="spacer">&nbsp;</td>
      <td width="25%" class="item" valign="top">' . $_maxe[0] .'</td>
      <td class="spacer">&nbsp;</td>
      <td width="25%" class="item" valign="top">' . $_endd[0] .'</td>
    </tr>

and the final result is:

http://www.pickabeat.net/images/vote_button.png


Back to top
guitarman



Joined: 25 Sep 2006
Posts: 363

Posted: 06/16/09 23:30 
You can try this , and it will give you 3 battles on your front page, with a few alterations in the format.



*****************************************************/
/**/

function smarty_function_jrBattle_embed($params,&$smarty)
{
if (!checkType($params['width'],'number_nz')) {
$params['width'] = 425;
}
if (!checkType($params['height'],'number_nz')) {
$params['height'] = 350;
}
global $jamroom, $jamroom_db, $config, $cluster;
$_post = getPostVars();
// get the correct language pack included..
$language = getLanguage($_user['user_language']);
$_brow = array();
$_rcnt = 0;
$req = "SELECT *
FROM {$jamroom_db['jrBattleIdInf']}";
$_rt = dbQuery($req,'NUMERIC');
if (isset($_rt) && is_array($_rt)) {
foreach ($_rt as $_battle) {
$_desc[$_rcnt] = $_battle['Battle_Id_desc'];
$_maxe[$_rcnt] = $_battle['Battle_Id_max_entries'];
$_endd[$_rcnt] = $_battle['Battle_Id_end_dt'];
$_url[$_rcnt] = jrHtmlButtonCode('Select Contest',"window.location = 'index.php?module=jrBattle&t=battlevote&battleid={$_battle['Battle_Id_id']}'");
$_rcnt++;
}
}
$_header = $language['jrBattle'][77];
$code = '<br />
<div class="inner">
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td width="100%"><h3 align="center">CURRENT MCF CONTESTS (site testing)</td></tr>
</table>
</div><br />
<div class="inner">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>

<td width="20%" class="inner leader">Link</td>
<td class="spacer">&nbsp;</td>
<td width="30%" class="inner leader">Contest Description</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="inner leader">Number Of Artists</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="inner leader">End Date</td>
</tr>
<tr>
<td width="20%" class="item" valign="top">' . $_url[0] .'</td>
<td class="spacer">&nbsp;</td>
<td width="30%" class="item" valign="top">' . $_desc[0] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_maxe[0] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_endd[0] .'</td>
</tr>
<tr>

<td width="20%" class="item" valign="top">' . $_url[1] .'</td>
<td class="spacer">&nbsp;</td>
<td width="30%" class="item" valign="top">' . $_desc[1] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_maxe[1] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_endd[1] .'</td>
</tr>
<tr>

<td width="20%" class="item" valign="top">' . $_url[2] .'</td>
<td class="spacer">&nbsp;</td>
<td width="30%" class="item" valign="top">' . $_desc[2] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_maxe[2] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_endd[2] .'</td>
</tr>
<tr>


</table></div>';
// Check for assign
if (isset($params['assign']) && strlen($params['assign']) > 0) {
$smarty->assign($params['assign'],$code);
}
else {
return($code);
}
}
?>


Also You can add more battles to your front by adding these in as xtras, but you will need to change [2} to {3}, or [4] etc, as they go up in order;

<td width="20%" class="item" valign="top">' . $_url[0] .'</td>
<td class="spacer">&nbsp;</td>
<td width="30%" class="item" valign="top">' . $_desc[0] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_maxe[0] .'</td>
<td class="spacer">&nbsp;</td>
<td width="25%" class="item" valign="top">' . $_endd[0] .'</td>
</tr>
<tr>

Back to top
guitarman



Joined: 25 Sep 2006
Posts: 363

Posted: 06/16/09 23:38 
I think It would be good to get;

1) Song title into the artist battle entry, along with

2) Artist page url.

Reason , we dont have aclue what song we are listening to, and no way of easily finding our new fav band Smile

Back to top
CAPER



Joined: 01 Jul 2006
Posts: 1554
Location: BRONX,NYC

Posted: 06/17/09 00:17 
thanks guitarman that worked

Back to top
dagilli



Joined: 07 Sep 2007
Posts: 213
Location: Seattle

Posted: 06/17/09 09:41 
Hi All,

Quick note on some of the last 3 or so posts...and also to set some aditional expectations for Beta 5.

I'm changing the Battle Enter Screen...
    - The "S" Button is now "Enter"
    - If the artist has joined any of the list of available Battles, the ones he/she has entered will show "View" instead of "Enter"
    - If a Battle is full, the full Battles will show "View" instead of "Enter"

I found a solution for the cluster server issue and this will be fixed.

Expanding the "Embed" function.
    - Add a link to the Battle AND
    - If the Battle is Complete, the winners Band Name will be displayed with a Band-Url



_________________
"With No Music, There Could Be No Harvest"
* AFRIJAM *
* Freelance Coding *
Back to top
CAPER



Joined: 01 Jul 2006
Posts: 1554
Location: BRONX,NYC

Posted: 06/17/09 10:56 
sounds good man we thank you for working hard on this keep up the awesome work

Back to top
CanPanther



Joined: 02 Jun 2008
Posts: 326
Location: Ontario, Canada

Posted: 06/17/09 11:15 
Just a couple of thoughts...


dagilli:

I'm changing the Battle Enter Screen...
    - The "S" Button is now "Enter"
    - If the artist has joined any of the list of available Battles, the ones he/she has entered will show "View" instead of "Enter"
    - If a Battle is full, the full Battles will show "View" instead of "Enter"



Would it be possible to add a 'Joined' button to indicate to the user which battles have been submitted to, instead of 'View'? And/or change 'View' to 'Full' when the battles are full. Something to differentiate between the two. It might be easier for the users, especially if they have entered a few battles and there are other full ones listed.


Quote:

Expanding the "Embed" function.
- Add a link to the Battle AND
- If the Battle is Complete, the winners Band Name will be displayed with a Band-Url


What about some sort of indicator for open/full battles, those not yet complete? It would drive users to join open battles a lot easier than going thru each battle w/o a winner in the list.

Back to top
Salfas



Joined: 23 Oct 2006
Posts: 129

Posted: 06/18/09 00:20 
A bit confused Rolling Eyes
What is a Full battle - Are we restricting the no of participants ?


_________________
MyBand - Indian Music Bands
Back to top
guitarman



Joined: 25 Sep 2006
Posts: 363

Posted: 06/18/09 00:51 
My understanding is that currently there is a max of 5 songs per battle.

Back to top
Salfas



Joined: 23 Oct 2006
Posts: 129

Posted: 06/18/09 00:57 
Thanks @ guitarman!

So One song per band - and which makes it five participants. Wondering how to choose that five!

Cheers.

Back to top
barkerg



Joined: 24 Dec 2007
Posts: 136

Posted: 06/18/09 08:43 
well either the first 5 who volunteen or if your site is doing well, the 5 highest bidders Smile


_________________
JBServers.net hosted
www.artistintro.com
Back to top
Salfas



Joined: 23 Oct 2006
Posts: 129

Posted: 06/18/09 09:10 
Is it possible to increase the number of participants ?


_________________
MyBand - Indian Music Bands
Back to top
barkerg



Joined: 24 Dec 2007
Posts: 136

Posted: 06/18/09 09:53 
you would have to add more tables in the db and modify the template files, but im sure it could be done if one was to try hard enough.


_________________
JBServers.net hosted
www.artistintro.com
Back to top
dagilli



Joined: 07 Sep 2007
Posts: 213
Location: Seattle

Posted: 06/18/09 11:07 

barkerg:
you would have to add more tables in the db and modify the template files, but im sure it could be done if one was to try hard enough.


Or you could start 2 Battles with 5 (Play off) and enter the winners for a new Battle (finals)....


_________________
"With No Music, There Could Be No Harvest"
* AFRIJAM *
* Freelance Coding *
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Third Party Products and Support

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