Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks ⇒ Bad Company 2 Stats Module


Bad Company 2 Stats Module
Need help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Go to page Previous  1, 2, 3, 4, 5
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

View previous topic :: View next topic  
Author Message
matuck
Newbie
Newbie

Offline Offline
Joined: Oct 19, 2005
Posts: 24
Location: dalton ga
PostPosted: Wed May 19, 2010 12:58 pm
Post subject: Re: Bad Company 2 Stats Module

Not sure. alot of those problems because the way its originally coded.

I have some ideas to improve the system greatly but will take a major rewrite of the way the system does things.
Unfortunately I'm not gonna spend that much time on it.

Right now every time pages are loaded its hitting an external site to load player stats. My ideas are to cache some of this in the database so its not fetched every time.

Also because of the way the system work now is there is problems with variables getting overflowed or undefined.

Most of this can be fixed by using a database instead of loading every bit of the data from the external api.


matuck's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/MySQL 4.0.25/php 4.3.11/CPG 9.0.6.1
Back to top
View user's profile Visit poster's website
Kinsman
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: May 29, 2006
Posts: 343
Location: Australia
PostPosted: Wed May 19, 2010 1:21 pm
Post subject: Re: Bad Company 2 Stats Module

True, I see one guy is pulling the data, then forming an XML with it.

For now it does work, and looks 100%, great job. Very Happy


Kinsman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0
Back to top
View user's profile Visit poster's website
Genocide
Newbie
Newbie

Offline Offline
Joined: Oct 17, 2009
Posts: 8
Location: UK
PostPosted: Wed May 19, 2010 1:29 pm
Post subject: Re: Bad Company 2 Stats Module

the problem i was experiencing with the player name links not working within the blocks is now fixed Smile

just need to edit the blocks for it to work:


block-BFBC2_Stats_name.php
search line 77:
$content .= ' <td align="center"><img src="modules/'.$modname.'/images/Ranks/'.$stats[$out]['most_used'].'.png" alt="" style="vertical-align: middle;" /> <a href="modules.php?name='.$modname.'&amp;mode=view_profile&amp;pid='.$stats[$out]['name'].'">'.$playername.'</a></td>';

change to:
$content .= ' <td align="center"><img src="modules/'.$modname.'/images/Ranks/'.$stats[$out]['most_used'].'.png" alt="" style="vertical-align: middle;" /> <a href="index.php?name='.$modname.'&amp;mode=view_profile&amp;pid='.$stats[$out]['name'].'">'.$playername.'</a></td>';


block-BFBC2_Stats_full.php
search line 86
$content .= ' <td align="center"><img src="modules/'.$modname.'/images/Ranks/'.$stats[$out]['most_used'].'.png" alt="" style="vertical-align: middle;" /> <a href="modules.php?name='.$modname.'&amp;mode=view_profile&amp;pid='.$stats[$out]['name'].'">'.$playername.'</a></td>';

change to:
$content .= ' <td align="center"><img src="modules/'.$modname.'/images/Ranks/'.$stats[$out]['most_used'].'.png" alt="" style="vertical-align: middle;" /> <a href="index.php?name='.$modname.'&amp;mode=view_profile&amp;pid='.$stats[$out]['name'].'">'.$playername.'</a></td>';


Genocide's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Genocide
Newbie
Newbie

Offline Offline
Joined: Oct 17, 2009
Posts: 8
Location: UK
PostPosted: Wed May 19, 2010 1:41 pm
Post subject: Re: Bad Company 2 Stats Module

matuck wrote:
if you are seeing _TITLE_SCORE your language file did not upload properly if you are using english.

the language file is in the right place but obviously not working for some reason Confused


Genocide's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
matuck
Newbie
Newbie

Offline Offline
Joined: Oct 19, 2005
Posts: 24
Location: dalton ga
PostPosted: Wed May 19, 2010 1:57 pm
Post subject: Re: Bad Company 2 Stats Module

think thats part of the variable overflow. i was talking about.


matuck's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/MySQL 4.0.25/php 4.3.11/CPG 9.0.6.1
Back to top
View user's profile Visit poster's website
Kinsman
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: May 29, 2006
Posts: 343
Location: Australia
PostPosted: Wed May 19, 2010 2:02 pm
Post subject: Re: Bad Company 2 Stats Module

heres the 2 blocks i fixed. all links now open the module on a new page.


Kinsman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0
Back to top
View user's profile Visit poster's website
Genocide
Newbie
Newbie

Offline Offline
Joined: Oct 17, 2009
Posts: 8
Location: UK
PostPosted: Wed May 19, 2010 6:00 pm
Post subject: Re: Bad Company 2 Stats Module

not sure how but these new blocks have corrected the problems i got with the language file Cool

i alter the code for myself so the links opened up within the same page rather than open a new one.

thanks


Genocide's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Kinsman
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: May 29, 2006
Posts: 343
Location: Australia
PostPosted: Thu May 20, 2010 4:26 am
Post subject: Re: Bad Company 2 Stats Module

No problem, I just manually wrote the titles, and fixed the links. Very Happy


Kinsman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0
Back to top
View user's profile Visit poster's website
Kinsman
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: May 29, 2006
Posts: 343
Location: Australia
PostPosted: Tue May 25, 2010 2:23 pm
Post subject: Re: Bad Company 2 Stats Module

We suddenly started getting a lot of this error, no idea what changed, but switching back to display by game alias gets rid of it for now.

Code::
Fatal error: Call to undefined function displayerror() in /home/bik47463/public_html/junglewraiths.net/modules/BFBC2_Stats/index.php on line 208

Line in question says this.

Code::
DisplayError(_TITLE_PNOTFOUND._GOBACK, true);


Kinsman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0
Back to top
View user's profile Visit poster's website
greenday2k
Forum Admin
Forum Admin

Offline Offline
Joined: Aug 11, 2005
Posts: 489
Location: CO
PostPosted: Tue May 25, 2010 11:49 pm
Post subject: Re: Bad Company 2 Stats Module

use (_TITLE_PNOTFOUND._GOBACK, true); instead?
or trigger_error(_TITLE_PNOTFOUND);

_________________
www.greenday2k.net


greenday2k's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website MSN Messenger Yahoo Messenger
BobCat
Nice poster
Nice poster

Offline Offline
Joined: Apr 03, 2008
Posts: 85
Location: Gold Coast, Australia
PostPosted: Thu Jun 03, 2010 1:49 pm
Post subject: Re: Bad Company 2 Stats Module

i would like to throw a big Thanks to those involved in getting this module going and working, great stuff.

Nice site Kinsman, great to see a AU gamers site using DragonflyCMS.


BobCat's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache2.2.16/MySQL5.0.91/PHP5.2.14/DF9.2.3.3
Back to top
View user's profile Visit poster's website
Kinsman
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: May 29, 2006
Posts: 343
Location: Australia
PostPosted: Thu Jun 03, 2010 9:32 pm
Post subject: Re: Bad Company 2 Stats Module

Thanks, it serves us well. Very Happy


Kinsman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 5 of 5
All times are GMT
Go to page Previous  1, 2, 3, 4, 5



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy