1. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to 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.

Fixed User Avatars not showing on sportsbook-bookiecp route

Discussion in 'Sportsbook Resolved Bug Reports' started by SneakyDave, Feb 7, 2013.

Thread Status:
Not open for further replies.
  1. SneakyDave

    SneakyDave Member Sportsbook

    User avatars are shown throughout sportsbook, but for some reason, on the "Bookie Control Panel", when it lists "My Events", the avatar isn't displayed.

    It appears that the IMG tag for the avatar is actually the URL to the member's profile, rather than the actual avatar image URL.
     
  2. Bob

    Bob Developer Staff Member

    Im actually thinking about removing the images (category and avatar) within the BookieCP as you know who you are, so there is no need to see your avatar for each item, and the Cat Prefix is good enough for a quick visual of the cat the item belongs too. Will make that area more efficient as its not a "visual" area for public presentation, but a work area for management.

    I'll check later to see why your avy isn't showing up. Its supposed to if there is no category image.
     
  3. SneakyDave

    SneakyDave Member Sportsbook

    oh, I see, its supposed to be a category image. The img tag is pointing to /styles/xenforo/avatars/avatar_s.png
     
  4. Bob

    Bob Developer Staff Member

    no worries, I am removing them anyway. The Data needed for the Avy's is no longer exposed, so if you don't have a category logo, the default No Avy image should be displayed.

    If you want the Avy's, you will need to modify the bookie Model and add user.avatar_date, user.avatar_width, user.avatar_height, user.gravatar to 2 methods (getBookieEvents and getBookieEventsByStatus) as they are only pulling user.username

    EXAMPLE....

    change this...

    PHP:
        public function getBookieEvents(array $fetchOptions)
        {
            
    $userId XenForo_Visitor::getUserId();
            
    $limitOptions $this->prepareLimitFetchOptions($fetchOptions);
           
            return 
    $this->_getDb()->fetchAll($this->limitQueryResults('
                SELECT event.*,
                    cat.*,
                    status.*,
                    user.username
                FROM xf_nflj_sportsbook_event AS event
                    LEFT JOIN xf_user AS user
                        ON (user.user_id = event.user_id)
                    LEFT JOIN xf_nflj_sportsbook_category AS cat
                        ON (cat.category_id = event.category_id)
                    LEFT JOIN xf_nflj_sportsbook_status AS status
                        ON (status.status_id = event.status_id)                                   
                WHERE event.user_id = ' 
    $this->_getDb()->quote($userId) . '
                ORDER BY event.event_id DESC
                '
    $limitOptions['limit'], $limitOptions['offset']
            ));
        }





    to this..

    PHP:
        public function getBookieEvents(array $fetchOptions)
        {
            
    $userId XenForo_Visitor::getUserId();
            
    $limitOptions $this->prepareLimitFetchOptions($fetchOptions);
           
            return 
    $this->_getDb()->fetchAll($this->limitQueryResults('
                SELECT event.*,
                    cat.*,
                    status.*,
                    user.username, user.avatar_date, user.avatar_width, user.avatar_height, user.gravatar
                FROM xf_nflj_sportsbook_event AS event
                    LEFT JOIN xf_user AS user
                        ON (user.user_id = event.user_id)
                    LEFT JOIN xf_nflj_sportsbook_category AS cat
                        ON (cat.category_id = event.category_id)
                    LEFT JOIN xf_nflj_sportsbook_status AS status
                        ON (status.status_id = event.status_id)                                   
                WHERE event.user_id = ' 
    $this->_getDb()->quote($userId) . '
                ORDER BY event.event_id DESC
                '
    $limitOptions['limit'], $limitOptions['offset']
            ));
        }
     
  5. Bob

    Bob Developer Staff Member

    I marked this as partial fix because I added back in the ability for them to display, however, the Bookie CP will be changed in future versions and won't be displaying the bookies avatar for each item as its a complete waste of resources.
     
Thread Status:
Not open for further replies.
  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.