1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Tennis

Discussion in 'Pickem Support' started by anthony parsons, Mar 11, 2013.

  1. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    Ok Bob, based on prior discussion, I'm going to take a further look at this for use with tennis versus team based sports.

    I think I can manage most aspects of modification myself, though I will need to pick your brain at times, and will obviously need help if adapting this to suit doubles.
     
  2. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    How do I adjust the field 'Team Abbreviation' in the team management, so that it isn't limited to 5 characters, and instead uses the same character count as the nickname field?

    I understand this gets used in the sidebar block, though I will adjust that so that this abbreviation uses the players last name, something like a max of 10 characters instead of 5, should do it, without shortening the bar column too far.
     
  3. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    How do I get team management to sort alphabetically? Hundreds of players available, which need to be sorted alphabetically as listed to find them as required.
     
  4. Bob

    Bob Developer Staff Member

    The Field in the xf_nflj_pickem_team is a varchar(5), so you'd need to edit the field and increase it to what ever size you need. Once that is done, you will need to edit the DataWriter for that table which is library/NFLJ/Pickem/DataWriter/Team.php and change the max length on line 20 from 5 to the same or lesser value as the one you set for the field. The input field on the create/edit form isn't "limited" so you won't have to make an adjustment there. I just added a change to the field size on the installer to change it from 5 to 25 on the next update, but will be keeping the DataWriter to 5, so you will have to apply the change to the DataWriter as I want the CORE addon to throw an error if more than 5 characters are added (because of the core layout). Hope thats OK with you?
     
    anthony parsons likes this.
  5. Bob

    Bob Developer Staff Member

    you need to modify the getTeamsBySport method in the team Model (/library/NFLJ/Pickem/Model/Team.php

    currently the ORDER BY is by team_abbr (Team Abbreviation). You can change it to team_id, team_city or team_nick. If I was doing a "player" type thing.. I'd put the players first name in City and Last name in nick and then sort by team_nick

    PHP:
        public function getTeamsBySport($sportId)
        {
            return 
    $this->_getDb()->fetchAll('
                SELECT teams.*,
                    sport.*
                FROM xf_nflj_pickem_team as teams
                    LEFT JOIN xf_nflj_pickem_sport AS sport
                        ON (sport.sport_id = teams.sport_id)           
                WHERE teams.sport_id = ? 
                ORDER BY team_abbr ASC
            '
    $sportId);                   
        }    
     
  6. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    How do I edit ACP templates Bob? Something I haven't learnt yet. Are they in the DB only?
     
  7. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    Disregard... found in DB.
     
  8. Bob

    Bob Developer Staff Member

    To edit Admin Templates, you need to put your forum in debug mode and its an option in the Development Tab. You edit them just like regular templates, cept there are a lot of different xen syntax for admin templates.
     
    anthony parsons likes this.
  9. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    So far... so good.

    Screen Shot 2013-03-12 at 6.06.54 PM.png
     
  10. Bob

    Bob Developer Staff Member

    Nice :)
     
    anthony parsons likes this.
  11. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    Works well with the sidebar, and as responsive styling... you may have changed my mind on Pickem Bob. I've followed your instructions, and well... 50 games live took me about 10 minutes to achieve. Pretty happy with that.

    Screen Shot 2013-03-13 at 11.44.11 AM.png

    Screen Shot 2013-03-13 at 12.41.07 PM.png
     
  12. Bob

    Bob Developer Staff Member

    Nice!! That is looking good :D
     
  13. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    How do I change the alert text, to remove the "week" from it? I just want it to start with the pool week.

    Screen Shot 2013-03-13 at 5.07.36 PM.png
     
  14. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    How do I get the pickem block in the forum home sidebar?
     
  15. Bob

    Bob Developer Staff Member

    I haven't Phrased those yet, cause I am not done with the entire alerts system yet, so you will need to edit the two templates

    alert_pickem_reminders_reminder1
    alert_pickem_reminders_reminder2

    This is what both templates look like. Just remove the word Week :)

    HTML:
    <b>1st Reminder</b>:
    <a href="{xen:link pickem-picks, $content}" class="PopupItemLink">Week {$content.week_name}</a> of the {$content.pool_name} Pool closes in {$content.timeremaining} Hours. 
    HTML:
    <b>2nd Reminder</b>:
    <a href="{xen:link pickem-picks, $content}" class="PopupItemLink">Week {$content.week_name}</a> of the {$content.pool_name} Pool closes in {$content.timeremaining} Hours.
     
    anthony parsons likes this.
  16. anthony parsons

    anthony parsons Member Showcase Sportsbook Pickem

    Done... is the sidebar block a larger issue I take it?
     
  17. Bob

    Bob Developer Staff Member

    Sorry, didn't see the other post.... there are no sidebar blocks for the forum home page. Someone paid me to build [bd] widget framework blocks and then someone else paid me to build XenPorta Blocks. They both then donated them back for everyone to use. That is the only reason those are available. You'll need to add a request for what you want (if you want them the same as others that I've done, just tell me which one(s)).
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.