[ABD] phpBB Arcade 2.0.RC5

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
mistycat
Registered User
Posts: 16
Joined: Sat Sep 10, 2011 2:00 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by mistycat »

yes i just checked again and the edits are there.

very strange...

seems to be the same two html files in the two styles..............
sleevedbiker
Registered User
Posts: 789
Joined: Mon Oct 12, 2009 4:33 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by sleevedbiker »

mistycat wrote:Just done a new install of forum, and have added the arcade, but when verifying am told some files not edited? But I have made the edits on these files, any ideas?

The following files seem to not be edited:

phpbb_root_path/styles/prosilver/template/overall_header.html
<!-- IF S_ARCADE_FB -->
<meta property="og:site_name" content="{SITENAME}" />
<meta property="og:title" content="{ARCADE_FB_GN}" />
<meta property="og:image" content="{ARCADE_FB_GI}" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver/template/overall_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver/template/simple_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver_se/template/overall_header.html
<!-- IF S_ARCADE_FB -->
<meta property="og:site_name" content="{SITENAME}" />
<meta property="og:title" content="{ARCADE_FB_GN}" />
<meta property="og:image" content="{ARCADE_FB_GI}" />
<!-- ENDIF -->
phpbb_root_path/styles/prosilver_se/template/overall_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver_se/template/simple_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->Checking if all modules exist:All modules found
make sure the spacing is exactly the same. some programs when you copy and paste auto create spaces and the verify looks for the exact code.
You ride with an outlaw, You die with an outlaw
mistycat
Registered User
Posts: 16
Joined: Sat Sep 10, 2011 2:00 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by mistycat »

i think its ok, for example my modified html file

<!-- IF S_ARCADE_FB -->
<meta property="og:site_name" content="{SITENAME}" />
<meta property="og:title" content="{ARCADE_FB_GN}" />
<meta property="og:image" content="{ARCADE_FB_GI}" />
<!-- ENDIF -->

{META}
and i am told to add
<!-- IF S_ARCADE_FB -->
<meta property="og:site_name" content="{SITENAME}" />
<meta property="og:title" content="{ARCADE_FB_GN}" />
<meta property="og:image" content="{ARCADE_FB_GI}" />
<!-- ENDIF -->
before meta

can it be a permissions problem?
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by KillBill. »

mistycat wrote:Just done a new install of forum, and have added the arcade, but when verifying am told some files not edited? But I have made the edits on these files, any ideas?

The following files seem to not be edited:

phpbb_root_path/styles/prosilver/template/overall_header.html
<!-- IF S_ARCADE_FB -->
<meta property="og:site_name" content="{SITENAME}" />
<meta property="og:title" content="{ARCADE_FB_GN}" />
<meta property="og:image" content="{ARCADE_FB_GI}" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver/template/overall_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver/template/simple_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver_se/template/overall_header.html
<!-- IF S_ARCADE_FB -->
<meta property="og:site_name" content="{SITENAME}" />
<meta property="og:title" content="{ARCADE_FB_GN}" />
<meta property="og:image" content="{ARCADE_FB_GI}" />
<!-- ENDIF -->
phpbb_root_path/styles/prosilver_se/template/overall_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->


phpbb_root_path/styles/prosilver_se/template/simple_header.html
<!-- IF S_IN_ARCADE -->
<link href="{T_THEME_PATH}/arcade.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->Checking if all modules exist:All modules found
I think the bad files line endings format.

open files notepad++ and click -> Edit/Eol conversion/convert to UNIX format
mistycat
Registered User
Posts: 16
Joined: Sat Sep 10, 2011 2:00 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by mistycat »

I dont see this option
Edit/Eol conversion/convert to UNIX format
when i open the html file in notepad
mistycat
Registered User
Posts: 16
Joined: Sat Sep 10, 2011 2:00 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by mistycat »

ok sorted,

Just need to open in notepad and carry out the edits
save, upload

and job done.

no conversion necessary
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by KillBill. »

mistycat wrote:no conversion necessary
If you change so you can be restored.
vipaka
Registered User
Posts: 493
Joined: Sun Aug 28, 2011 7:25 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by vipaka »

Which file (and where) would I need to insert this code to successfully submit the "game reward" value to all players who submit a score? (not just high score)

