nicholasmr / obblm

Automatically exported from code.google.com/p/obblm
26 stars 54 forks source link

LRB5 & LRB6 simultaneously in same install. #124

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I thought I'd post this as it was brought up in another thread.

Does this sound right:

The settings ruleset could be changed to allow LRB5, LRB6, or Both.

Database: Add an LRB column to the teams and leagues tables.

If settings allow, during team creation ask the user which LRB he would 
like to create the team with.  Possibly having the choice while clicking 
on the create new team link.

When creating a league, you specify the ruleset.

When creating a tour and matches, only show teams that are valid for that 
ruleset.

Depending on the timeframe you'd want to do this, if you like my logic, 
would you want to give me a shot at this?

Original issue reported on code.google.com by funnyfin...@hotmail.com on 8 Jun 2009 at 2:22

GoogleCodeExporter commented 9 years ago
This is _very_ very_ tricky, and I would suggest this idea be abandoned unless 
you
want to fork obblm in your own direction ;-).
For this to work properly it should have been a design consideration back when 
obblm
was first written, which it was not.
The thing is, that the ruleset is globally loaded and not on demand when 
ruleset data
is needed.
To spell it out in short, you'd have to write an endless amount of conditional
codelines and separate all the arrays (whenever generated) of teams, players and
stars types in order to prevent tricking horribly many php errors when running 
the
respective class constructor methods. 
I just don't see how this can be done properly without redesigning obblm, which 
won't
happen any time soon.

Original comment by Nimda...@gmail.com on 8 Jun 2009 at 5:47

GoogleCodeExporter commented 9 years ago
I am looking through the code and understand what you mean.  Just throwing some 
more 
stuff out there to see what you think.

Would you be able to have everything in the site be LRB5 and then when an LRB6 
team 
is made you would run the LRB6 array additions.  I think that would then make 
your 
next action on the site LRB6, so at the end of creation you could re-do the 
LRB5 
ruleset?  Does that make sense?  Problem of course would be if they left the 
page 
before creation they may not trigger trigger the step back, but you could have 
a "Are you sure you want to leave this page?" msgbox that could trigger it as 
well.  

I think this scenario partially helps with all of the conditional stuff you may 
otherwise run into.

Original comment by funnyfin...@hotmail.com on 9 Jun 2009 at 1:39

GoogleCodeExporter commented 9 years ago
But that does not take into account the many places on the site, where all team,
player and race objects are created at the same time in order to generate 
all-time
standings lists - here it is not possible to do what you propose.

Original comment by Nimda...@gmail.com on 9 Jun 2009 at 9:51

GoogleCodeExporter commented 9 years ago
Ah right since it lists the players stats based on defaults.

Would it be feasible to have the both globals $DEA[LRB5] and $DEA[LRB6] and you 
grab 
the appropriate ruleset from the teams table so you call it like 
$DEA[$teamlrb].  
Understanding that this would add more overhead, but would only have to add the 
overhead if the admin allowed both anyway.  The on the fly choice could take 
away 
need for some of the conditionals.

Not suggesting that you change it, but if I could better understand I could try 
it 
out just to enhance my knowledge of PHP and such.

Original comment by funnyfin...@hotmail.com on 9 Jun 2009 at 1:51

GoogleCodeExporter commented 9 years ago
Yes, that would do the trick, I guess. 
I would like, though, that we hold back on this idea until the other 
(undergoing)
major changes in obblm are finished, and then at that time discuses it further. 

Original comment by Nimda...@gmail.com on 9 Jun 2009 at 4:29

GoogleCodeExporter commented 9 years ago
I'm sorry, again, William, it may seem that I keep fighting against your ideas 
:-),
but I have decided it is most wise for now not changing obblm to support 
concurrent
rule sets. It's just to big of a deal at the moment.

Original comment by Nimda...@gmail.com on 15 Jul 2009 at 8:45

GoogleCodeExporter commented 9 years ago
Ah no worries!  You are the man.  I am but a peon:)

I think/know you are completely right on this anyway.

Original comment by funnyfin...@hotmail.com on 15 Jul 2009 at 8:59