[ABD] Sportsbook - Ultimate Soccer

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 6:35 pm

cm_ wrote:Hey,

thanks for your answer. There is no special reason to get rid of the deduction system
but I would like to have the possibility to turn it off. So you have an idea what to do
to turn it off? It would be enough to tell me in which file I have to look for the code,
I was trying to find the file today but didn't find anything that would help.

Thanks
Sure, but unfortunately you will have to apply this hack after any update in the future:

[OPEN]
includes/sportsbook/acp/general_config.php

[FIND]

Code: Select all

for ($i = 10; $i < 110; $i = ($i +10))
{
  $options['prediction_calc_limit'][$i] = array(
    'selected'  =>  ($sportsbook->config['prediction_calc_limit'] == $i) ? true : false,
    'value'     =>  $i
  );
}
[AFTER, ADD]

Code: Select all

/* Allow zero incorrect result */
$options['prediction_incorrect_result'][0] = array(
  'selected'  =>  ($sportsbook->config['prediction_incorrect_result'] == 0) ? true : false,
  'value'     =>  0
);
** The following file edit is a bug update, and will be fixed in the next release **

[OPEN]
includes/sportsbook/sportsbook_admin

[FIND]

Code: Select all

  function update_config($params)
  {
    global $db, $cache;
[AFTER, ADD]

Code: Select all

    
    //
    // Do we need a leaderboard update?
    //
    if ($params['prediction_correct_score'] != $this->config['prediction_correct_score'] || $params['prediction_correct_result'] != $this->config['prediction_correct_result'] || $params['prediction_incorrect_result'] != $this->config['prediction_incorrect_result'])
    {
      $this->recalc_leaderboard();
    }
[FIND]

Code: Select all

    //$cache->destroy('sql', SPORTSBOOK_CONFIG_TABLE);
    //
    // Do we need a leaderboard update?
    //
    if ($params['prediction_correct_score'] != $this->config['prediction_correct_score'] || $params['prediction_correct_result'] != $this->config['prediction_correct_result'] || $params['prediction_incorrect_result'] != $this->config['prediction_incorrect_result'])
    {
      $this->recalc_leaderboard();
    }
[REPLACE WITH]

Code: Select all

    //$cache->destroy('sql', SPORTSBOOK_CONFIG_TABLE);
    //
    // Do we need a leaderboard update?
    //
    /*if ($params['prediction_correct_score'] != $this->config['prediction_correct_score'] || $params['prediction_correct_result'] != $this->config['prediction_correct_result'] || $params['prediction_incorrect_result'] != $this->config['prediction_incorrect_result'])
    {
      $this->recalc_leaderboard();
    }*/
Let me know if that works.

$

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 6:40 pm

Link05 wrote:When I am going to create a league the next mistake appears:

Code: Select all

SQL ERROR [ mysql4 ]

Field 'league_id' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_sportsbook_leagues (league_name) VALUES ('123')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: includes/sportsbook/acp/leagues.php
LINE: 40
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_sportsbook.php
LINE: 67
CALL: include('includes/sportsbook/acp/leagues.php')

FILE: includes/functions_module.php
LINE: 507
CALL: acp_sportsbook->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
League id's shouldn't have a default value as the id auto-increments.

Which database type are you using, and which Sportsbook version do you have installed? Finally was this a clean install or update from previous version?

Thanks
$

Link05
Registered User
Posts: 56
Joined: Thu Feb 12, 2009 5:40 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by Link05 » Sun Aug 07, 2011 6:56 pm

$tring wrote:
Link05 wrote:When I am going to create a league the next mistake appears:

Code: Select all

SQL ERROR [ mysql4 ]

Field 'league_id' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_sportsbook_leagues (league_name) VALUES ('123')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: includes/sportsbook/acp/leagues.php
LINE: 40
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_sportsbook.php
LINE: 67
CALL: include('includes/sportsbook/acp/leagues.php')

FILE: includes/functions_module.php
LINE: 507
CALL: acp_sportsbook->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
League id's shouldn't have a default value as the id auto-increments.

Which database type are you using, and which Sportsbook version do you have installed? Finally was this a clean install or update from previous version?

Thanks
$
I was using it " sportsbook lite 0_0_2dev "
I withdrew it completely and installed version finalizes it

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 7:01 pm

Link05 wrote:
$tring wrote:
Link05 wrote:When I am going to create a league the next mistake appears:

Code: Select all

SQL ERROR [ mysql4 ]

Field 'league_id' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_sportsbook_leagues (league_name) VALUES ('123')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: includes/sportsbook/acp/leagues.php
LINE: 40
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_sportsbook.php
LINE: 67
CALL: include('includes/sportsbook/acp/leagues.php')

FILE: includes/functions_module.php
LINE: 507
CALL: acp_sportsbook->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
League id's shouldn't have a default value as the id auto-increments.

Which database type are you using, and which Sportsbook version do you have installed? Finally was this a clean install or update from previous version?

Thanks
$
I was using it " sportsbook lite 0_0_2dev "
I withdrew it completely and installed version finalizes it
Hi,

Are you saying this is now resolved?

You may wish to investigate this further as you may have further problems with your database due to your host updating your Database version:

Please read the following article from the knowledge base...

http://www.phpbb.com/kb/article/doesnt- ... ue-errors/

Link05
Registered User
Posts: 56
Joined: Thu Feb 12, 2009 5:40 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by Link05 » Sun Aug 07, 2011 7:10 pm

$tring wrote:
Link05 wrote:
$tring wrote:
Link05 wrote:When I am going to create a league the next mistake appears:

Code: Select all

SQL ERROR [ mysql4 ]

Field 'league_id' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_sportsbook_leagues (league_name) VALUES ('123')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 175
CALL: dbal->sql_error()

FILE: includes/sportsbook/acp/leagues.php
LINE: 40
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_sportsbook.php
LINE: 67
CALL: include('includes/sportsbook/acp/leagues.php')

FILE: includes/functions_module.php
LINE: 507
CALL: acp_sportsbook->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
League id's shouldn't have a default value as the id auto-increments.

Which database type are you using, and which Sportsbook version do you have installed? Finally was this a clean install or update from previous version?

Thanks
$
I was using it " sportsbook lite 0_0_2dev "
I withdrew it completely and installed version finalizes it
Hi,

Are you saying this is now resolved?

You may wish to investigate this further as you may have further problems with your database due to your host updating your Database version:

Please read the following article from the knowledge base...

http://www.phpbb.com/kb/article/doesnt- ... ue-errors/
It was not resolved, the problem continues the same thing = (
I was using to 0.0.2, then I deleted it completely and installed to 0.2.3
Does it understand?

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 7:16 pm

Link05 wrote: It was not resolved, the problem continues the same thing = (
I was using to 0.0.2, then I deleted it completely and installed to 0.2.3
Does it understand?
I do not think this is a problem with Sportsbook, I think it is a problem caused by your host updating your database version.

Are you able to post in your forum without any errors? Could you please PM a link to your forum?

Thanks
$

Link05
Registered User
Posts: 56
Joined: Thu Feb 12, 2009 5:40 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by Link05 » Sun Aug 07, 2011 7:22 pm

$tring wrote:
Link05 wrote: It was not resolved, the problem continues the same thing = (
I was using to 0.0.2, then I deleted it completely and installed to 0.2.3
Does it understand?
I do not think this is a problem with Sportsbook, I think it is a problem caused by your host updating your database version.

Are you able to post in your forum without any errors? Could you please PM a link to your forum?

Thanks
$
I manage to do everything in the Forum without mistake none.
It follows PM the link of my forum

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 7:36 pm

Link05 wrote:
$tring wrote:
Link05 wrote: It was not resolved, the problem continues the same thing = (
I was using to 0.0.2, then I deleted it completely and installed to 0.2.3
Does it understand?
I do not think this is a problem with Sportsbook, I think it is a problem caused by your host updating your database version.

Are you able to post in your forum without any errors? Could you please PM a link to your forum?

Thanks
$
I manage to do everything in the Forum without mistake none.
It follows PM the link of my forum
Could you run this SQL query on your database please:

Code: Select all

ALTER TABLE  `phpbb_sportsbook_leagues` CHANGE  `league_id`  `league_id` MEDIUMINT( 8 ) NOT NULL DEFAULT NULL AUTO_INCREMENT

martinec
Registered User
Posts: 21
Joined: Sun Aug 07, 2011 7:13 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by martinec » Sun Aug 07, 2011 7:41 pm

Hi $tring,

Thank you for this mod, it is really useful.

I have some remarks in order to make it perfect :

- Would it be possible to have the full leaderboard (not only the top XX users) ?
- Would it be possible to have for a given match the details of predictions, i.e. number of users who predicted its result, details of predictions, sorted by good score, good result and wrong prediction ?
- When adding a fixture, if I make a mistake when selecting a team, I can't modify it, and I have to restart from beginning.

Thanks for your work.

Martin

Link05
Registered User
Posts: 56
Joined: Thu Feb 12, 2009 5:40 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by Link05 » Sun Aug 07, 2011 7:43 pm

$tring wrote:
Link05 wrote:
$tring wrote:
Link05 wrote: It was not resolved, the problem continues the same thing = (
I was using to 0.0.2, then I deleted it completely and installed to 0.2.3
Does it understand?
I do not think this is a problem with Sportsbook, I think it is a problem caused by your host updating your database version.

Are you able to post in your forum without any errors? Could you please PM a link to your forum?

Thanks
$
I manage to do everything in the Forum without mistake none.
It follows PM the link of my forum
Could you run this SQL query on your database please:

Code: Select all

ALTER TABLE  `phpbb_sportsbook_leagues` CHANGE  `league_id`  `league_id` MEDIUMINT( 8 ) NOT NULL DEFAULT NULL AUTO_INCREMENT

Solved!
Thanks!!

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 7:46 pm

Link05 wrote: Solved!
Thanks!!
Please try to create teams and make new fixtures. Post back and let me know, because you may need to run some additional queries.

Thanks
$

cm_
Registered User
Posts: 21
Joined: Mon Apr 18, 2011 2:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by cm_ » Sun Aug 07, 2011 8:18 pm

$tring wrote: Sure, but unfortunately you will have to apply this hack after any update in the future:

[OPEN]
includes/sportsbook/acp/general_config.php

[FIND]

Code: Select all

for ($i = 10; $i < 110; $i = ($i +10))
{
  $options['prediction_calc_limit'][$i] = array(
    'selected'  =>  ($sportsbook->config['prediction_calc_limit'] == $i) ? true : false,
    'value'     =>  $i
  );
}
[AFTER, ADD]

Code: Select all

/* Allow zero incorrect result */
$options['prediction_incorrect_result'][0] = array(
  'selected'  =>  ($sportsbook->config['prediction_incorrect_result'] == 0) ? true : false,
  'value'     =>  0
);
$
Thanks $tring, worked perfect.

I just remembered one more thing, is there a possibility to delete leagues?
Didn't find a button or something like that to do this

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 8:25 pm

cm_ wrote: Thanks $tring, worked perfect.

I just remembered one more thing, is there a possibility to delete leagues?
Didn't find a button or something like that to do this
If the league contains no teams, then you will see a red x image on the entry League Configuration screen.

If the league does contain teams, then click on the league to edit. From the "Select form" dropdown box, select "Delete entirely".

Thanks
$

User avatar
$tring
Registered User
Posts: 233
Joined: Thu Mar 31, 2011 11:30 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by $tring » Sun Aug 07, 2011 8:55 pm

martinec wrote:Hi $tring,

Thank you for this mod, it is really useful.

I have some remarks in order to make it perfect :

- Would it be possible to have the full leaderboard (not only the top XX users) ?
- Would it be possible to have for a given match the details of predictions, i.e. number of users who predicted its result, details of predictions, sorted by good score, good result and wrong prediction ?
- When adding a fixture, if I make a mistake when selecting a team, I can't modify it, and I have to restart from beginning.

Thanks for your work.

Martin
Hi Martin,

It would be possible to have the full leaderboard, but I feel it must have limits because we may have hundreds of users playing the game over a season, and this would create a problem. I have allowed to view any users predictions, and I can't see a workaround for this?

The match details you speak of are in the future plans for sure.

Yes, the form reset is a bit of a pain. I need to review this routine at some point.

Thank you for your comments, and sorry for the late reply.

$

Link05
Registered User
Posts: 56
Joined: Thu Feb 12, 2009 5:40 pm

Re: [BETA] phpBB Sportsbook Lite (sports prediction system)

Post by Link05 » Sun Aug 07, 2011 9:14 pm

$tring wrote:
Link05 wrote: Solved!
Thanks!!
Please try to create teams and make new fixtures. Post back and let me know, because you may need to run some additional queries.

Thanks
$
Yes, I created the teams and games too!
Thank you!

Locked

Return to “[3.0.x] Abandoned MODs”