SECTalk.com

Sports Pick 'Ems Application

378 posts in this topic

index.php?app=downloads&module=display&s



File Name: Sports Pick 'Ems Application

File Submitter: SECTalk.com

File Submitted: 25 Jul 2012

File Category: User and Social Engagement

Supported Versions: IP.Board 3.2.x, IP.Board 3.3.x, IP.Board 3.4.x



This is a Sports Pick 'Ems Application where you can enter matchups and your users can predict winners and gain points based on correct predictions.

Some of the features include:

  • Start multiple contests (hereinafter "pools").
  • Separate pools into "weeks."
  • Enter games into the weeks.
  • Manage teams for each separate pool.
  • Individual leaderboard for each pool as well as each week.
  • Permissions integration so you can set who can pick games.
  • Support for ties.
  • Support for spread based pick 'ems contests.
  • Support for individual game deadlines as well as weekly deadlines.
  • Ability to view other users' picks
  • And much more.. see screenshots and changelog

More features are coming, including integration with the notifications system.

Tested and working on 3.2.x and 3.3.x.



here to download this file

Share this post


Link to post
Share on other sites

Upcoming features:

  • Language support
  • Notifications

Known bugs:
  • Doesn't install where there are table prefixes.
  • If you don't enter in anything for the image URL, it won't submit the teams. Just enter 0 in the meantime.

Share this post


Link to post
Share on other sites

I've just purchased this.

There was only an admin folder within the install package (i.e. no public) but I guess some apps don't need it.

I'm running ipb 3.3.3
Uploaded files correctly.
Went to my ACP-> manage applications and modules and chose the pickem app.

Chose install and on the first step I got the following error:

