PDA

View Full Version : Battlefield 2 Stats integration for VBAdvanced


Oap JTRipper
12-22-2005, 10:00 PM
This is a module for Battlefield 2 stats - it integrates the new stats package from http://www.brainpecker.com with full authority to use it

Installation

Included is the module & a product xml file, also included is the full script for the stats. There is also a readme-installation file

Demo (http://www.oapsquad.com/forums)


Screenshot 1 is of the stats block on the homepage
Screenshot 2 is of the main stats page

Oap JTRipper
12-23-2005, 06:11 PM
You can also edit this mod (https://vborg.vbsupport.ru/showthread.php?t=103296) to link to your stats from this add-on

CHANGE

<if condition="$post['fieldX']">
<a href="http://bf2tracker.com/bf2_userprofile.php?bf2id=$post[fieldX]" target="_blank"><img src="$stylevar[imgdir_misc]/bf2.gif" alt="<phrase 1="$userinfo[username]">$vbphrase[view_bf2_stats]</phrase>" border="0" /></a>
</if>

to this

<if condition="$post['fieldX']">
<a href="index.php?page=bf2stats&input1=$post[fieldX]" target="_blank"><img src="$stylevar[imgdir_misc]/bf2.gif" alt="<phrase 1="$userinfo[username]">$vbphrase[view_bf2_stats]</phrase>" border="0" /></a>
</if>

if your homepage isnt index then change that too

rb290
12-23-2005, 06:47 PM
whats battlefield 2 ?

GoNz00
12-23-2005, 07:56 PM
an online game ;)

Rhoads
12-23-2005, 08:54 PM
Thanks for the hack, but I get a white page with player (My PID Number) not found!

SMO
12-24-2005, 12:32 AM
holy cow...exactly what i needed..however..

..i get an invalid page...like it was looking for something else...

any thoughts?

heres the edit...

main(/modules/bf2.php): failed to open stream: No such file or directory in /includes/vba_cmps_include_bottom.php on line 348

SgtTechHead
12-24-2005, 01:01 AM
holy cow...exactly what i needed..however..

..i get an invalid page...like it was looking for something else...

any thoughts?

I had the same thing happen when I first installed. After a bit of investigation, I found that the "Invalid Page" error was being caused because of an invalid or undeclared variable for my VBA_CMPS portal path.

I found this line in the "bf2_stats/bf2_stats_tables.php" (under the uploads folder of the de-compressed hack package) file:

<form name="form1" method="post" action="$bburl?page=bf2stats&">

In that line, I changed the instance of "$bburl" to the actual name of my VBA_CMPS page, in my case "portal.php". Worked like a champ after that. Also found this to be the case in the template that gets installed with the product. The template, vba_portal_bf2stats, had the same line in it. I changed it there also and the optional portal block started working as well.

Nice work Oap JTRipper! Clicks *INSTALL*

SMO
12-24-2005, 01:31 AM
so this is what worked for you in exact form?

<form name="form1" method="post" action="portal.php?page=bf2stats&">

so mine..in my case should be

<form name="form1" method="post" action="index.php?page=bf2stats&">

bc that isnt doing anything for me..still same error

SgtTechHead
12-24-2005, 01:56 AM
so this is what worked for you in exact form?

<form name="form1" method="post" action="portal.php?page=bf2stats&">

so mine..in my case should be

<form name="form1" method="post" action="index.php?page=bf2stats&">

bc that isnt doing anything for me..still same error

That's what worked for me. However, when I installed VBA_CMPS, I installed it in the same directory as my forum. I visited your site, and I see that yours is setup in the root directory, and your forum is under the forum directory. Not sure that my workaround will actually work for you since the paths will not be the same. Most likely, there will be other areas you will have to change in the bf2stats page in your VBA_CMPS. I notice the authors setup is the same as mine, that's probably why it works for me as I stated above.

Sorry if I got your hopes up, but that's what worked for me at least... The way to find out exactly what path it is using, is type in your PID, then click the submit. When you get the blank or invalid page, study the address that is in your "Address" bar of your browser. That will tell you exactly where the submit button is trying to take you.

SMO
12-24-2005, 02:40 AM
well, thanks for looking into it..i will study it a bit..see what comes up...thx again

heh..i messed around like ya said and got it working.. the only thing i have to fix its the image paths.

know here i can "correctly" edit that?

Oap JTRipper
12-24-2005, 09:50 AM
I had the same thing happen when I first installed. After a bit of investigation, I found that the "Invalid Page" error was being caused because of an invalid or undeclared variable for my VBA_CMPS portal path.

I found this line in the "bf2_stats/bf2_stats_tables.php" (under the uploads folder of the de-compressed hack package) file:

<form name="form1" method="post" action="$bburl?page=bf2stats&">

In that line, I changed the instance of "$bburl" to the actual name of my VBA_CMPS page, in my case "portal.php". Worked like a champ after that. Also found this to be the case in the template that gets installed with the product. The template, vba_portal_bf2stats, had the same line in it. I changed it there also and the optional portal block started working as well.

Nice work Oap JTRipper! Clicks *INSTALL*


strange thing is I tested it using 3 installs with the cmps page called different

eg
index.php
home.php
main.php

& it worked everytime

well, thanks for looking into it..i will study it a bit..see what comes up...thx again

heh..i messed around like ya said and got it working.. the only thing i have to fix its the image paths.

know here i can "correctly" edit that?

in the bf2_stats folder there is your bf2_stats_config.php page

$conf_picsPath = "bf2_stats/pics";

that is the bit you need to change

SMO
12-24-2005, 02:42 PM
cool..thx, that fixed the issue with the top graphics but I am having some issues with the "awards"...i check the url on the red x but all it is is my home page. check my site if you wish to know what i am trying to say..

Rhoads
12-24-2005, 02:51 PM
I get this error above my stats page:

Warning: Division by zero in /bf2_stats/bf2_stats_class.php on line 321

:ermm:

Oap JTRipper
12-24-2005, 05:36 PM
cool..thx, that fixed the issue with the top graphics but I am having some issues with the "awards"...i check the url on the red x but all it is is my home page. check my site if you wish to know what i am trying to say..

just had a look at the bare bf2_stats page on your site

this is what the script is trying to find

http://www.slaptardcentral.com/forums/bf2_stats/forums/bf2_stats/pics/rank_7.png

notice the double folders


I get this error above my stats page:

Warning: Division by zero in /bf2_stats/bf2_stats_class.php on line 321



you got a link cos I cant see it on your site

also with what page request are you getting it

Rhoads
12-24-2005, 09:58 PM
you got a link cos I cant see it on your site

also with what page request are you getting it

It's fixed when I was playing on a server, it was my first time (holiday now) that I play on a ranked server. I have asked on brainpecker.com to, and they said that it is a bug when you have not played, they fixed in nex release.

I also have customed my vBadvanced module, you can now compare with other players.

Oap JTRipper
12-25-2005, 12:01 AM
yeh i also did a search

something to do with dividing by 0

Zachery
12-26-2005, 06:40 AM
Oap,

Thjen I suggest making it smaller, the rules of the forum inssit on the files being attached here, You have 24 hours to attach the files here.

Oap JTRipper
12-26-2005, 11:09 AM
Oap,

Thjen I suggest making it smaller, the rules of the forum inssit on the files being attached here, You have 24 hours to attach the files here.

k done

taken the images out of the package :tired:

Zachariah
12-26-2005, 12:19 PM
k done

taken the images out of the package :tired:

Attach to 2nd post :D

Zachariah
12-27-2005, 11:42 AM
Is it me or or gamespy?

- I do not get any data from: bf2web.gamespy.com, did they kill the subdomain?
- I can not even call up the subdomain in the browser.

Warning: file(): php_network_getaddresses: gethostbyname failed in bf2_stats\bf2_stats_class.php on line 86

Warning: file(http://bf2web.gamespy.com/ASP/getleaderboard.aspx?type=score&id=overall&nick=44697543&nocache=119149266): failed to open stream: No error in bf2_stats\bf2_stats_class.php on line 86

Think this is a DNS / site outage ?

Oap JTRipper
12-27-2005, 12:14 PM
you cant pull data direct from that page

you need to do it through the script

you got a url

ive just tested on 2 other sites & working fine

Zachariah
12-28-2005, 03:19 AM
I got it to work on the linux system.
It errors on WinNT box. - Ill play w/ it again and let ya know.

Jellymech
03-28-2006, 08:24 PM
hi guys , i know am diggin this up but i need some help :)

i installed it all but am havin probs witht the images not showing , i have changed the path in the config but still no joy :(

can anyone help me out ??


by the way its a nice addon ;)

Heldenverband
05-19-2006, 10:57 AM
Dear all,

i have a problem with this integration. If i use the stand alone version all works fine. But if i use the integratet version all data displayed but without pictures. The path is correctly.

Any idea ?

CEOPcGamingGuru
06-07-2006, 06:20 PM
Does this work with vb 3.5.4?

jr1001
06-27-2006, 09:58 PM
Nice Mod! Where can we get the pictures? I see you removed them from the download...

Oap JTRipper
07-29-2006, 05:17 PM
updated for vB 3.6 with the new stats package

https://vborg.vbsupport.ru/showthread.php?t=122423

it will also work on vB 3.5

Shazz
07-29-2006, 05:18 PM
Hasen't this already been posted once..
________
Suzuki Splash (http://www.suzuki-tech.com/wiki/Suzuki_Splash)

blindreap3r
08-12-2006, 05:49 PM
What is wrong with this??
www.bf2extreme.com/modules/bf2.php

blindreap3r
08-14-2006, 05:49 PM
I had the same thing happen when I first installed. After a bit of investigation, I found that the "Invalid Page" error was being caused because of an invalid or undeclared variable for my VBA_CMPS portal path.

I found this line in the "bf2_stats/bf2_stats_tables.php" (under the uploads folder of the de-compressed hack package) file:

<form name="form1" method="post" action="$bburl?page=bf2stats&">

In that line, I changed the instance of "$bburl" to the actual name of my VBA_CMPS page, in my case "portal.php". Worked like a champ after that. Also found this to be the case in the template that gets installed with the product. The template, vba_portal_bf2stats, had the same line in it. I changed it there also and the optional portal block started working as well.

Nice work Oap JTRipper! Clicks *INSTALL*

nice fix. I tried to make our stats page its own page instead of haveing the players stats in a column. but i kept getting the $bburl error when you use the form on the custom page content.