Edit: Figured it out. Needed to put this into the score.php file.

Code: Select all

$sql = "SELECT game_reward
							 FROM " . ARCADE_GAMES_TABLE . " u											ORDER BY u.game_reward";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);

$game_reward = $row['game_reward'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $game_reward . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
Curious about my work? See it for yourself.
Image
Tony´S
Registered User
Posts: 26
Joined: Tue Oct 18, 2011 4:31 am

Re: [RC] phpBB Arcade 2.0.RC1

Post by Tony´S »

yet there is still the tournament addons? :roll:
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by KillBill. »

vipaka wrote:Which file (and where) would I need to insert this code to successfully submit the "game reward" value to all players who submit a score? (not just high score)

Edit: Figured it out. Needed to put this into the score.php file.

Code: Select all

$sql = "SELECT game_reward
							 FROM " . ARCADE_GAMES_TABLE . " u											ORDER BY u.game_reward";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);

$game_reward = $row['game_reward'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $game_reward . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
This code contains more errors.

The original code was deleted?
Or, high score case double get reward the user?
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by KillBill. »

Tony´S wrote:yet there is still the tournament addons? :roll:
http://phpbbarcade.origon.dk/viewtopic.php?p=821#p821
vipaka
Registered User
Posts: 493
Joined: Sun Aug 28, 2011 7:25 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by vipaka »

KillBill. wrote:
vipaka wrote:Which file (and where) would I need to insert this code to successfully submit the "game reward" value to all players who submit a score? (not just high score)

Edit: Figured it out. Needed to put this into the score.php file.

Code: Select all

$sql = "SELECT game_reward
							 FROM " . ARCADE_GAMES_TABLE . " u											ORDER BY u.game_reward";
				$result = $db->sql_query($sql);
				$row = $db->sql_fetchrow($result);

$game_reward = $row['game_reward'];


// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_points = user_points + ' . $game_reward . '
WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
This code contains more errors.

The original code was deleted?
Or, high score case double get reward the user?
No, the original code is intact so that high scores get double game_reward. What's buggy about it, it worked perfectly when I tested it in scores.php...
Curious about my work? See it for yourself.
Image
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by KillBill. »

vipaka wrote: No, the original code is intact so that high scores get double game_reward. What's buggy about it, it worked perfectly when I tested it in scores.php...

Code: Select all

$sql = "SELECT game_reward
		FROM " . ARCADE_GAMES_TABLE . " u
		ORDER BY u.game_reward";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);

$game_reward = $row['game_reward'];

// Grant points on submit
$sql = 'UPDATE ' . USERS_TABLE . '
		SET user_points = user_points + ' . $game_reward . '
		WHERE user_id = ' . (int) $user->data['user_id'];
$db->sql_query($sql);
1., FROM " . ARCADE_GAMES_TABLE . " u -> FROM " . ARCADE_GAMES_TABLE . "
2., ORDER BY u.game_reward"; -> ORDER BY game_reward";
3., $row = $db->sql_fetchrow($result); add after $db->sql_freeresult($result);
4., $game_reward = $row['game_reward']; -> $game_reward = (float) $row['game_reward'];
----------------------------------------------------------------------------------
But it would be even nicer.

open arcade/includes/score.php

find

Code: Select all

if ($arcade->points['show'] && $reward)
add before

Code: Select all

if ($arcade->points['show'])
{
	$playing_reward = ($reward === false) ? $arcade->get_reward($game_data) : $reward;

	if ($playing_reward > 0)
	{
		$arcade->set_points('add', $user->data['user_id'], $playing_reward);
		$reward = (float) ($reward + $playing_reward);
	}
	else
	{
		$reward = false;
	}
}
Thus get your reward and the message. ;)
vipaka
Registered User
Posts: 493
Joined: Sun Aug 28, 2011 7:25 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by vipaka »

Ah, I like that even better, thanks. :D Except that it says "you've recieved 0 gold" on the confirmation page. *will fix it*
Curious about my work? See it for yourself.
Image
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm

Re: [RC] phpBB Arcade 2.0.RC1

Post by KillBill. »

vipaka wrote:Ah, I like that even better, thanks. :D Except that it says "you've recieved 0 gold" on the confirmation page. *will fix it*
I do not see zero.

Return to “[3.0.x] Abandoned MODs”