1. This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.
Dismiss Notice
We have just posted about our product policy for XF2.
Click HERE to view it.

Support Bracket/Tournament List colour problems.

Discussion in 'Tournament' started by Hecter, Aug 4, 2018.

  1. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    Well I've been doing it manual then, how can I fix this? Do you have an old version?
     
  2. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
  3. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    Hello,

    I just tested a fresh install of a 2.7.0.
    As you can see from the screenshots, it's all ok for me.

    As you seemed more or less in a testing phase, I recommend you to uninstall then clear your browser cache and install again.

    Clément
     

    Attached Files:

  4. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    Used a completely different browser, cleared the xenforo cache, cleared everything from the browser. I've tried now redownloading the tournament files, tried deleting everything out and putting it back, and I have uninstalled and reinstalled 5 times in total now.
    Issue still remains: https://fifaesport.net/forum/tournaments/test.1/
     
  5. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    Can you give my testaccount rights to create a tournament and add users ?
    I would like to give it a try.

    An admin account would be even better but I can understand if you don't want to give that to me.
     
  6. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    Oh wait, I see while inspecting network activity that you have a "script.js" file loaded that contains an old version of jquery bracket.
    It's conflicting with my modified version.

    That's most certainly the problem.

    Do you know where that comes from ?
     
  7. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    Yes, I have two files called script both of which I removed, and the problem still persists.
     
  8. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    Here are both the files, but as I said I have deleted them now.

    Code:
    /*!
     * jQuery Cookie Plugin v1.4.1
     * https://github.com/carhartl/jquery-cookie
     *
     * Copyright 2006, 2014 Klaus Hartl
     * Released under the MIT license
     */
    (function (factory) {
        if (typeof define === 'function' && define.amd) {
            // AMD
            define(['jquery'], factory);
        } else if (typeof exports === 'object') {
            // CommonJS
            factory(require('jquery'));
        } else {
            // Browser globals
            factory(jQuery);
        }
    }(function ($) {
    
        var pluses = /\+/g;
    
        function encode(s) {
            return config.raw ? s : encodeURIComponent(s);
        }
    
        function decode(s) {
            return config.raw ? s : decodeURIComponent(s);
        }
    
        function stringifyCookieValue(value) {
            return encode(config.json ? JSON.stringify(value) : String(value));
        }
    
        function parseCookieValue(s) {
            if (s.indexOf('"') === 0) {
                // This is a quoted cookie as according to RFC2068, unescape...
                s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
            }
    
            try {
                // Replace server-side written pluses with spaces.
                // If we can't decode the cookie, ignore it, it's unusable.
                // If we can't parse the cookie, ignore it, it's unusable.
                s = decodeURIComponent(s.replace(pluses, ' '));
                return config.json ? JSON.parse(s) : s;
            } catch(e) {}
        }
    
        function read(s, converter) {
            var value = config.raw ? s : parseCookieValue(s);
            return $.isFunction(converter) ? converter(value) : value;
        }
    
        var config = $.cookie = function (key, value, options) {
    
            // Write
    
            if (arguments.length > 1 && !$.isFunction(value)) {
                options = $.extend({}, config.defaults, options);
    
                if (typeof options.expires === 'number') {
                    var days = options.expires, t = options.expires = new Date();
                    t.setTime(+t + days * 864e+5);
                }
    
                return (document.cookie = [
                    encode(key), '=', stringifyCookieValue(value),
                    options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
                    options.path    ? '; path=' + options.path : '',
                    options.domain  ? '; domain=' + options.domain : '',
                    options.secure  ? '; secure' : ''
                ].join(''));
            }
    
            // Read
    
            var result = key ? undefined : {};
    
            // To prevent the for loop in the first place assign an empty array
            // in case there are no cookies at all. Also prevents odd result when
            // calling $.cookie().
            var cookies = document.cookie ? document.cookie.split('; ') : [];
    
            for (var i = 0, l = cookies.length; i < l; i++) {
                var parts = cookies[i].split('=');
                var name = decode(parts.shift());
                var cookie = parts.join('=');
    
                if (key && key === name) {
                    // If second argument (value) is a function it's a converter...
                    result = read(cookie, value);
                    break;
                }
    
                // Prevent storing a cookie that we couldn't decode.
                if (!key && (cookie = read(cookie)) !== undefined) {
                    result[name] = cookie;
                }
            }
    
            return result;
        };
    
        config.defaults = {};
    
        $.removeCookie = function (key, options) {
            if ($.cookie(key) === undefined) {
                return false;
            }
    
            // Must not alter options, thus extending a fresh object...
            $.cookie(key, '', $.extend({}, options, { expires: -1 }));
            return !$.cookie(key);
        };
    
    }));
    
    $(document).on("ready", function(){
        $('#console_select').on("change",function(){
            // store console cookie, refresh
            $.cookie("console", $('#console_select').val(), { path: '/', expires: 365 });
    
            window.location = window.location.href;
        });
      
      
        $('#filterPlayerStats').on("click",function(e){
            e.preventDefault();
            
            window.location = '/rivals/stats/?pos=' + $(this).data('pos').toLowerCase() + '&page=1&order=' + $('#ordersort').val() + '&orderby=' + $('#orderby').val();
        });
      
        $('.pageNavStats').on("click",function(e){
            e.preventDefault();
            window.location = '/rivals/stats/?pos=' + $(this).data('pos').toLowerCase() + '&page=' + $(this).data('page') + '&order=' + $('#ordersort').val() + '&orderby=' + $('#orderby').val();
        });
    
        $('.ratingdonut').each(function(i, elem){
            new Chart(document.getElementById($(elem).attr('id')).getContext("2d")).Doughnut([{value: ($(elem).data('rating')),color:'#1c89bb',highlight: "#FF5A5E"},{value: 100-($(elem).data('rating')),color:"#CCC"}], {responsive : false, showTooltips: false});
        });
        
        $('.wlddonut').each(function(i, elem){
            new Chart(document.getElementById($(elem).attr('id')).getContext("2d")).Doughnut([{value: ($(elem).data('win')),color:'#1f8abb',highlight: "#1f8abb", label: "Win"},{value: $(elem).data('draw'),color:"#CCC", label: 'Draw'}, {value: $(elem).data('lost'),color:"#ff5a5e", label: 'Lose'}], {responsive : false, showTooltips: true});
        });
      
        $('.positionSpider').each(function(i, elem){
        
            var data = {
                labels: ["Goalkeeper", "Defence", "Midfield", "Attack", "Any"],
                datasets: [
                    {
                        label: "My First dataset",
                        fillColor: "rgba(28, 137, 187,0.2)",
                        strokeColor: "rgba(28, 137, 187,1)",
                        pointColor: "rgba(28, 137, 187,1)",
                        pointStrokeColor: "#fff",
                        pointHighlightFill: "#fff",
                        pointHighlightStroke: "rgba(220,220,220,1)",
                        data: [$(elem).data('gk'),$(elem).data('def'),$(elem).data('mid'),$(elem).data('atk'),$(elem).data('any')]
                    }
                ]
            };   
            var options = {
                scaleBeginAtZero: false,
                pointLabelFontFamily : "'Roboto'",
                pointLabelFontStyle : "bold",
            }
            var myRadarChart = new Chart(document.getElementById($(elem).attr('id')).getContext("2d")).Radar(data, options);       
        });
    });
    
     
  9. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    I can't post the other which I suspect where the problem might have began but at the moment both of these have been removed from my server, can you tell me if the above conflicts with your .js file as I need to use the above.
     
  10. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
  11. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    No they are displaying now.
    Though they now need some css tweaking.

    For the team name color, try changing it using following css id:
    div.jQBracket .teamContainer a.username

    Don't forget to use !important, it might be needed.
     

    Attached Files:

  12. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    Ok I have it showing but the brackets are a complete mess. When I turn off the offending addon, when I turn it on the bracket looks absolutely fine but the names are not appearing.

    Is it possible we could chat on skype or something to get this fixed as this is taking way longer than I would like, plus I can send you the file with the offending code and you can tell me which part is conflicting which will hopefully solve the issue instantly.
     
    #32 Hecter, Aug 9, 2018 at 11:20 PM
    Last edited: Aug 9, 2018 at 11:58 PM
  13. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    What complete mess ? The bracket you shown looked mostly fine.

    It's taking longer due to the offending add-on, which is not our fault.
    We don't provide free support per skype, I am sorry.

    Regarding the offending add-on, as I was telling in one of my previous message it's including the jquery-bracket javascript that we also use in our add-on but it's an old version. Ours is more recent and we also did some custom modification to it.

    Clément
     
  14. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    I think you're misunderstanding me, the addons are turned off and the bracket is still a complete shambles, I would say thats your issue and not mine as all I have done is change the background colour of the bracket and the round robin tables, even on a fresh install its not working correctly.
     
  15. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
  16. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    First I would recommend you to decrease the font size as it's quite right now IMO.

    The width of the box can't be changed unfortunately, we are using the default css from jquery-bracket third party script and it has some fixed size elements. But I think this sizes could be edited, tried quickly in a DOM inspector and that seems achievable.

    You would need to edit the width of the following classes:
    • div.jQBracket .team div.label: that's the width of the team name container
    • div.jQBracket .team: that's the team row width, ie. the width of the container above + 30px (scores)
    • div.jQBracket .round: that's the whole round size, same width that the team container

    Edit the css for the following class: .tournamentListItem .tournamentImage, .tournamentListItem .tournamentStats

    Strange that it looks like that though, this is picked from default color that are used for example in the resource manager.
     
  17. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    Bottom part worked perfect but I cannot change the width of the brackets, the default is 70px, 100x and 100px I tried to increase to 100px, 130px and 130px but nothing changed at all.
     
  18. MtoR

    MtoR Freaky Coder
    Staff Member

    Joined:
    Nov 14, 2015
    Messages:
    4,211
    Likes Received:
    639
    You edit the css template of the add-on ?
    If not, you used !important ?
     
  19. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5
    I just edited what already existed.

    div.jQBracket .round {
    position: relative;
    width: 150px;
    margin-right: 40px;
    float: left;
    }


    div.jQBracket .team {
    position: relative;
    z-index: 1;
    float: left;
    background-color: #EEE;
    width: 150px;
    cursor: default;
    }


    div.jQBracket .team div.label {
    padding: 3px;
    position: absolute;
    width: 120px;
    height: 22px;
    white-space: nowrap;
    overflow: hidden;
    background-color: #363940;
    }

    What exactly am I changing these values to as I assumed it was just the width value I was to change?
     
  20. Hecter

    Hecter Member

    Joined:
    Jan 16, 2016
    Messages:
    83
    Likes Received:
    5

Share This Page

  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.
    Dismiss Notice