vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Battlefield 2 Stats integration for VBAdvanced (https://vborg.vbsupport.ru/showthread.php?t=103614)

Oap JTRipper 12-22-2005 10:00 PM

Battlefield 2 Stats integration for VBAdvanced
 
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


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 to link to your stats from this add-on

CHANGE

Code:

<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

Code:

<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

Quote:

Originally Posted by SMO
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:
Code:


<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

Quote:

Originally Posted by SMO
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?


All times are GMT. The time now is 11:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01101 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete