XF 1.5 Widgets and external data.

OldCoals

Active member
I would like to add a widget or the equivalent to the side bar that uses some json code.

The code in question is a football team selector/player rating tool (not sure if i am allowed to link to the website).

Is there a widget available that can do this?
 
Thanks for your reply.

This is a sample of the code.


Code:
<html>
<head>
    <title>Your Website Title</title>
</head>
<body>

    <!-- Load jQuery -->
    <script src="//code.jquery.com/jquery-2.1.4.min.js"></script>

    <!-- Load Stats FC Player Rater SDK -->
    <script>
        (function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = '//api.statsfc.com/widget/player-rater-1.0.js';
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'statsfc-player-rater-js'));
    </script>

    <!-- Your player rater here -->
    <div class="statsfc-player-rater"
        data-key="YOUR STATSFC KEY"
        data-team="Liverpool"
        data-use-default-css="true">
    </div>

</body>
</html>
 
That should in theory be possible.

You don't need the html, head, and body tags and don't include jquery as XF already includes it.

So literally just use the code below <!-- Load Stats FC Player Rater SDK -->
 
Back
Top Bottom