View Single Post
  #1292  
Old 02-16-2004, 01:53 PM
sifuhall sifuhall is offline
 
Join Date: Nov 2001
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01644 seconds
  • Memory Usage 1,811KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete