Log Into Your Account

Forum Index  ·  Search  ·  Edit your profile  ·  Login, Check Messages
Statistics  ·  Board Rules  ·  Forum FAQ

Search for at
Evolution-Xtreme Advanced Search


+  
Latest Site News   Next 5 >>  
 Forum   Author   Replies   Last Post 
No icon BF3-v2 Theme for Evolution Xtreme Released New News! Wicked 15 Fri May 03, 2013 4:01 am
TimBitz View latest post
No icon [PROGRESS] Nuke Evolution Xtreme 2.0.9e Announcements! SgtLegend 2 Sun May 27, 2012 7:25 pm
SgtLegend View latest post
No icon European Cookie Law Announcements! SgtLegend 0 Sat May 26, 2012 8:33 am
SgtLegend View latest post
No icon [THIS SITE] Speed improvements New News! SgtLegend 16 Thu Apr 12, 2012 12:29 pm
SgtLegend View latest post
No icon [GITHUB] Xtreme has gone git Announcements! SgtLegend 1 Tue Nov 01, 2011 12:46 pm
coopvet2000 View latest post
   
Recent Topics   Next 14 >>  
 Forum   Author   Replies   Last Post 
No icon HTML Purifier Update [SECURITY PATCH] Security killigan 28 Tue May 07, 2013 8:28 pm
JasperZ28 View latest post
No icon Gaming Rigs Module Demo Community Announcements killigan 17 Tue Mar 12, 2013 9:29 am
megaboost View latest post
No icon [SECURITY] Nuke Guard Security SgtLegend 2 Sat Jan 05, 2013 1:12 am
SgtLegend View latest post
No icon Donations Xtreme v1.2 (beta) Modules travo 90 Tue May 14, 2013 6:20 am
Javatech View latest post
No icon New Gaming Rigs Module Community Announcements Lonestar 12 Sun Feb 10, 2013 4:48 am
Carbonkiller View latest post
No icon DFG Hosting - My Review General Chat TimBitz 25 Mon Feb 04, 2013 3:52 pm
megaboost View latest post
No icon [FIX] Correct Cookie Settings (Invalid Session Error) Quick fixes killigan 103 Sun Jan 06, 2013 3:26 pm
mastad View latest post
No icon [FIX] User registration Quick fixes SgtLegend 69 Mon Dec 24, 2012 7:49 am
Teo View latest post
No icon Downloads Module Modules killigan 11 Mon Feb 27, 2012 5:02 am
28thCDM View latest post
No icon [POLL][FEATURE] URL rewrites for 2.0.9e Comments and Suggestions SgtLegend 7 Tue Jan 03, 2012 6:30 am
Ruphus View latest post
No icon DFG Photo Host - Files not uploading Modules Saint 26 Mon May 20, 2013 7:52 pm
SSmokinJoe View latest post
No icon Could An Admin Look At My Evo Install Please? General Support Geordie 2 Mon May 20, 2013 4:13 pm
Geordie View latest post
No icon Subscriptions Module Modules Nexter 0 Sun May 19, 2013 2:09 pm
Nexter View latest post
No icon Customizing GoogleTap General Support Nexter 11 Sun May 19, 2013 11:14 am
Nexter View latest post

Bad Company 2 Stats block
Goto page : Previous  1, 2, 3 ... 10, 11, 12, 13, 14  Next
 
Post new topic    Reply to topic    printer-friendly view   Thank Post    Evolution-Xtreme Forum Index -> Blocks
View previous topic :: View next topic  
Author Message
TONY[-TOC-]




Joined: May 20, 2009
Posts: 242

Reputation: 31.3
votes: 1
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 4:45 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

2 questions for ya SgtLegend

1. My module always has "There is 1 member(s) in the queue waiting to have their stats processed" when I know there is no one in queue.
2. Much harder question and I hate to be a pain but I am trying to get a progress bar to show up under the rank on the module index page ( eventually I also want it on the player profile page as well ) like I have on my block ( www.toctheothercrew.com ). I am not sure what I am doing wrong here.
First I put in the ranks array just after the  //prep the members area ( did not know where to put it so I just used the same placement I have in my block


