https://www.icyphoenix.com/viewtopic.php?f=35&t=7663
-----------------------------------
mort
Mon 21 Feb, 2011 05:20

[Fix For Bugs] In Activity Mod
-----------------------------------
[b]ahem![/b]

I just installed the Arcade Mod and found a couple of problems before I could get it to work ok.  :( 

\ip_root\amod\includes\functions_amod_plus.php (1 hits)
	Line 1: <?

\ip_root\amod\includes\rewards_api.php (1 hits)
	Line 1: <?

Mmmm! It gets worse?

[Icy Phoenix Debug] PHP Notice: in file /amod/includes/functions_amod_plus.php on line 801: number_format() expects parameter 1 to be double, string given

[code linenumbers=false]		$score_check_1 = number_format($score_check[0]);[/code]

It doesn't like the zero?  :(


-----------------------------------
argenta
Tue 14 Jun, 2011 11:26

Re: [BUG] In Activity Mod
-----------------------------------
Hello,

I get the same error at top of the page (many lines of the same error msg):

Warning: number_format() expects parameter 1 to be double, string given in functions_amod_plus.php on line:

[b]$score_check_1 = number_format($score_check[0]);[/b]

Does anyone have a solution to this issue? :(

I upgraded to [b]PHP 5.3.5[/b] lately, probably that's the problem?


-----------------------------------
mort
Tue 14 Jun, 2011 12:27

Re: [BUG] In Activity Mod
-----------------------------------
Assuming that you have fixed the <? errors by adding php after the ? like this <?php

In functions_amod_plus.php find this function

[code linenumbers=false]	function FormatScores($score)
		{
		$score_check = explode(".", $score);
		$score_check_1 = number_format($score_check[0]);
		$score_check_2 = round($score_check[1], 5);

		if ($score_check_2 == '00')
			$new_score = $score_check_1;
		else
			$new_score = $score_check_1 .'.'. $score_check_2;
		return $new_score;
		}
[/code]

and replace the block with the code below.

I don't know if this is going to fix it because I stole it from here and have no way to check or to test it. ;)

http://www.assembla.com/code/icy_phoenix/subversion/nodes/extras/trunk/activity/ip_root/plugins/activity/includes/functions_amod_plus.php?rev=257


[code linenumbers=false]function FormatScores($score)
{
	$score_check = explode('.', $score);
	$score_check_1 = number_format((double) $score_check[0]);
	$score_check_2 = round($score_check[1], 5);

	if ($score_check_2 == '00')
		$new_score = $score_check_1;
	else
		$new_score = $score_check_1 .'.'. $score_check_2;
	return $new_score;
}[/code]


-----------------------------------
argenta
Tue 14 Jun, 2011 13:28

Re: [BUG] In Activity Mod
-----------------------------------
Hey mort!!
I just wanna tell you this...
that the fix for activity mod works PERFECTLY!!!

much credit to this fix, thanks a lot and have a great day wherever you are ;)


-----------------------------------
mort
Tue 14 Jun, 2011 13:51

Re: [BUG] In Activity Mod
-----------------------------------
[quote user="argenta" post="52904"]thanks a lot and have a great day wherever you are ;)[/quote]

You're welcome. And I'm in the computer room. Lol! :mricy: 

But it would be nicer if MG converted the phpBB3 games arcade because imho it has a lot more going for it. ;)

And quite possibly [b][i](If you are not aware of this site)[/i][/b] http://igames.origon.dk/forum/

the games there seamlessly integrate with the download functions of phpBB3 Games Admin panel.

So yep! it would be nice if Icy Phoenix could be made to access all this phpBB3 stuff in the same way. ;)


-----------------------------------
argenta
Tue 14 Jun, 2011 17:09

Re: [BUG] In Activity Mod
-----------------------------------
[quote user="mort" post="52906"]But it would be nicer if MG converted the phpBB3 games arcade because imho it has a lot more going for it. ;)
So yep! it would be nice if Icy Phoenix could be made to access all this phpBB3 stuff in the same way. ;)[/quote]
Yeah, it would be really nice if someday HE can put  his hands over this matter....  :mrgreen: 
but for now, lets be happy as things are...... let's not cover him of too much tasks to do! 
As for me... its really a relief now without those php error lines!! :)


-----------------------------------
Mighty Gorgon
Mon 27 Jun, 2011 10:24

Re: [Fix For Bugs] In Activity Mod
-----------------------------------
[quote user="argenta" post="52907"]but for now, lets be happy as things are...... let's not cover him of too much tasks to do![/quote]
Thanks for that! :mri:

I really hope to have some extra free time after the new release, so I can play with other stuff.


-----------------------------------
mort
Mon 27 Jun, 2011 14:09

Re: [Fix For Bugs] In Activity Mod
-----------------------------------
[quote user="Mighty Gorgon" post="52980"][quote user="argenta" post="52907"]but for now, lets be happy as things are...... let's not cover him of too much tasks to do![/quote]
Thanks for that! :mri:

I really hope to have some extra free time after the new release, so I can play with other stuff.[/quote]


Hehehe! I agree :P


