XF 1.5 Widgets and external data.


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?


XenForo moderator
Staff member
If it's a standalone widget which is intended to be embedded on sites, you can add the code to one of the sidebar ad templates.


Active member
Thanks for your reply.

This is a sample of the code.

    <title>Your Website Title</title>

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

    <!-- Load Stats FC Player Rater SDK -->
        (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'));

    <!-- Your player rater here -->
    <div class="statsfc-player-rater"
        data-key="YOUR STATSFC KEY"



XenForo moderator
Staff member
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 -->