Quote:
$rankpoints=array(
0 => 0,
1 => 6500,
2 => 11000,
3 => 18500,
4 => 28000,
5 => 40000,
6 => 53000,
7 => 68000,
8 => 84000,
9 => 100000,
10 => 120000,
11 => 138000,
12 => 158000,
13 => 179000,
14 => 200000,
15 => 224000,
16 => 247000,
17 => 272000,
18 => 297000,
19 => 323000,
20 => 350000,
21 => 377000,
22 => 405000,
23 => 437000,
24 => 472000,
25 => 537000,
26 => 620000,
27 => 720000,
28 => 832000,
29 => 956000,
30 => 1092000,
31 => 1240000,
32 => 1400000,
33 => 1550000,
34 => 1730000,
35 => 1900000,
36 => 2100000,
37 => 2300000,
38 => 2530000,
39 => 2700000,
40 => 2928000,
41 => 3142000,
42 => 3378000,
43 => 3604000,
44 => 3852000,
45 => 4090000,
46 => 4350000,
47 => 4600000,
48 => 4872000,
49 => 5134000,
50 => 5400000);


Then I edited my rank out section to this

Quote:
echo '  <td align="center"><img src="modules/'.$module_name.'/images/Ranks/thumb/'.$stats[$out]['rank'].'.png" alt="'.$stats[$out]['rank'].'" /><br /><img src="modules/'.
$module_name.'/progress.php?max=/'.$stats[$out]['diff_score']. '&amp;current=' . $stats[$out]['score_rank']. '&amp;color=ff7700&amp;bgcolor=2E2E2E" /></td>';
I will post the progress.php at the end of this reply.

next I added this after the "//calculate which class they use" section

 

Quote:
// Search next rank
if( empty($rankpoints[($data['players'][$x]['rank'] + 1)]) )
$nextRankID = $data['players'][$x]['rank'];
else {
if($rankpoints[$data['players'][$x]['rank']] == $rankpoints[($data['players'][$x]['rank'] + 1)])
{
$nextRankID = 0;
for ($m=($data['players'][$x]['rank'] + 1);$m<(count($rankpoints)-1);$m++)
{
if( ($rankpoints[$m] > $rankpoints[$data['players'][$x]['rank']]) && ($nextRankID == 0) ) $nextRankID = $m;
}
}
else $nextRankID = ($data['players'][$x]['rank'] + 1);
}
$score_rank = $data['players'][$x]['score'] - $rankpoints[$nextRankID-1];
$diff_score = $rankpoints[$nextRankID] - $rankpoints[$nextRankID-1];


and last I added this to the "$stats[$x] = "

Quote:
,'score_rank'=> $score_rank,'diff_score'=> $diff_score);


I have no idea what I am doing wrong here ( code works as intended in my block ) any help would be much appreciated.


progress.php
Quote:
<?php
header("Content-type: image/png");

if(isset($_GET['max']) && isset($_GET['current'])) {
   
$maxPoints = $_GET['max'];
$curPoints = $_GET['current'];

// Last Rank reached?
if($maxPoints == "0") $maxPoints = $curPoints;

// Convert Color
$color_r = hexdec( substr($_GET['color'], 0, 2) );
$color_g = hexdec( substr($_GET['color'], 2, 2) );
$color_b = hexdec( substr($_GET['color'], 4, 2) );

$bgcolor_r = hexdec( substr($_GET['bgcolor'], 0, 2) );
$bgcolor_g = hexdec( substr($_GET['bgcolor'], 2, 2) );
$bgcolor_b = hexdec( substr($_GET['bgcolor'], 4, 2) );


// Create image
$im = @imagecreate(75, 4);  //file size of the picture
$background_color = imagecolorallocate($im, $bgcolor_r, $bgcolor_g, $bgcolor_b);

if(empty($maxPoints) || empty($curPoints)) exit;
if($curPoints > $maxPoints) $curPoints = $maxPoints;

$iColor   = imagecolorallocate($im, $color_r, $color_g, $color_b);
$BarWidth = number_format(floor(($curPoints / $maxPoints) * 75),0);  //length of the bar 55
if($BarWidth<1) $BarWidth = 1;
imagefilledrectangle( $im, 1, 1, $BarWidth, 2, $iColor );

imagepng($im);
imagedestroy($im);
} else {
   exit;
}
?>
Back to top
View user's profile Send private message Visit poster's website
SgtLegend
Site Admin
Site Admin
Lead Developer
Lead Developer
DFG Developer
DFG Developer



Gender: Gender:Male
Joined: Oct 11, 2008
Age: 22
Posts: 5058
Location: Australia
Reputation: 602.2
votes: 27
australia.png


Status: Offline
Web Control Panel: WHM
PostPosted: Thu Apr 08, 2010 5:05 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Sorry forgot to let you know which file to update

