I apologize for the long post. I have now had 7 others review my file hacks and no one is able to find the difference.
This is the only hack I have installed.
I suppose I will offer a reward to anyone that can find the differences in my file hacks that does not allow the scores to be saves.
Here are my hacks:
In admincp/index.php:
Code:
$printhr = false;
construct_nav_option("General Settings", 'arcadeadmin.php?do=general', '<br />');
construct_nav_option("Game Settings", 'arcadeadmin.php?do=games', '<br />');
construct_nav_option("Score Settings", 'arcadeadmin.php?do=scores', '<br />');
construct_nav_option("Challenges", 'arcadeadmin.php?do=challenges', '<br />');
construct_nav_group("Arcade", '<hr />');
if (can_administer('canadminstyles'))
{
In admincp/usergroup.php:
Code:
print_table_break();
print_table_header("Arcade Permissions");
print_yes_no_row("Can View the Arcade? <dfn>Allows usergroup to view the arcade, including high scores and leaderboards</dfn>", 'usergroup[canviewarcade]', $ug_bitfield['canviewarcade']);
print_yes_no_row("Can Play Games in the Arcade? <dfn>Allows usergroup to play arcade games</dfn>", 'usergroup[canplayarcade]', $ug_bitfield['canplayarcade']);
print_yes_no_row("Can Post Comments? <dfn>Allows usergroup to post comments when they achieve a high score</dfn>", 'usergroup[canmakecomments]', $ug_bitfield['canmakecomments']);
print_yes_no_row("Can Edit Leaderboard Comments? <dfn>Allows usergroup to edit comments left by other members</dfn>", 'usergroup[caneditscores]', $ug_bitfield['caneditscores']);
print_yes_no_row("Can Delete Leaderboard Scores? <dfn>Allows usergroup to delete scores and comments left by other members</dfn>", 'usergroup[candelscores]', $ug_bitfield['candelscores']);
print_table_break();
print_table_header($vbphrase['forum_viewing_permissions']);
print_yes_no_row($vbphrase['can_view_board'], 'usergroup[canview]', $ug_bitfield['canview']);
In includes/functions.php:
Code:
}
// declares the arcade image directory
$stylevar['imgdir_arcade'] = "images/arcade";
// get CSS width for outerdivwidth from outertablewidth
if (strpos($stylevar['outertablewidth'], '%') === false)
{
In includes/functions_showthread.php:
Code:
require_once('./includes/functions_bbcodeparse.php');
if ($arcadegeneral['awardson']==1) {
// declares the arcade image directory
$stylevar['imgdir_arcade'] = "images/arcade";
$arcade_result = $DB_site->query("SELECT shortname,title,gamesettings,highscorerid,highscore,miniimage,gameid FROM " . TABLE_PREFIX . "games ");
while ($arcade = $DB_site->fetch_array($arcade_result)){
if (($arcade[gamesettings] & $_GAMESCHECK['showaward'])){
$awards[$arcade[shortname]]['userid'] = $arcade['highscorerid'];
$awards[$arcade[shortname]]['gametitle'] = $arcade['title'];
$awards[$arcade[shortname]]['icon'] = $arcade['miniimage'];
$awards[$arcade[shortname]]['highscore'] = $arcade['highscore'];
$awards[$arcade[shortname]]['gameid'] = $arcade['gameid'];
}
}
}
// ###################### Start getreputationimage #######################
function fetch_reputation_image(&$post)
{
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
function construct_postbit($post, $maintemplatename = 'postbit', $alternate = '')
{
// sorts through all the stuff to return the postbit template
// arcade
global $awards,$arcadegeneral;
// user
global $bbuserinfo, $session, $ignore, $permissions, $_REQUEST;
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
}
if ($arcadegeneral['awardson']==1) {
foreach ($awards as $key => $award) {
if ($award['userid']==$post['userid']) {
eval('$post[\'arcadeawards\'] .= "' . fetch_template('arcade_awards_bit') . '";');
}
}
}
$show['messageicon'] = iif($post['iconpath'], true, false);
In includes/init.php:
Code:
'stylecache',
'arcadesettings'
), $specialtemplates);
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
// get $arcadesettings
case 'arcadesettings':
$arcadesettings = $storeitem['data'];
break;
// get $usergroupcache array
case 'usergroupcache':
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
// ### INSERT PLUGIN USERGROUP PERMISSIONS BITFIELDS HERE ###
// ----------------------------------------------------------
$_BITFIELD['usergroup']['arcadepermissions'] = array(
'canviewarcade' => 1,
'canplayarcade' => 2,
'caneditscores' => 4,
'candelscores' => 8,
'canmakecomments' => 16
);
// ----------------------------------------------------------
// ### END PLUGIN USERGROUP PERMISSIONS BITFIELDS HERE ###
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
'warnall' => 131072
);
$_ARCADE = array(
'active' => 1,
'netplay' => 2,
'awardson' => 4,
'quickreg' => 8,
'autoprune' => 16,
'highonly' => 32,
'vbcodeon' => 64,
'imgcodeon' => 128,
'smilieson' => 256,
'allowemail' => 512,
'challengescores' => 1024
);
$_ARCADEUSER = array(
'firstvisit' => 1,
'settingschecked' => 2,
'allowchallenges' => 4,
'allowemails' => 8
);
$_GAMESCHECK = array(
'active' => 1,
'netplay' => 2,
'playpanel' => 4,
'challenabled' => 8,
'showaward' => 16
);
In includes/functions_online.php:
Code:
break;
case 'arcade':
$userinfo['action'] = 'In the Arcade';
$userinfo['where'] = "<a href=\"arcade.php?$session[sessionurl]\">$vboptions[bbtitle] Arcade</a>";
break;
default:
if ($permissions['wolpermissions'] & CANWHOSONLINEBAD)
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
break;
case 'arcade.php':
$userinfo['activity'] = 'arcade';
break;
default:
$userinfo['activity'] = 'unknown';
}
In global.php:
Code:
echo "End call of global.php: $aftertime\n";
echo "\n<hr />\n\n";
}
// Creates general settings for the Arcade
$arcadegeneral = convert_bits_to_array($arcadesettings,$_ARCADE);
$arcadeuser = convert_bits_to_array($bbuserinfo['arcadesettings'],$_ARCADEUSER);
$arcadepermissions = convert_bits_to_array($permissions['arcadepermissions'],$_BITFIELD['usergroup']['arcadepermissions']);
In profile.php:
Code:
'editarcade' => array(
'modifyarcade'
),
'editavatar' => array(
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
// ############################################################################
// ########################### ARCADE USER OPTIONS ############################
// ############################################################################
if ($_REQUEST['do'] == 'editarcade')
{
$checked = array();
// current values as checked
foreach ($arcadeuser as $key => $value) {
if ($value == 1) {
$checked[$key] = HTML_CHECKED;
}
}
construct_usercp_nav();
$templatename = "modifyarcade";
}
// ############################################################################
// ############################### EDIT OPTIONS ###############################
// ############################################################################
<<< SKIPPING TO NEXT HACK IN SAME FILE >>>
// ############################## start update arcade #################################
if ($_POST['do'] == 'updatearcade')
{
require_once('./includes/functions_misc.php');
// globalize here
$_POST['arcade']['firstvisit'] = 0;
$_POST['arcade']['settingschecked'] = 1;
$userSettings = &$_POST['arcade'];
$userBits = convert_array_to_bits($userSettings,$_ARCADEUSER);
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user SET
arcadesettings = $userBits
WHERE userid = $bbuserinfo[userid]
");
$url = "arcade.php?do=main";
eval(print_standard_redirect('redirect_updatethanks'));
}
// ############################### start update options ###############################
In showthread.php:
Code:
'pollresult',
'arcade_awards_bit',
);
Again, very sorry for the long post, but this is becoming very frustrating.
I sincerely appreciate all the help.