· CREATE TABLE IF NOT EXISTS ibf_`pickems_games` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT NULL, `weekid` int(11) NOT NULL, `homeid` int(11) NOT NULL, `awayid` int(11) NOT NULL, `name` varchar(255) NOT NULL, `location` varchar(255) NOT NULL, `spread` varchar(255) NOT NULL, `deadline` int(10) NOT NULL, `trend` int(11) NOT NULL, `trendteam` int(11) NOT NULL, `winner` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`pickems_games` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT' at line 1
· CREATE TABLE IF NOT EXISTS ibf_`pickems_picks` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT NULL, `weekid` int(11) NOT NULL, `gameid` int(11) NOT NULL, `userid` int(11) NOT NULL, `pick` int(11) NOT NULL, `winner` int(11) NOT NULL, `result` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`pickems_picks` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT' at line 1
· CREATE TABLE IF NOT EXISTS ibf_`pickems_pools` ( `id` int(11) NOT NULL auto_increment, `open` int(11) NOT NULL, `name` varchar(255) NOT NULL, `spread` int(11) NOT NULL, `ties` int(11) NOT NULL, `timezone` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`pickems_pools` ( `id` int(11) NOT NULL auto_increment, `open` int(11) NOT N' at line 1
· CREATE TABLE IF NOT EXISTS ibf_`pickems_teams` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT NULL, `name` varchar(255) NOT NULL, `shortname` varchar(8) NOT NULL, `imageurl` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`pickems_teams` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT' at line 1
· CREATE TABLE IF NOT EXISTS ibf_`pickems_weeks` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT NULL, `name` varchar(255) NOT NULL, `deadline` int(10) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM;

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`pickems_weeks` ( `id` int(11) NOT NULL auto_increment, `poolid` int(11) NOT' at line 1

Continue anyway?

SECTalk.com likes this

Share this post


Link to post
Share on other sites

I've just purchased this.



There was only an admin folder within the install package (i.e. no public) but I guess some apps don't need it.



I'm running ipb 3.3.3


Uploaded files correctly.


Went to my ACP-> manage applications and modules and chose the pickem app.



....




Download the new version of the file and re-upload and overwrite the old files. This should fix it.

Share this post


Link to post
Share on other sites

Well those bugs are actually already fixed.. I just can't go back and edit that post for some reason. :wacko:

Share this post


Link to post
Share on other sites

Ok, I've been testing this and a few issues have come up.

See the image below:

post-115527-0-96423900-1343346159_thumb.


The issues are:

1) the name of the home team is not shown.
2) the image of the home team is not shown. (doubled checked, it was added correctly)
3) some results are shown as "correct" instead of "pending". I only added the picks but didn't add any results, so it can't possibly be correct. Look at the time. (I doubled checked to see if I'd entered results instead of choosing picks, but no, I'd only submitted my picks and automatically it shows some of those picks as correct, others as pending...

I've tested creating other pools:

with no ties. Same results.
wit no ties and no spread. Same thing happens.

Share this post


Link to post
Share on other sites

Could you give me a dump of all your pickems_* tables so I can see what's going on. I can't seem to reproduce this issue.

Share this post


Link to post
Share on other sites

Also, you didn't perchance select the same team as home and away for the same game did you? IF you did, try to see if you can change that home team to a different team.

Share this post


Link to post
Share on other sites

Sent by private messages.

No, I didn't select the same team home and away. I've just created some test pools with 10 teams to keep it simple. And I've chose 1vs2, 3vs4, 5vs6, 7vs8, 9vs10 to keep it simple.

Share this post


Link to post
Share on other sites

Ahh, gotcha. I see the issue. Will update the zip in the morning. In the meantime, if you go to edit those games, and just resubmit them, the issue will go away.

I just mistyped something at the end when I was adding the ties and I never really tested it will the ties. Sorry about that.

Share this post


Link to post
Share on other sites

If you want the fix before then, simply open up admin/applications_addon/other/pickems/modules_public/pickems/pickems.php

and on line 1718, change

$aid = $newgames[spread][$i];

to

$spread = $newgames[spread][$i];

Share this post


Link to post
Share on other sites

All seems to be working fine at the moment. Just two things.

First I think might be a bug, after I fill in all the games I find myself having to go back and editing them as the Application seems to make the first home team the home team for all of the games in that week. It also switches the ID number to the same order each time: 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10.

Apart from that glitch, everything is fantastic.

Would it be possible to switch the Home team to the left and the Away team to the right though?

Share this post


Link to post
Share on other sites

All seems to be working fine at the moment. Just two things.



First I think might be a bug, after I fill in all the games I find myself having to go back and editing them as the Application seems to make the first home team the home team for all of the games in that week. It also switches the ID number to the same order each time: 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10.



Apart from that glitch, everything is fantastic.



Would it be possible to switch the Home team to the left and the Away team to the right though?




Please overwrite your files with the ones in the 1.0.0b zip file that I just uploaded. That should make the issue go away.

If it doesn't, could you describe your problem in more detail? And yeah you can switch the sides.. replace everything in the template "game_row" with the following:


<!-- NEW ROW--><tr class='row1<if test="$data['open'] == 1"> unread</if>'>

<!--Time-->

<td class='normal' align="center">

{parse date="$data['deadline']" format="short" relative="false"}

</td>

<!--Result-->

<td class='normal' align="center">

<span class='ipsBadge ipsBadge_{$data['res']}'>

	 {$data['wsname']}

</span>

</td>

<!--Radio Button-->

<td class='normal' width='15px' align="center">

<INPUT TYPE=RADIO NAME="pick[{$data['gid']}]" VALUE="{$data['homeid']}" <if test="$data['open'] == '0'">disabled</if> <if test="$data['upick'] == $data['homeid']">checked</if>>

</td>

<!--Home Team-->

<td class='normal' align='right'>

<if test="$data['upick'] == $data['homeid']"><strong>{$data['hname']}</strong><else />{$data['hname']}</if>

<if test="$data['hurl'] !== '0' and $data['hurl'] !== ''">

&nbsp;&nbsp;<img src="{$data['hurl']}">

</if>

</td>

<if test="$data['pties'] == '1'">

<!--Ties-->

<td class='normal' align="center">

<INPUT TYPE=RADIO NAME="pick[{$data['gid']}]" VALUE="2147483647" <if test="$data['open'] == '0'">disabled</if> <if test="$data['upick'] == 2147483647">checked</if>>

</td>

</if>


<!--Visitor Team-->

<td class='normal'>

<if test="$data['aurl'] !== '0' and $data['aurl'] !== ''">

<img src="{$data['aurl']}">&nbsp;&nbsp;

</if>

<if test="$data['upick'] == $data['awayid']"><strong>{$data['aname']}</strong><else />{$data['aname']}</if>

</td>

<!--Radio Button-->

<td class='normal' width='15px' align="center">

<INPUT TYPE=RADIO NAME="pick[{$data['gid']}]" VALUE="{$data['awayid']}" <if test="$data['open'] == '0'">disabled</if> <if test="$data['upick'] == $data['awayid']">checked</if>>

</td>

<if test="$data['pspread'] == '1'">

<!--Spread-->

<td class='normal' align="center">

{$data['spread']}

</td>

</if>

<!--Trend-->

<td class='normal' align="center">

<if test="$data['pick_rows'] != ''">

<a href='#' id="picksLink_{$data['gid']}" onclick="picksPopup( {$data['gid']} );" />{$data['trend']}<if test="$data['tteam'] !== ''">% {$data['tteam']}</if></a>

<else />

{$data['trend']}<if test="$data['tteam'] !== ''">% {$data['tteam']}</if>

</if>

<if test="$data['pick_rows'] != ''">

<!-- Hidden Picks Popup Content (GID: {$data['gid']})-->

<div id='hidPicks_{$data['gid']}' style='display: none; height: 400px;'>

<h3>{$data['asname']} ({$data['ac']}) at {$data['hsname']} ({$data['hc']})</h3>


<div class="ipsbox_container">

<table class="ipsCalendar ipb_table vcalendar">


<tr class='header'>


	 <th scope='col' style='text-align:left'>Member</th>


	 <th scope='col' style='text-align:center' width='55px'>Pick</th>


</tr>

	 {$data['pick_rows']}


</table>


</div>

</div>

</if>

</td>

</tr>

and replace all of the "games" template with the following:


<script type="text/javascript">

function picksPopup( gid )

{

  new ipb.Popup( 'picks', {type: 'pane', stem: false, w: '215px', h: 400, initial: $('hidPicks_' + gid).innerHTML, hideAtStart: false } );

};

</script>

<div class='ipbfs_titlebox'>

<div class='ipsBox'>

    <h1 class='ipsType_pagetitle'>

  <h1 class="ipsType_pagetitle">{$data['wname']}</h1>

</h1>


<div class='desc lighter blend_links'>

  {$data['pname']}

</div>


</div>

</div>

<br/>

<if test="$data['admin'] == '1'">

<div class='clearfix'>

	  <ul class='topic_buttons'>

<li>

<a href='{$this->settings['base_url']}app=pickems&amp;do=edit_results&pid={$data['pid']}&wid={$data['wid']}'>Edit Results</a>

</li>

<li>

<a href='{$this->settings['base_url']}app=pickems&amp;do=edit_games&pid={$data['pid']}&wid={$data['wid']}'>Edit Games</a>

</li>

</ul>

</div>

</if>

<div class='maintitle ipsFilterbar ipsForm_left'>

<ul class='ipsList_inline'>

   <li><a href='{$this->settings['base_url']}app=pickems&amp;do=leaderboard&amp;pid={$data['pid']}&amp;wid={$data['wid']}'>Leaderboard</a></li>

  <li class='active'><a href='{$this->settings['base_url']}app=pickems&amp;do=games&amp;pid={$data['pid']}&amp;wid={$data['wid']}'>{$data['wname']}</a></li>

  <li>

   <a href="{$this->settings['base_url']}app=pickems&amp;do=week&amp;pid={$data['pid']}&amp;wid={$data['wid']}">All Weeks</a>

  </li>

  <li><a href='{$this->settings['base_url']}app=pickems'>All Pools</a></li>

</ul>

</div>

<div class='ipsBox'>

<form method='post' action='{$this->settings['base_url']}app=pickems&amp;do=add_picks&amp;pid={$data['pid']}&amp;wid={$data['wid']}' onsubmit="this.submitb.disabled=true">

<div class='ipsBox_container'>

  <table id='calendar_table' class='ipsCalendar ipb_table vcalendar' summary="Calendar for April 2012">

<if test="$data['game_rows'] !== """>

   <tr class='header'>


	 <th scope='col' style='text-align:center' width='100px'>Time (GMT {$data['tzo']})</th>


	 <th scope='col' style='text-align:center' width='50px'>Result</th>

	 <th scope='colgroup' style='text-align:left' colspan='2'>Home</th>

<if test="$data['pties'] == '1'">

	 <th scope='col' style='text-align:center' width='8px'>Tie</th>

</if>   

	 <th scope='colgroup' style='text-align:right' colspan='2'>Visitor</th>



<if test="$data['pspread'] == '1'">

	 <th scope='col' style='text-align:center' width='50px'>Spread</th> 

</if>

	 <th scope='col' style='text-align:center' width='100px'>Trend</th>


    </tr>

    {$data['game_rows']}

<else />

<tr><td align='center'><strong>Currently there have been no games entered.</strong></td></tr>

</if>

	  </table>

</div>

<br/>

<div style="text-align:right">

<if test="$data['ppick'] == '1'">

<input name='submitb' type='submit' value='Submit Picks' tabindex="0" class="input_submit" />

<else />

<input disabled="disabled" type='submit' value='You are not allowed to pick games.' tabindex="0" class="input_submit" />

</if>

</div>

</div>

<br/>

Share this post


Link to post
Share on other sites

I would also prefer the home team on the left side.
This could be a cultural thing, it's definitely more common to have the home team on the left side in Europe.

Rugger and SECTalk.com like this

Share this post


Link to post
Share on other sites

I would also prefer the home team on the left side.


This could be a cultural thing, it's definitely more common to have the home team on the left side in Europe.




For now, please use the template edits provided above. In a future version, I will add an option to switch team sides.

Also thanks to you both for being patient with me. it's my first application that I've released and I'm sure there will be quite a few more bugs. But hopefully once this is stable, we can start to add more features and things and hopefully create a few more sports-related apps since the IPS community seems to be lacking in that regard.

Share this post


Link to post
Share on other sites

But hopefully once this is stable, we can start to add more features and things and hopefully create a few more sports-related apps since the IPS community seems to be lacking in that regard.




You're right about the lack of sports-related apps around here. I run a sports-related board as well and this App would definitely fit right in with our members. I'll be following this topic and this Apps development into maturity. BTW I'm also for the home team on the left side as well. Thanks for taking the time to develop it. It's looking good so far. :thumbsup:
SECTalk.com likes this

Share this post


Link to post
Share on other sites

This looks very promising.
We will probably buy it for our football (in the USA called "soccer") bettings.

But we also prefer the home team on the left.

SECTalk.com likes this

Share this post


Link to post
Share on other sites

And yeah you can switch the sides.. replace everything in the template "game_row" with the following:




Sorry to sound dim, but where can I find this template?

Again, thanks for a fantastic application.
SECTalk.com likes this

Share this post


Link to post
Share on other sites

Nevermind, found it. Works perfectly :smile:

A member did raise a question though, is it possible to rename the Application when it comes up on our public forum? As in instead of 'Pick Em's' we'd like it to say 'Prediction League'. Is that possible?

SECTalk.com likes this

Share this post


Link to post
Share on other sites

Thanks for all the positive comments guys. For the record, I'll go ahead and have the home team on the left as a default since I'm (currently) the only user who wants it on the right.

And as far as renaming "Pick 'Ems" to "Prediction League," yes that will be fully supported in the next release as I plan to add full language support, so you'll be able to edit a language string and have that update everywhere it says Prediction League.

Thanks again for the support and I hope this can benefit many of our sites.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.