Jump to content

Battlefield 4 Battlelog Profile Integration


Aiwa
 Share

Recommended Posts

%7Boption%7D



File Name: Battlefield 4 Battlelog Profile Integration

File Submitter: Aiwa

File Submitted: 04 Dec 2013

File Category: User and Social Engagement

Supported Versions: IP.Board 3.3.x, IP.Board 3.4.x, IP.Content 2.3.x



This hook will obtain data from Battlelog via bf4stats.com for your users and place it in your IP.Board database for use anywhere on your site. Your board will re-load your members Battlelog information every hour, time can be changed, so you always have up to date information without impacting load times of your community pages.

This works with a simple Custom Profile field to obtain your users Soldier name.

If there are any other places you'd like to see a users Battlelog information displayed, let me know. It's a very simple matter to output this data on other parts of your IPS Community.

For the board index and IP.Content block, group controls are provided so only members in groups you allow will show on your board index and IP.Content pages. You can also control how many members display to keep the block from getting out of hand.

For support, please create an account then submit a ticket.



here to download this file

Link to comment
Share on other sites

If they aren't updating, bf4stats hasn't updated their data.

The BF4 API on bf4stats isn't fully complete, so I can't force them to pull updated data on every player for each request. That's something I hope to change once their API is complete. Or if I can ever get EA to document their JSON API directly to Battlelog I'll pull straight from there.

For now, you can manually force bf4stats to get their data by going to their profile on bf4stats http://bf4stats.com/{platform}/petej11

Edited by Aiwa
Link to comment
Share on other sites

This hook will obtain data from Battlelog via bf4stats.com

I would like to pull direct from Battlelog, but they don't document their API worth a crap. bf4stats has a documented API and it generally stays pretty up to date.

Once the bf4stats API is complete, I should be able to add in a bit that will force them to update the player stats before I request the new data. At least that's available in the bf3stats API.

Link to comment
Share on other sites

I confess I did a poor job of reading the description. :lol:

I found that long names were breaking the layout in the sidebar. I therefore made a slight change (I am a novice so I am sure you would do a better job):

#bfname {
width: 80px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: left;
}

I added an id of "bfname" to the <a> tag for the soldier name.

Link to comment
Share on other sites

Very nice hook.

I'd like to see the board index block be configurable to display 'X random soldiers' as some clans are pretty big.

Nevertheless, purchased and installed.

Done, count is controlled via ACP setting.

I think I found a bug. The default scheduler settings don't show this as running hourly but at much longer intervals (Jan 2014! :lol:).

Easily amended in the scheduler.

Done

I confess I did a poor job of reading the description. :lol:

I found that long names were breaking the layout in the sidebar. I therefore made a slight change (I am a novice so I am sure you would do a better job):

#bfname {
width: 80px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: left;
}

I added an id of "bfname" to the <a> tag for the soldier name.

Fixed a bit differently, but fixed.

Please feel free to tell me to go away! :lol:

I found the sidebar block could not be collapsed.

I think you need to add;

<div class='_sbcollapsable'>

after;

<h3>{$this->lang->words['kc_bf4_header']}</h3>

and then add;

</div>

after;

</script>
    </li></ul>
	</td></tr>
 </foreach>

</table>
</div>

Done

Packing it up now.

Link to comment
Share on other sites

since adding this i now get this on my forums page

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_6/skin_profile.php:1054) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 114

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_6/skin_profile.php:1054) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 127

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_6/skin_profile.php:1054) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 136

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_6/skin_profile.php:1054) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 137

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_6/skin_profile.php:1054) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 141
<

is this related?

im having to assume so

Link to comment
Share on other sites

What's your board version please? Link to your board?

Does it happen on the default IP.Board skin?

3.4.6 version

www.rockpapergodmode.com

also happens on the default board.

Warning: Invalid argument supplied for foreach() in /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php on line 1038

Warning: array_rand() expects parameter 1 to be array, null given in /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php on line 1058

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php:1038) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 114

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php:1038) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 127

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php:1038) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 136

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php:1038) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 137

Warning: Cannot modify header information - headers already sent by (output started at /home/vanucci/public_html/rockpapergodmode.com/cache/skin_cache/cacheid_1/skin_profile.php:1038) in /home/vanucci/public_html/rockpapergodmode.com/admin/sources/classes/output/formats/html/htmlOutput.php on line 141

the top two lines are missed out on the link because of a custom top bar that has been placed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...