Update the index.php file in the admin folder

@TONY[-TOC-]

Ill have a look at the coding when i get home in about 6 hours


DFG Hosting | DFG Design | Stack Overflow | PHP.net | jQuery | CSS-Tricks | !DOCTYPE | Mozilla Docs

Current projects: Nuke Evolution Xtreme (Unknown)
I am a front end web developer that knows PHP and MySQL, also a SitePoint Mentor


Back to top
View user's profile Send private message Visit poster's website
TONY[-TOC-]




Joined: May 20, 2009
Posts: 242

Reputation: 31.3
votes: 1
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 5:12 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Quote:
@TONY[-TOC-]

Ill have a look at the coding when i get home in about 6 hours


Thank you sir. I am in over my head on it.
Back to top
View user's profile Send private message Visit poster's website
Sponsor
webstorm.jpg
Bassinurface




Joined: Jun 26, 2009
Posts: 82
Location: USA
Reputation: 10.3
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 5:22 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

0 players information failed to update!

[ Go Back And Try Again ]


That's is what I get now?
Back to top
View user's profile Send private message Visit poster's website
denzil3009



Gender: Gender:Male
Joined: Mar 07, 2009
Posts: 490
Location: Edinburgh
Reputation: 44.5
votes: 4
uk.png


Status: Offline
Web Control Panel: Plesk 9.0
Test: &gt;:/
PostPosted: Thu Apr 08, 2010 5:29 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

That means all players got updated ?
Back to top
View user's profile Send private message Visit poster's website
Bassinurface




Joined: Jun 26, 2009
Posts: 82
Location: USA
Reputation: 10.3
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 5:31 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

No when I try to add them it fails and this what it tells me

"0 players information failed to update!

[ Go Back And Try Again ]"
Back to top
View user's profile Send private message Visit poster's website
Sponsor
dfghosting for all your hosting
denzil3009



Gender: Gender:Male
Joined: Mar 07, 2009
Posts: 490
Location: Edinburgh
Reputation: 44.5
votes: 4
uk.png


Status: Offline
Web Control Panel: Plesk 9.0
Test: &gt;:/
PostPosted: Thu Apr 08, 2010 6:01 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Did you install the sql ?

if you had the old back installed you will need to delete the old table.
Back to top
View user's profile Send private message Visit poster's website
Bassinurface




Joined: Jun 26, 2009
Posts: 82
Location: USA
Reputation: 10.3
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 6:35 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Nothing.... I can add them through myphpadmin but not through the mod itself
Back to top
View user's profile Send private message Visit poster's website
denzil3009



Gender: Gender:Male
Joined: Mar 07, 2009
Posts: 490
Location: Edinburgh
Reputation: 44.5
votes: 4
uk.png


Status: Offline
Web Control Panel: Plesk 9.0
Test: &gt;:/
PostPosted: Thu Apr 08, 2010 7:13 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Have you done the jQuery edits ?
Back to top
View user's profile Send private message Visit poster's website
Sponsor
webstorm.jpg
Bassinurface




Joined: Jun 26, 2009
Posts: 82
Location: USA
Reputation: 10.3
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 7:18 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Yuppers
Back to top
View user's profile Send private message Visit poster's website
NEO



Gender: Gender:Male
Joined: Dec 28, 2008
Posts: 77

Reputation: 6.8
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 7:31 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Since there are multiple downloads in this thread, would someone post the link to the latest and greatest version that SgtLegend has been working on?

This is getting a little confusing as there are two different MODULES ("BC2_stats_tracker" which is in this thread and "BFBC2_Stats_Tracker_Module_1.0_RC1" which is in the Downloads section of the web site).  Both of these modules use the same database name.

Thank you

NEO
Back to top
View user's profile Send private message
denzil3009



Gender: Gender:Male
Joined: Mar 07, 2009
Posts: 490
Location: Edinburgh
Reputation: 44.5
votes: 4
uk.png


Status: Offline
Web Control Panel: Plesk 9.0
Test: &gt;:/
PostPosted: Thu Apr 08, 2010 8:03 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Bassinyourface try deleting the table and reinstalling

@NEO
download the one in the downloads section of this site, you are correct though.

SGT-Legend should include a DELETE statement in the install SQL if he hasnt already.
Back to top
View user's profile Send private message Visit poster's website
Sponsor
Web Hosting
SgtLegend
Site Admin
Site Admin
Lead Developer
Lead Developer
DFG Developer
DFG Developer



Gender: Gender:Male
Joined: Oct 11, 2008
Age: 22
Posts: 5058
Location: Australia
Reputation: 602.2
votes: 27
australia.png


Status: Offline
Web Control Panel: WHM
PostPosted: Thu Apr 08, 2010 8:46 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

Bassinurface wrote (View Post):
No when I try to add them it fails and this what it tells me

"0 players information failed to update!

[ Go Back And Try Again ]"


This should only happen if the table doesn't exist

denzil3009 wrote (View Post):
SGT-Legend should include a DELETE statement in the install SQL if he hasnt already.


I don't see the need for one as i changed the table name with the download

NEO wrote (View Post):

Since there are multiple downloads in this thread, would someone post the link to the latest and greatest version that SgtLegend has been working on?

This is getting a little confusing as there are two different MODULES (&quot;BC2_stats_tracker&quot; which is in this thread and &quot;BFBC2_Stats_Tracker_Module_1.0_RC1&quot; which is in the Downloads section of the web site). &nbsp;Both of these modules use the same database name.

Thank you

NEO


The one i update will always be in the downloads module so it didn't get confusing


DFG Hosting | DFG Design | Stack Overflow | PHP.net | jQuery | CSS-Tricks | !DOCTYPE | Mozilla Docs

Current projects: Nuke Evolution Xtreme (Unknown)
I am a front end web developer that knows PHP and MySQL, also a SitePoint Mentor


Back to top
View user's profile Send private message Visit poster's website
killigan
Xtreme Developer
Xtreme Developer
DFG Developer
DFG Developer



Gender: Gender:Male
Joined: Oct 08, 2008
Posts: 2425

Reputation: 35009.9
votes: 6
usa.png


Status: Offline
PostPosted: Thu Apr 08, 2010 9:51 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

there is an option to uninstall the module in the installer. Instead of clicking new install  you can click on uninstall and it will delete the tables.


Thanks,
Killigan

DfgHosting.com - a true hosting company since 2006
Shared Hosting | Reseller Hosting | Dedicated Servers





Back to top
View user's profile Send private message Visit poster's website MSN Messenger Visit member's Facebook: 154164544594519
denzil3009



Gender: Gender:Male
Joined: Mar 07, 2009
Posts: 490
Location: Edinburgh
Reputation: 44.5
votes: 4
uk.png


Status: Offline
Web Control Panel: Plesk 9.0
Test: &gt;:/
PostPosted: Thu Apr 08, 2010 11:06 pm Post subject: No icon Re: Bad Company 2 Stats block Reply with quote

killigan wrote (View Post):
there is an option to uninstall the module in the installer. Instead of clicking new install  you can click on uninstall and it will delete the tables.


I never use the installers  Razz

I prefer phpmyadmin Very Happy
Back to top
View user's profile Send private message Visit poster's website
Sponsor
webstorm.jpg
Display posts from previous:
Post new topic  Reply to topic   printer-friendly view   Thank Post Evolution-Xtreme Forum Index ->  Blocks All times are UTC - 5 Hours [DST enabled]
Goto page : Previous  1, 2, 3 ... 10, 11, 12, 13, 14  Next
Page 11 of 14


 
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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Hello from BigBangGamers.com 3 Daveran27703 2839 Thu Oct 06, 2011 3:49 am
tynmanz View latest post
No new posts How to post an embed video from gametrailers.com 12 maubo 3491 Sat Oct 10, 2009 1:49 pm
davespanzer View latest post
No new posts realmdesignz.com 3 freqz 2568 Thu Oct 01, 2009 6:40 am
wolfstar View latest post
No new posts Nuke-EvolutionThemes.com [Conversion Master] 2 coopvet2000 2348 Sat Jan 31, 2009 8:44 pm
coopvet2000 View latest post
This topic is locked: you cannot edit posts or make replies. Nuke-EvolutionThemes.com 0 wolfstar 2843 Sat Jan 17, 2009 11:56 am
wolfstar View latest post
 




Powered by phpBB © 2001, 2006 phpBB Group
DFG-Name Theme by DFG Design ©
Forums ©

Spambot Killer
Site Map



PHP-Nuke Copyright © 2006 by Francisco Burzi.
All logos, trademarks and posts in this site are property of their respective owners, all the rest © 2006 by the site owner.
Powered by Nuke Evolution 2.0.7 - Nuke-Evolution Xtreme 2.0 Edition

This site is cached. Click here to update the cache.
[ Page Generation: 0.77 Seconds | Memory Usage: 9.28 MB ]

Do Not Click