SMF Arcade

Started by niko, October 01, 2004, 02:45:55 PM

Previous topic - Next topic

Fiery

Quote from: tentronik on August 13, 2005, 09:49:38 PM
So please you didnt answered this yet.
Which version you using of SMF and which version of the mod you try to install?
Then just past the arcade array behind the array as i posted in the howto.
If you post parts of the script please post all relevant pasrt. This is the function before and a few lines after the script where you trieng to implement the additions.

And if you get errors please post the error message completely as found in your error log.

UPDATE:
The line 1100 is not correspondenting with mine managa permissions file.
How big in filesize is your file?

And did you checked if its right place?
Do you used the right untouched original script ?


I am not worried about the errors in the error log.  I am worried about trying to get access to the permissions section.  I am running SMF 1.0.5, Arcade 1.2.3

I downloaded and compared it to the SMF 1.0.5 manage permissions file (the original non modified version)


That is my entire permissions section:

<?php
/******************************************************************************
* ManagePermissions.php                                                       *
*******************************************************************************
* SMF: Simple Machines Forum                                                  *
* Open-Source Project Inspired by Zef Hemel ([email protected])                *
* =========================================================================== *
* Software Version:           SMF 1.0                                         *
* Software by:                Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by:     Lewis Media (http://www.lewismedia.com)         *
* Support, News, Updates at:  http://www.simplemachines.org                   *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it     *
* under the terms of the provided license as published by Lewis Media.        *
*                                                                             *
* This program is distributed in the hope that it is and will be useful,      *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
* See the "license.txt" file for details of the Simple Machines license.      *
* The latest version can always be found at http://www.simplemachines.org.    *
******************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');

// Function for displaying all members with specific permissions;
function SpecificPermissions()
{
global $context$txt$db_prefix$scripturl;

$context['sub_template'] = 'member_specific';
$context['page_title'] = $txt['permission_bymember'];

$context['permissions'] = array();

// Get all the counts for allow permissions
$request db_query("
SELECT COUNT(mp.permission) AS allow, mp.ID_MEMBER, mem.realName
FROM 
{$db_prefix}member_permissions AS mp
LEFT JOIN 
{$db_prefix}members AS mem ON (mem.ID_MEMBER = mp.ID_MEMBER)
WHERE mp.addDeny = 1
GROUP BY mp.ID_MEMBER"
__FILE____LINE__);
while ($row mysql_fetch_assoc($request))
$context['permissions'][$row['ID_MEMBER']] = array(
'name' => '<a href="' $scripturl '?action=profile;u=' $row['ID_MEMBER'] . '">' $row['realName'] . '</a>',
'link' => '<a href="' $scripturl '?action=profile;u=' $row['ID_MEMBER'] . ';sa=showPermissions">' $txt['permissions_modify'] . '</a>',
'deny' => 0,
'allow' => $row['allow']
);
mysql_free_result($request);

// Same again but for deny!
$request db_query("
SELECT COUNT(mp.permission) AS deny, mp.ID_MEMBER, mem.realName
FROM 
{$db_prefix}member_permissions AS mp
LEFT JOIN 
{$db_prefix}members AS mem ON (mem.ID_MEMBER = mp.ID_MEMBER)
WHERE mp.addDeny = 0
GROUP BY mp.ID_MEMBER"
__FILE____LINE__);
while ($row mysql_fetch_assoc($request))
{
if (!isset($context['permissions'][$row['ID_MEMBER']]))
$context['permissions'][$row['ID_MEMBER']] = array(
'name' => '<a href="' $scripturl '?action=profile;u=' $row['ID_MEMBER'] . '">' $row['realName'] . '</a>',
'link' => '<a href="' $scripturl '?action=profile;u=' $row['ID_MEMBER'] . ';sa=showPermissions">' $txt['permissions_modify'] . '</a>',
'deny' => $row['deny'],
'allow' => 0
);
else
$context['permissions'][$row['ID_MEMBER']]['deny'] = $row['deny'];
}
mysql_free_result($request);

obExit();
}
function 
ModifyPermissions()
{
isAllowedTo('manage_permissions');

adminIndex('edit_permissions');

loadTemplate('ManagePermissions');
loadLanguage('ManagePermissions');

$subActions = array(
'quick' => 'SetQuickGroups',
'mspecific' => 'SpecificPermissions',
'quickboard' => 'SetQuickBoards',
'modify' => 'ModifyMembergroup',
'modify2' => 'ModifyMembergroup2',
'switch' => 'SwitchBoard',
);

if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]))
{
$sa $subActions[$_REQUEST['sa']];
unset($subActions);

$sa();
}
else
PermissionIndex();
}

function 
PermissionIndex()
{
global $db_prefix$txt$scripturl$context$settings;

$context['page_title'] = $txt['permissions_title'];

// Load all the permissions. We'll need them in the template.
loadAllPermissions();

// Determine the number of ungrouped members.
$request db_query("
SELECT COUNT(ID_MEMBER)
FROM 
{$db_prefix}members
WHERE ID_GROUP = 0"
__FILE____LINE__);
list ($num_members) = mysql_fetch_row($request);
mysql_free_result($request);

// Fill the context variable with 'Guests' and 'Ungrouped Members'.
$context['groups'] = array(
-=> array(
'id' => -1,
'name' => $txt['membergroups_guests'],
'num_members' => $txt['membergroups_guests_na'],
'allow_delete' => false,
'allow_modify' => true,
'can_search' => false,
'href' => '',
'link' => '',
'is_post_group' => false,
'color' => '',
'stars' => '',
'num_permissions' => array(
'allowed' => 0,
'denied' => 0
),
'access' => false
),
=> array(
'id' => 0,
'name' => $txt['membergroups_members'],
'num_members' => $num_members,
'allow_delete' => false,
'allow_modify' => true,
'can_search' => true,
'href' => $scripturl '?action=viewmembers;sa=query;params=' base64_encode('ID_GROUP = 0'),
'link' => '<a href="' $scripturl '?action=viewmembers;sa=query;params=' base64_encode('ID_GROUP = 0') . '">' $num_members '</a>',
'is_post_group' => false,
'color' => '',
'stars' => '',
'num_permissions' => array(
'allowed' => 0,
'denied' => 0
),
'access' => false
),
);

// Query the database defined membergroups.
$query db_query("
SELECT mg.ID_GROUP, mg.groupName, mg.minPosts, mg.onlineColor, mg.stars, COUNT(mem.ID_MEMBER) AS num_members
FROM 
{$db_prefix}membergroups AS mg
LEFT JOIN 
{$db_prefix}members AS mem ON (mem.ID_GROUP = mg.ID_GROUP OR FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR mg.ID_GROUP = mem.ID_POST_GROUP)
GROUP BY mg.ID_GROUP
ORDER BY mg.minPosts, IF(mg.ID_GROUP < 4, mg.ID_GROUP, 4), mg.groupName"
__FILE____LINE__);
while ($row mysql_fetch_assoc($query))
{
$row['stars'] = explode('#'$row['stars']);
$context['groups'][$row['ID_GROUP']] = array(
'id' => $row['ID_GROUP'],
'name' => $row['groupName'],
'num_members' => $row['ID_GROUP'] != $row['num_members'] : $txt['membergroups_guests_na'],
'allow_delete' => $row['ID_GROUP'] > 4,
'allow_modify' => $row['ID_GROUP'] > 1,
'can_search' => $row['ID_GROUP'] != 3,
'href' => $scripturl '?action=viewmembers;sa=query;params=' base64_encode($row['minPosts'] == -"ID_GROUP = $row[ID_GROUP] OR FIND_IN_SET($row[ID_GROUP], additionalGroups)" "ID_POST_GROUP = $row[ID_GROUP]"),
'link' => '<a href="' $scripturl '?action=viewmembers;sa=query;params=' base64_encode($row['minPosts'] == -"ID_GROUP = $row[ID_GROUP] OR FIND_IN_SET($row[ID_GROUP], additionalGroups)" "ID_POST_GROUP = $row[ID_GROUP]") . '">' $row['num_members'] . '</a>',
'is_post_group' => $row['minPosts'] != -1,
'color' => empty($row['onlineColor']) ? '' $row['onlineColor'],
'stars' => !empty($row['stars'][0]) && !empty($row['stars'][1]) ? str_repeat('<img src="' $settings['images_url'] . '/' $row['stars'][1] . '" alt="*" border="0" />'$row['stars'][0]) : '',
'num_permissions' => array(
'allowed' => $row['ID_GROUP'] == '(' $txt['permissions_all'] . ')' 0,
'denied' => $row['ID_GROUP'] == '(' $txt['permissions_none'] . ')' 0
),
'access' => false
);
}
mysql_free_result($query);

$board_groups = array();
foreach ($context['groups'] as $group)
if ($group['allow_modify'])
$board_groups[$group['id']] = array(
'id' => &$group['id'],
'name' => &$group['name'],
'num_permissions' => array(
'allowed' => 0,
'denied' => 0
),
);

if (empty($_REQUEST['boardid']))
{
$request db_query("
SELECT b.ID_BOARD, b.name, COUNT(mods.ID_MEMBER) AS moderators, b.memberGroups, b.use_local_permissions, b.childLevel
FROM 
{$db_prefix}boards AS b, {$db_prefix}categories AS c
LEFT JOIN 
{$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD)
WHERE c.ID_CAT = b.ID_CAT
GROUP BY b.ID_BOARD
ORDER BY c.catOrder, b.boardOrder"
__FILE____LINE__);
$context['boards'] = array();
while ($row mysql_fetch_assoc($request))
{
$row['memberGroups'] = explode(','$row['memberGroups']);
$context['boards'][$row['ID_BOARD']] = array(
'id' => $row['ID_BOARD'],
'child_level' => $row['childLevel'],
'name' => $row['name'],
'num_moderators' => $row['moderators'],
'public' => in_array(0$row['memberGroups']) || in_array(-1$row['memberGroups']),
'membergroups' => $row['memberGroups'],
'use_local_permissions' => $row['use_local_permissions'] == 1,
'groups' => $board_groups
);
}
mysql_free_result($request);

$request db_query("
SELECT ID_GROUP, COUNT(permission) AS numPermissions, addDeny
FROM 
{$db_prefix}permissions
GROUP BY ID_GROUP, addDeny"
__FILE____LINE__);
while ($row mysql_fetch_assoc($request))
if (isset($context['groups'][(int) $row['ID_GROUP']]))
$context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' 'allowed'] = $row['numPermissions'];
mysql_free_result($request);

$request db_query("
SELECT ID_BOARD, ID_GROUP, COUNT(permission) AS numPermissions, addDeny
FROM 
{$db_prefix}board_permissions
GROUP BY ID_BOARD, ID_GROUP, addDeny"
__FILE____LINE__);
while ($row mysql_fetch_assoc($request))
{
if ($row['ID_BOARD'] == 0)
{
if (isset($context['groups'][(int) $row['ID_GROUP']]))
$context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' 'allowed'] += $row['numPermissions'];
}
elseif (isset($context['boards'][$row['ID_BOARD']]) && isset($context['boards'][$row['ID_BOARD']]['groups'][(int) $row['ID_GROUP']]))
$context['boards'][$row['ID_BOARD']]['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' 'allowed'] = $row['numPermissions'];
}
mysql_free_result($request);
}
else
{
$_REQUEST['boardid'] = (int) $_REQUEST['boardid'];

$request db_query("
SELECT ID_BOARD, ID_GROUP, COUNT(permission) AS numPermissions, addDeny
FROM 
{$db_prefix}board_permissions
WHERE ID_BOARD = 
$_REQUEST[boardid]
GROUP BY ID_BOARD, ID_GROUP, addDeny"
__FILE____LINE__);
while ($row mysql_fetch_assoc($request))
{
if (isset($context['groups'][(int) $row['ID_GROUP']]))
$context['groups'][(int) $row['ID_GROUP']]['num_permissions'][empty($row['addDeny']) ? 'denied' 'allowed'] += $row['numPermissions'];
}
mysql_free_result($request);

$context['board'] = array(
'id' => $_REQUEST['boardid']
);

// Load all the boards that we can set permissions off...
$request db_query("
SELECT ID_BOARD, name
FROM 
{$db_prefix}boards
WHERE ID_BOARD != 
$_REQUEST[boardid]
AND use_local_permissions = 1"
__FILE____LINE__);
$context['boards'] = array();
while ($row mysql_fetch_assoc($request))
$context['copy_boards'][] = array(
'id' => $row['ID_BOARD'],
'name' => $row['name']
);
mysql_free_result($request);

$request db_query("
SELECT name, memberGroups
FROM 
{$db_prefix}boards
WHERE ID_BOARD = 
$_REQUEST[boardid]
LIMIT 1"
__FILE____LINE__);
list ($context['board']['name'], $groups) = mysql_fetch_row($request);
mysql_free_result($request);

$groups explode(','$groups);
foreach ($groups as $group)
{
if ($group !== '' && isset($context['groups'][(int) $group]))
$context['groups'][(int) $group]['access'] = true;
}
}
}

function 
SetQuickGroups()
{
global $db_prefix;

checkSession();

// Make sure only one of the quick options was selected.
if ((!empty($_POST['predefined']) && ((isset($_POST['copy_from']) && $_POST['copy_from'] != 'empty') || !empty($_POST['permissions']))) || (!empty($_POST['copy_from']) && $_POST['copy_from'] != 'empty' && !empty($_POST['permissions'])))
fatal_lang_error('permissions_only_one_option');

if (empty($_POST['group']) || !is_array($_POST['group']))
$_POST['group'] = array();

// Only accept numeric values for selected membergroups.
foreach ($_POST['group'] as $id => $group_id)
$_POST['group'][$id] = (int) $group_id;
$_POST['group'] = array_unique($_POST['group']);

if (empty($_REQUEST['boardid']))
$_REQUEST['boardid'] = 0;
else
$_REQUEST['boardid'] = (int) $_REQUEST['boardid'];

if (isset($_POST['access']))
{
foreach ($_POST['access'] as $k => $v)
$_POST['access'][$k] = (int) $v;
$access implode(','$_POST['access']);
}
else
$access '';

db_query("
UPDATE 
{$db_prefix}boards
SET memberGroups = '
$access'
WHERE ID_BOARD = 
$_REQUEST[boardid]
LIMIT 1"
__FILE____LINE__);

// No groups where selected.
if (empty($_POST['group']))
redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);

// Set a predefined permission profile.
if (!empty($_POST['predefined']))
{
// Make sure it's a predefined permission set we expect.
if (!in_array($_POST['predefined'], array('restrict''standard''moderator''maintenance')))
redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);

foreach ($_POST['group'] as $group_id)
{
if (!empty($_REQUEST['boardid']))
setPermissionLevel($_POST['predefined'], $group_id$_REQUEST['boardid']);
else
setPermissionLevel($_POST['predefined'], $group_id);
}
}
// Set the permissions of the selected groups to that of their permissions in a different board.
elseif (isset($_POST['from_board']) && $_POST['from_board'] != 'empty')
{
// Just checking the input.
if (!is_numeric($_POST['from_board']))
redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);

// Fetch all the board permissions for these groups.
$request db_query("
SELECT ID_GROUP, permission, addDeny
FROM 
{$db_prefix}board_permissions
WHERE ID_BOARD = 
$_POST[from_board]
AND ID_GROUP IN (" 
implode(','$_POST['group']) . ")"__FILE____LINE__);

$target_perms = array();
while ($row mysql_fetch_assoc($request))
$target_perms[] = "('$row[permission]', $row[ID_GROUP]$_REQUEST[boardid]$row[addDeny])";
mysql_free_result($request);

// Delete the previous global board permissions...
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP IN (" 
implode(', '$_POST['group']) . ")
AND ID_BOARD = 
$_REQUEST[boardid]"__FILE____LINE__);

// And insert the copied permissions.
if (!empty($target_perms))
{
db_query("
INSERT IGNORE INTO 
{$db_prefix}board_permissions
(permission, ID_GROUP, ID_BOARD, addDeny)
VALUES " 
implode(','$target_perms), __FILE____LINE__);
}
}
// Set a permission profile based on the permissions of a selected group.
elseif ($_POST['copy_from'] != 'empty')
{
// Just checking the input.
if (!is_numeric($_POST['copy_from']))
redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);

// Make sure the group we're copying to is never included.
$_POST['group'] = array_diff($_POST['group'], array($_POST['copy_from']));

// No groups left? Too bad.
if (empty($_POST['group']))
redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);

if (empty($_REQUEST['boardid']))
{
// Retrieve current permissions of group.
$request db_query("
SELECT permission, addDeny
FROM 
{$db_prefix}permissions
WHERE ID_GROUP = 
$_POST[copy_from]"__FILE____LINE__);
$target_perm = array();
while ($row mysql_fetch_assoc($request))
$target_perm[$row['permission']] = $row['addDeny'];
mysql_free_result($request);

$insert_string '';
foreach ($_POST['group'] as $group_id)
foreach ($target_perm as $perm => $addDeny)
$insert_string .= "('$perm', $group_id$addDeny),";

// Delete the previous permissions...
db_query("
DELETE FROM 
{$db_prefix}permissions
WHERE ID_GROUP IN (" 
implode(', '$_POST['group']) . ")"__FILE____LINE__);

if (!empty($insert_string))
{
// Cut off the last comma.
$insert_string substr($insert_string0, -1);

// ..and insert the new ones.
db_query("
INSERT IGNORE INTO 
{$db_prefix}permissions
(permission, ID_GROUP, addDeny)
VALUES 
$insert_string"__FILE____LINE__);
}
}

// Now do the same for the board permissions.
$request db_query("
SELECT permission, addDeny
FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP = 
$_POST[copy_from]
AND ID_BOARD = 
$_REQUEST[boardid]"__FILE____LINE__);
$target_perm = array();
while ($row mysql_fetch_assoc($request))
$target_perm[$row['permission']] = $row['addDeny'];
mysql_free_result($request);

$insert_string '';
foreach ($_POST['group'] as $group_id)
foreach ($target_perm as $perm => $addDeny)
$insert_string .= "('$perm', $group_id$_REQUEST[boardid]$addDeny),";

// Delete the previous global board permissions...
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP IN (" 
implode(', '$_POST['group']) . ")
AND ID_BOARD = 
$_REQUEST[boardid]"__FILE____LINE__);

// And insert the copied permissions.
if (!empty($insert_string))
{
$insert_string substr($insert_string0, -1);

db_query("
INSERT IGNORE INTO 
{$db_prefix}board_permissions
(permission, ID_GROUP, ID_BOARD, addDeny)
VALUES 
$insert_string"__FILE____LINE__);
}
}
// Set or unset a certain permission for the selected groups.
elseif (!empty($_POST['permissions']))
{
// Unpack two variables that were transported.
list ($permissionType$permission) = explode('/'$_POST['permissions']);

// Check whether our input is within expected range.
if (!in_array($_POST['add_remove'], array('add''clear''deny')) || !in_array($permissionType, array('membergroup''board')))
redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);

if ($_POST['add_remove'] == 'clear')
{
if ($permissionType == 'membergroup')
db_query("
DELETE FROM 
{$db_prefix}permissions
WHERE ID_GROUP IN (" 
implode(', '$_POST['group']) . ")
AND permission = '
$permission'"__FILE____LINE__);
else
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP IN (" 
implode(', '$_POST['group']) . ")
AND ID_BOARD = 
$_REQUEST[boardid]
AND permission = '
$permission'"__FILE____LINE__);
}
// Add a permission (either 'set' or 'deny').
else
{
$addDeny $_POST['add_remove'] == 'add' '1' '0';
if ($permissionType == 'membergroup')
db_query("
REPLACE INTO 
{$db_prefix}permissions
(permission, ID_GROUP, addDeny)
VALUES
('
$permission', " implode(", $addDeny),
('
$permission', "$_POST['group']) . ", $addDeny)"__FILE____LINE__);
// Board permissions go into the other table.
else
db_query("
REPLACE INTO 
{$db_prefix}board_permissions
(permission, ID_GROUP, ID_BOARD, addDeny)
VALUES
('
$permission', " implode(", $_REQUEST[boardid]$addDeny),
('
$permission', "$_POST['group']) . ", $_REQUEST[boardid]$addDeny)"__FILE____LINE__);
}
}

redirectexit('action=permissions;boardid=' $_REQUEST['boardid']);
}

// Switch a board from local to global permissions or v.v.
function SwitchBoard()
{
global $db_prefix;

// Security above all.
checkSession('get');
validateSession();
$_GET['boardid'] = (int) $_GET['boardid'];

// Make sure the board exists and can be switched to $_GET['to'].
$request db_query("
SELECT ID_BOARD
FROM 
{$db_prefix}boards
WHERE ID_BOARD = 
$_GET[boardid]
AND use_local_permissions = " 
. ($_GET['to'] == 'local' '0' '1') . "
LIMIT 1"
__FILE____LINE__);
if (mysql_num_rows($request) != 1)
{
if ($_GET['to'] == 'local')
PermissionIndex();
else
redirectexit('action=permissions');
return;
}
mysql_free_result($request);

// Copy the global permissions to the specific board.
if ($_GET['to'] == 'local')
{
$request db_query("
SELECT ID_GROUP, permission, addDeny
FROM 
{$db_prefix}board_permissions
WHERE ID_BOARD = 0"
__FILE____LINE__);
$insertRows = array();
while ($row mysql_fetch_assoc($request))
$insertRows[] = "($row[ID_GROUP]$_GET[boardid], '$row[permission]', $row[addDeny])";
mysql_free_result($request);

// Reset the current local permissions.
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_BOARD = 
$_GET[boardid]"__FILE____LINE__);

if (!empty($insertRows))
db_query("
INSERT INTO 
{$db_prefix}board_permissions
(ID_GROUP, ID_BOARD, permission, addDeny)
VALUES " 
implode(",
"
$insertRows), __FILE____LINE__);
}

// Switch back to inherited permissions (delete all local permissions).
else
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_BOARD = 
$_GET[boardid]"__FILE____LINE__);

// Update the board setting.
db_query("
UPDATE 
{$db_prefix}boards
SET use_local_permissions = " 
. ($_GET['to'] == 'local' '1' '0') . "
WHERE ID_BOARD = 
$_GET[boardid]"__FILE____LINE__);

if ($_GET['to'] == 'local')
PermissionIndex();
else
redirectexit('action=permissions');
}

function 
ModifyMembergroup()
{
global $db_prefix$context$txt;

$context['group']['id'] = (int) $_GET['id'];

loadAllPermissions();

if ($context['group']['id'] > 0)
{
$result db_query("
SELECT groupName
FROM 
{$db_prefix}membergroups
WHERE ID_GROUP = 
{$context['group']['id']}
LIMIT 1"
__FILE____LINE__);
list ($context['group']['name']) = mysql_fetch_row($result);
mysql_free_result($result);
}
elseif ($context['group']['id'] == -1)
$context['group']['name'] = &$txt['membergroups_guests'];
else
$context['group']['name'] = &$txt['membergroups_members'];

$context['board']['id'] = empty($_GET['boardid']) ? : (int) $_GET['boardid'];
$context['local'] = !empty($_GET['boardid']);

if ($context['local'])
{
$request db_query("
SELECT name
FROM 
{$db_prefix}boards
WHERE ID_BOARD = 
{$context['board']['id']}
AND use_local_permissions = 1"
__FILE____LINE__);
// Either the board was not found or the permissions are set to global.
if (mysql_num_rows($request) == 0)
fatal_lang_error('smf232');
list ($context['board']['name']) = mysql_fetch_row($request);
mysql_free_result($request);
}

// Fetch the current permissions.
$permissions = array(
'membergroup' => array('allowed' => array(), 'denied' => array()),
'board' => array('allowed' => array(), 'denied' => array())
);
if ($context['group']['id'] != && !$context['local'])
{
$result db_query("
SELECT permission, addDeny
FROM 
{$db_prefix}permissions
WHERE ID_GROUP = 
$_GET[id]"__FILE____LINE__);
while ($row mysql_fetch_assoc($result))
$permissions['membergroup'][empty($row['addDeny']) ? 'denied' 'allowed'][] = $row['permission'];
mysql_free_result($result);
$context['permissions']['membergroup']['show'] = true;
}
else
$context['permissions']['membergroup']['show'] = false;

// Fetch current board permissions.
$result db_query("
SELECT permission, addDeny
FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP = 
{$context['group']['id']}
AND ID_BOARD = 
{$context['board']['id']}"__FILE____LINE__);

while ($row mysql_fetch_assoc($result))
$permissions['board'][empty($row['addDeny']) ? 'denied' 'allowed'][] = $row['permission'];
mysql_free_result($result);
$context['permissions']['board']['show'] = true;

// Loop through each permission and set whether it's checked.
foreach ($context['permissions'] as $permissionType => $tmp)
{
foreach ($tmp['columns'] as $position => $permissionGroups)
{
foreach ($permissionGroups as $permissionGroup => $permissionArray)
{
foreach ($permissionArray['permissions'] as $perm)
{
// Create a shortcut for the current permission.
$curPerm = &$context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm['id']];
if ($perm['has_own_any'])
{
$curPerm['any']['select'] = in_array($perm['id'] . '_any'$permissions[$permissionType]['allowed']) ? 'on' : (in_array($perm['id'] . '_any'$permissions[$permissionType]['denied']) ? 'denied' 'off');
$curPerm['own']['select'] = in_array($perm['id'] . '_own'$permissions[$permissionType]['allowed']) ? 'on' : (in_array($perm['id'] . '_own'$permissions[$permissionType]['denied']) ? 'denied' 'off');
}
else
$curPerm['select'] = in_array($perm['id'], $permissions[$permissionType]['denied']) ? 'denied' : (in_array($perm['id'], $permissions[$permissionType]['allowed']) ? 'on' 'off');
}
}
}
}
$context['sub_template'] = 'modify_group';
$context['page_title'] = $txt['permissions_modify_group'];
}

function 
ModifyMembergroup2()
{
global $db_prefix;

checkSession();

$_GET['id'] = (int) $_GET['id'];
$_GET['boardid'] = (int) $_GET['boardid'];

$givePerms = array('membergroup' => array(), 'board' => array());

// Prepare all permissions that were set or denied for addition to the DB.
foreach ($_POST['perm'] as $perm_type => $perm_array)
foreach ($perm_array as $permission => $value)
if ($value == 'on' || $value == 'deny')
$givePerms[$perm_type][] = "$permission', " . ($value == 'on' '1' '0');

// Insert the general permissions.
if ($_GET['id'] != && empty($_GET['boardid']))
{
db_query("
DELETE FROM 
{$db_prefix}permissions
WHERE ID_GROUP = 
$_GET[id]"__FILE____LINE__);
if (!empty($givePerms['membergroup']))
db_query("
INSERT IGNORE INTO 
{$db_prefix}permissions
(ID_GROUP, permission, addDeny)
VALUES (
$_GET[id], '" implode("),
(
$_GET[id], '"$givePerms['membergroup']) . ")"__FILE____LINE__);
}

// Insert the boardpermissions.
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP = 
$_GET[id]
AND ID_BOARD = 
$_GET[boardid]"__FILE____LINE__);
if (!empty($givePerms['board']))
db_query("
INSERT IGNORE INTO 
{$db_prefix}board_permissions
(ID_GROUP, ID_BOARD, permission, addDeny)
VALUES (
$_GET[id]$_GET[boardid], '" implode("),
(
$_GET[id]$_GET[boardid], '"$givePerms['board']) . ")"__FILE____LINE__);

redirectexit('action=permissions;boardid=' $_GET['boardid']);
}

// Set the permission level for a specific board, group, or group for a board.
function setPermissionLevel($level$group$board 'null')
{
global $db_prefix;

// Levels by group... restrict, standard, moderator, maintenance.
$groupLevels = array(
'board' => array('inherit' => array()),
'group' => array('inherit' => array())
);
// Levels by board... standard, publish, free.
$boardLevels = array('inherit' => array());

// Restrictive - ie. guests.
$groupLevels['global']['restrict'] = array(
'search_posts',
'calendar_view',
'view_stats',
'who_view',
'profile_view_own',
'profile_identity_own',
);
$groupLevels['board']['restrict'] = array(
'poll_view',
'post_new',
'post_reply_own',
'post_reply_any',
'remove_own',
'modify_own',
'mark_any_notify',
'mark_notify',
'report_any',
'send_topic',
);

// Standard - ie. members.  They can do anything Restrictive can.
$groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(
'view_mlist',
'karma_edit',
'pm_read',
'pm_send',
'profile_view_any',
'profile_extra_own',
'profile_remote_avatar',
'profile_remove_own',
));
$groupLevels['board']['standard'] = array_merge($groupLevels['board']['restrict'], array(
'poll_vote',
'poll_edit_own',
'poll_post',
'poll_add_own',
'post_attachment',
'lock_own',
'delete_own',
'view_attachments',
));

// Moderator - ie. moderators :P.  They can do what standard can, and more.
$groupLevels['global']['moderator'] = array_merge($groupLevels['global']['standard'], array(
'calendar_post',
'calendar_edit_own',
));
$groupLevels['board']['moderator'] = array_merge($groupLevels['board']['standard'], array(
'make_sticky',
'make_gsticky',
'poll_edit_any',
'remove_any',
'modify_any',
'lock_any',
'delete_any',
'move_any',
'merge_any',
'split_any',
'poll_lock_any',
'poll_remove_any',
'poll_add_any',
));

// Maintenance - wannabe admins.  They can do almost everything.
$groupLevels['global']['maintenance'] = array_merge($groupLevels['global']['moderator'], array(
'manage_attachments',
'manage_smileys',
'manage_boards',
'moderate_forum',
'manage_membergroups',
'manage_bans',
'admin_forum',
'manage_permissions',
'edit_news',
'calendar_edit_any',
'profile_identity_any',
'profile_extra_any',
'profile_title_any',
));
$groupLevels['board']['maintenance'] = array_merge($groupLevels['board']['moderator'], array(
));

// Standard - nothing above the group permissions. (this SHOULD be empty.)
$boardLevels['standard'] = array(
);

// Locked - just that, you can't post here.
$boardLevels['locked'] = array(
'poll_view',
'mark_notify',
'report_any',
'send_topic',
'view_attachments',
);

// Publisher - just a little more...
$boardLevels['publish'] = array_merge($boardLevels['locked'], array(
'post_new',
'post_reply_own',
'post_reply_any',
'remove_own',
'modify_own',
'mark_any_notify',
'remove_replies',
'modify_replies',
'poll_vote',
'poll_edit_own',
'poll_post',
'poll_add_own',
'poll_remove_own',
'post_attachment',
'lock_own',
'delete_own',
));

// Free for All - Scary.  Just scary.
$boardLevels['free'] = array_merge($boardLevels['publish'], array(
'poll_lock_any',
'poll_edit_any',
'poll_add_any',
'poll_remove_any',
'make_sticky',
'make_gsticky',
'lock_any',
'delete_any',
'remove_any',
'split_any',
'merge_any',
'modify_any',
));

// Setting group permissions.
if ($board === 'null' && $group !== 'null')
{
$group = (int) $group;

if (empty($groupLevels['global'][$level]))
return;

db_query("
DELETE FROM 
{$db_prefix}permissions
WHERE ID_GROUP = 
$group"__FILE____LINE__);
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP = 
$group
AND ID_BOARD = 0"
__FILE____LINE__);

db_query("
INSERT INTO 
{$db_prefix}permissions
(ID_GROUP, permission)
VALUES (
$group, '" implode("'),
(
$group, '"$groupLevels['global'][$level]) . "')"__FILE____LINE__);
db_query("
INSERT INTO 
{$db_prefix}board_permissions
(ID_BOARD, ID_GROUP, permission)
VALUES (0, 
$group, '" implode("'),
(0, 
$group, '"$groupLevels['board'][$level]) . "')"__FILE____LINE__);
}
// Setting board permissions for a specific group.
elseif ($board !== 'null' && $group !== 'null')
{
$group = (int) $group;
$board = (int) $board;

if (!empty($groupLevels['global'][$level]))
{
db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_GROUP = 
$group
AND ID_BOARD = 
$board"__FILE____LINE__);
}

if (!empty($groupLevels['board'][$level]))
{
db_query("
INSERT INTO 
{$db_prefix}board_permissions
(ID_BOARD, ID_GROUP, permission)
VALUES (
$board$group, '" implode("'),
(
$board$group, '"$groupLevels['board'][$level]) . "')"__FILE____LINE__);
}
}
// Setting board permissions for all groups.
elseif ($board !== 'null' && $group === 'null')
{
$board = (int) $board;

db_query("
DELETE FROM 
{$db_prefix}board_permissions
WHERE ID_BOARD = 
$board"__FILE____LINE__);

if (empty($boardLevels[$level]))
return;

// Get all the groups...
$query db_query("
SELECT ID_GROUP
FROM 
{$db_prefix}membergroups
WHERE ID_GROUP > 3
ORDER BY minPosts, IF(ID_GROUP < 4, ID_GROUP, 4), groupName"
__FILE____LINE__);
while ($row mysql_fetch_row($query))
{
$group $row[0];

db_query("
INSERT INTO 
{$db_prefix}board_permissions
(ID_BOARD, ID_GROUP, permission)
VALUES (
$board$group, '" implode("'),
(
$board$group, '"$boardLevels[$level]) . "')"__FILE____LINE__);
}
mysql_free_result($query);

// Add permissions for ungrouped users.
db_query("
INSERT INTO 
{$db_prefix}board_permissions
(ID_BOARD, ID_GROUP, permission)
VALUES (
$board, 0, '" implode("'),
(
$board, 0, '"$boardLevels[$level]) . "')"__FILE____LINE__);
}
// $board and $group are both null!
else
fatal_lang_error(1false);
}

function 
loadAllPermissions()
{
global $context$txt;

/*  The format of this list is as follows:
'permission_group' => array(
'permissions_inside' => has_multiple_options,
),

   It should be noted that if the permission_group starts with $ it is not treated as a permission.
   However, if it does not start with $, it is treated as a normal permission.
$txt['permissionname_' . $permission] is used for the names of permissions.
$txt['permissiongroup_' . $group] is used for names of groups that start with $.
$txt['permissionhelp_' . $permission] is used for extended information.
$txt['permissionicon_' . $permission_or_group] is used for the icons, if it exists.
*/

$permissionList = array(
'membergroup' => array(
'general' => array(
'view_stats' => false,
'view_mlist' => false,
'who_view' => false,
'search_posts' => false,
'karma_edit' => false,
),
'pm' => array(
'pm_read' => false,
'pm_send' => false,
),
'calendar' => array(
'calendar_view' => false,
'calendar_post' => false,
'calendar_edit' => true,
),
'maintenance' => array(
'admin_forum' => false,
'manage_boards' => false,
'manage_attachments' => false,
'manage_smileys' => false,
'edit_news' => false,
),
'member_admin' => array(
'moderate_forum' => false,
'manage_membergroups' => false,
'manage_permissions' => false,
'manage_bans' => false,
'send_mail' => false,
),                       'profile' => array(
                                
'profile_view' => true,
                                
'profile_identity' => true,
                                
'profile_extra' => true,
                                
'profile_title' => true,
                                
'profile_remove' => true,
                                
'profile_remote_avatar' => false,
                          
                        ),
'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),


'visual_warn' => array(
'visual_warn_any' => false,
'visual_approve_any' => false,
),
'arcade' => array(
'view_arcade' => true,
'play_arcade' => true,
'submit_score' => true,
'challenge_send' => true,
'challenge_view' => true,
'admin_arcade' => true,
),
'board' => array(
'general_board' => array(
'moderate_board' => false,
),
'topic' => array(
'post_new' => false,
'merge_any' => false,
'split_any' => false,
'send_topic' => false,
'make_sticky' => false,
'make_gsticky' => false,
'move' => true,
'lock' => true,
'delete' => true,
'post_reply' => true,
'modify_replies' => false,
'remove_replies' => false,
'announce_topic' => false,
),
'post' => array(
'remove' => true,
'modify' => true,
'report_any' => false,
),
'poll' => array(
'poll_view' => false,
'poll_vote' => false,
'poll_post' => false,
'poll_add' => true,
'poll_edit' => true,
'poll_lock' => true,
'poll_remove' => true,
),
'notification' => array(
'mark_any_notify' => false,
'mark_notify' => false,
),
'attachment' => array(
'view_attachments' => false,
'post_attachment' => false,
)
)
);

// This is just a helpful array of permissions guests... cannot have.
$non_guest_permissions = array(
'karma_edit',
'pm_read',
'pm_send',
'profile_identity',
'profile_extra',
'profile_title',
'profile_remove',
'profile_remote_avatar',
'poll_vote',
'mark_any_notify',
'mark_notify',
);

// All permission groups that will be shown in the left column.
$leftPermissionGroups = array(
'general',
'calendar',
'maintenance',
'member_admin',
'general_board',
'topic',
'post',
);

$context['permissions'] = array();
foreach ($permissionList as $permissionType => $permissionGroups)
{
$context['permissions'][$permissionType] = array(
'id' => $permissionType,
'columns' => array(
'left' => array(),
'right' => array()
)
);
foreach ($permissionGroups as $permissionGroup => $permissionArray)
{
$position in_array($permissionGroup$leftPermissionGroups) ? 'left' 'right';
$context['permissions'][$permissionType]['columns'][$position][$permissionGroup] = array(
'type' => $permissionType,
'id' => $permissionGroup,
'name' => &$txt['permissiongroup_' $permissionGroup],
'icon' => isset($txt['permissionicon_' $permissionGroup]) ? $txt['permissionicon_' $permissionGroup] : $txt['permissionicon'],
$txt['permissionhelp_' $permissionGroup] : '',
'permissions' => array()
);

foreach ($permissionArray as $perm => $has_own_any)
{
if (isset($context['group']['id']) && $context['group']['id'] == -&& in_array($perm$non_guest_permissions))
continue;

$context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm] = array(
'id' => $perm,
'name' => &$txt['permissionname_' $perm],
'show_help' => isset($txt['permissionhelp_' $perm]),
'has_own_any' => $has_own_any,
'own' => array(
'id' => $perm '_own',
'name' => $has_own_any $txt['permissionname_' $perm '_own'] : ''
),
'any' => array(
'id' => $perm '_any',
'name' => $has_own_any $txt['permissionname_' $perm '_any'] : ''
)
);
}

if (empty($context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions']))
unset($context['permissions'][$permissionType]['columns'][$position][$permissionGroup]);
}
}
}

?>















my error is the ); right after the

'attachment' => array(
            'view_attachments' => false,
            'post_attachment' => false,

tentronik

Ok basicly i dont know for sure if 1.05 running with 1.2.3.
There are other releases in the mod database here.
But i guessing this is why you have trouble so.

I in your position would upgrade the forum to 1.1.beta3.p and then try everything again :))

Fiery

Quote from: tentronik on August 13, 2005, 09:59:58 PM
Ok basicly i dont know for sure if 1.05 running with 1.2.3.
There are other releases in the mod database here.
But i guessing this is why you have trouble so.

I in your position would upgrade the forum to 1.1.beta3.p and then try everything again :))


The problems were originally caused by Arcade 1.1.3.  I tired uninstalling but it doesnt fix.  I guess I can post in the charter section.

Thanks for your help

tentronik

When you download the 1.05 release again and uploading the file again - this should fix it.
Also try to download 1 of theolder releases and try the file from those releases.
Also as i dont know the code for 1.05 i cant help you much and cause the posted code from the file slowing this topic while loading - i suggest to delete it and if you still like attache it as a file again.


tentronik

#1264
Wait i just saw you passted it wrong plz wait.

UPDATE:
Hmm ok nothing try a diffrent arcade release or try upgrading or try support in charter board :)
You did all right.

oldmanwolf

#1265
Change this block:

'maintenance' => array(
'admin_forum' => false,
'manage_boards' => false,
'manage_attachments' => false,
'manage_smileys' => false,
'edit_news' => false,
),
'member_admin' => array(
'moderate_forum' => false,
'manage_membergroups' => false,
'manage_permissions' => false,
'manage_bans' => false,
'send_mail' => false,
),                       'profile' => array(
                                'profile_view' => true,
                                'profile_identity' => true,
                                'profile_extra' => true,
                                'profile_title' => true,
                                'profile_remove' => true,
                                'profile_remote_avatar' => false,
                         
                        ),
'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),


'visual_warn' => array(
'visual_warn_any' => false,
'visual_approve_any' => false,
),
'arcade' => array(
'view_arcade' => true,
'play_arcade' => true,
'submit_score' => true,
'challenge_send' => true,
'challenge_view' => true,
'admin_arcade' => true,
),
'board' => array(


To this:

'maintenance' => array(
'admin_forum' => false,
'manage_boards' => false,
'manage_attachments' => false,
'manage_smileys' => false,
'edit_news' => false,
),
'member_admin' => array(
'moderate_forum' => false,
'manage_membergroups' => false,
'manage_permissions' => false,
'manage_bans' => false,
'send_mail' => false,
),                       'profile' => array(
                                'profile_view' => true,
                                'profile_identity' => true,
                                'profile_extra' => true,
                                'profile_title' => true,
                                'profile_remove' => true,
                                'profile_remote_avatar' => false,
                         
                        ),
'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),
'visual_warn' => array(
'visual_warn_any' => false,
'visual_approve_any' => false,
)
),
'board' => array(


You had two instances of the arcade array, and it was missing the extra ")" closing tag...

There may need to be a , after that second to last ) - but it doesn't seem to matter on mine...

Give that a shot and let us know!

rider

Quote from: pmp6nl on August 13, 2005, 09:07:36 PM
Quote from: tentronik on August 13, 2005, 08:17:34 PM

@pmp6nl no its just 1 - do you encounter managepermissions errors in your forum error log?

Yes I am getting hundreds of error messages.

Also, the manage permissions still does not work.  Can you post yours on here or something, so I can look it over?

Thanks

Have you gone to the arcade site and d/l a copy of the edited manage permissions.php?You can find it in the FAQ section.I'm running smf1.0.5 and arcade ver 1.2.3.Try that and see if it helps.If not pm me your site addi and I can take a look for you.

nokonium

#1267
Quote from: oldmanwolf on August 14, 2005, 12:03:01 AM
and it was missing the extra ")" closing tag...

There may need to be a , after that second to last ) - but it doesn't seem to matter on mine...

Give that a shot and let us know!

So I was right back on page 79  ;)

QuoteI took the permissionlist array apart and came to the conclusion that the problem is caused by the 'arcade' array not being part of the 'membergroup' array. Before you install Arcade the 'membergroup' array and the last child array in it, are closed by the  )  ), following the 'profile' array. I have moved the ) from the 'profile' array to follow the 'arcade' array. Thus 'profile' ends ), and 'arcade' ends ) ),   

The same would go for any mods that have 'membergroup' permissions, their array has to be inside the closing tag for the 'membergroup' array.

If you don't have that closing tag I would assume that you would keep chasing the error down the page.



Fiery

#1268
Quote from: nokonium on August 14, 2005, 02:37:14 AM
Quote from: oldmanwolf on August 14, 2005, 12:03:01 AM
and it was missing the extra ")" closing tag...

There may need to be a , after that second to last ) - but it doesn't seem to matter on mine...

Give that a shot and let us know!

So I was right back on page 79  ;)

QuoteI took the permissionlist array apart and came to the conclusion that the problem is caused by the 'arcade' array not being part of the 'membergroup' array. Before you install Arcade the 'membergroup' array and the last child array in it, are closed by the  )  ), following the 'profile' array. I have moved the ) from the 'profile' array to follow the 'arcade' array. Thus 'profile' ends ), and 'arcade' ends ) ),   

The same would go for any mods that have 'membergroup' permissions, their array has to be inside the closing tag for the 'membergroup' array.

If you don't have that closing tag I would assume that you would keep chasing the error down the page.

Mine looks like:

                      'profile' => array(
                                'profile_view' => true,
                                'profile_identity' => true,
                                'profile_extra' => true,
                                'profile_title' => true,
                                'profile_remove' => true,
                                'profile_remote_avatar' => false,
                         
                        ),
'arcade' => array(
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
'admin_arcade' => false,
),


I tried to change it to:


                      'profile' => array(
                                'profile_view' => true,
                                'profile_identity' => true,
                                'profile_extra' => true,
                                'profile_title' => true,
                                'profile_remove' => true,
                                'profile_remote_avatar' => false,
                         
                        ),
                        'arcade' => array(
                                'view_arcade' => false,
                                'play_arcade' => false,
                                'submit_score' => false,
                                'challenge_send' => false,
                                'challenge_view' => false,
                                'admin_arcade' => false,
                        )
                    ),


and various other movements of the ), ) etc.

none of them seem to fix it :(

oldmanwolf

Did you remove the extra instance of the arcade array?  You've got it twice in yours...  Paste the code I put in exactly over the section of your code I've indicated...

Fiery

#1270
Quote from: oldmanwolf on August 14, 2005, 03:22:33 AM
Did you remove the extra instance of the arcade array?  You've got it twice in yours...  Paste the code I put in exactly over the section of your code I've indicated...

It didnt fix it :(

I am going to bed so I will talk to you later.

Thank you for your help

oldmanwolf

Quote from: pmp6nl on August 14, 2005, 03:33:54 AM
Quote from: oldmanwolf on August 14, 2005, 03:22:33 AM
Did you remove the extra instance of the arcade array?  You've got it twice in yours...  Paste the code I put in exactly over the section of your code I've indicated...

Umm for some reason every time I delete the extra instance it puts it back in automatically????

WTF

???  That's a little bit weird...  Try taking them both out, maybe?  Then it'll just put the one back in, and you'll be good to go!

Fiery

Quote from: oldmanwolf on August 14, 2005, 03:36:44 AM
Quote from: pmp6nl on August 14, 2005, 03:33:54 AM
Quote from: oldmanwolf on August 14, 2005, 03:22:33 AM
Did you remove the extra instance of the arcade array?  You've got it twice in yours...  Paste the code I put in exactly over the section of your code I've indicated...

Umm for some reason every time I delete the extra instance it puts it back in automatically????

WTF

???  That's a little bit weird...  Try taking them both out, maybe?  Then it'll just put the one back in, and you'll be good to go!

I stopped it from auto putting it in, but it didnt fix the error   :(

I am going to bed so I will talk to you later.

Thank you for your help

nokonium

#1273
This is the whole of the Permissionlist array.
        $permissionList = array(
                'membergroup' => array(
                        'general' => array(
                                'view_stats' => false,
                                'view_mlist' => false,
                                'who_view' => false,
                                'search_posts' => false,
                                'karma_edit' => false,
                        ),
                        'pm' => array(
                                'pm_read' => false,
                                'pm_send' => false,
                        ),
                        'calendar' => array(
                                'calendar_view' => false,
                                'calendar_post' => false,
                                'calendar_edit' => true,
                        ),
                        'maintenance' => array(
                                'admin_forum' => false,
                                'manage_boards' => false,
                                'manage_attachments' => false,
                                'manage_smileys' => false,
                                'edit_news' => false,
                        ),
                        'member_admin' => array(
                                'moderate_forum' => false,
                                'manage_membergroups' => false,
                                'manage_permissions' => false,
                                'manage_bans' => false,
                                'send_mail' => false,
                        ),
                        'profile' => array(
                                'profile_view' => true,
                                'profile_identity' => true,
                                'profile_extra' => true,
                                'profile_title' => true,
                                'profile_remove' => true,
                                'profile_remote_avatar' => false,
                        )
                ),
                'board' => array(
                        'general_board' => array(
                                'moderate_board' => false,
                        ),
                        'topic' => array(
                                'post_new' => false,
                                'merge_any' => false,
                                'split_any' => false,
                                'send_topic' => false,
                                'make_sticky' => false,
                                'move' => true,
                                'lock' => true,
                                'delete' => true,
                                'post_reply' => true,
                                'modify_replies' => false,
                                'remove_replies' => false,
                                'announce_topic' => false,
                        ),
                        'post' => array(
                                'remove' => true,
                                'modify' => true,
                                'report_any' => false,
                        ),
                        'poll' => array(
                                'poll_view' => false,
                                'poll_vote' => false,
                                'poll_post' => false,
                                'poll_add' => true,
                                'poll_edit' => true,
                                'poll_lock' => true,
                                'poll_remove' => true,
                        ),
                        'notification' => array(
                                'mark_any_notify' => false,
                                'mark_notify' => false,
                        ),
                        'attachment' => array(
                                'view_attachments' => false,
                                'post_attachment' => false,
                        )
                )
   


It contains nested arrays, a
'membergroup' => array
and a 
'board' => array.

Within the 'membergroup' => array are the
'general' => array, 
'pm' => array, 
'calendar' => array, 
'maintenance' => array, 
'member_admin' => array
and 
'profile' => array.

If you add a mod that needs 'membergroup' permissions it must be within the 'membergroup' => array( This last ( opens the tag and this ) closes the tag.

      'profile' => array(
           'profile_view' => true,
           'profile_identity' => true,
           'profile_extra' => true,
           'profile_title' => true,
           'profile_remove' => true,
           'profile_remote_avatar' => false,
        )
       ),

If a mod adds an array the  )         ), following profile have to be replaced by just  ), and the  ), at the end of the new 'membergroup' array the  ), has to be replaced by  )         ), . It is probably better to do this with a fresh copy, adding the required arrays, as who knows what you actually did chasing the error down the page.



Bigguy

how do I create this table "smf_games_category" Everytime I install the arcade on smf 1.0.5 it never creates this table.

ChaosForce

Run "arcade_sql.php". Before you do that though, make sure its chmodded to 755.

bolo1122

Ok im sorry for being the 86th page noob, but i have been trying to follow these pages concerning the error with the databse saying 1.02 and outdate from a fresh install using the program from server.
First of all i have SMF1.05 and download to my pc (not installed to the forum) all 3 of the version of the arcade.

So first question: which version should i installed to give me the least pct of errors so i can get this thing on the way? I know it might have some errors, but from what ive seen, its a headache just to read the little tweaks top make changes.

I first installed the 1.2.3 patch and when i got the updating error, i tried the other 2, and got the same error. so i deleted them all and now i just have my forums with about 4 or 5 different themes



1. Buddy List 1.21   
2. Enhanced Quick Reply 1.0   
3. Member Color Link 1.81   
4. Reply to 1.0.1   
5. Report PM to Administrator 0.2   
6. Visual Warning / Post Moderation 1.21   
7. PHP 4.4.0 Compatibility Update 1.0   


These are all the mods i have installed. What i need since everyone has all these changes is if anyone has a working copy of those PHP files that can easiy be added in or a basic change, since alot of ppl having the same errors from the beginning, that i can paste into the files.

This is going on a school website, where they requested the arcade page, so for 11 days its been hell for me to follow these pages  :'(
IF it's not for the Family, It's not for ME!!

Col

Quote from: tentronik on August 13, 2005, 12:54:56 PM
What you mean with commenting out?
When yoiu get the error?

Which error, please post hall message.

Cheetah!

I meant all the code in display.php that refers to the Arcade mod. The only problem I can see with this is that you will not have championships displayed under avatars in posts. Sinse I don't want that anyway, it's of no consequence to me.

Col

bolo1122,

I think you have two choices, either accept that the championships are not displayed under the avatars in posts (either comment out the code in display.php that is to do the Arcade, or remove it); or you could look at this code posted at the SMFArcade site: http://smfgames.com/forum/index.php?topic=1322.0

I have 1.2.3 running on 1.0.5. I've commented out the code for the Arcade in display.php.

I hope that is what you are looking for.

The 1.0.2 thing is a bug of some kind. I understand that it's of no consequence.

bolo1122

attempted what you said, but maybe i mislead you my problem lies in here:


Table 'commun14_smf1.smf_games_category' doesn't exist
File: /home/commun14/public_html/forum/Sources/ArcadeAdmin.php
Line: 299

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

But also when i try to run the arcade_sql.php by typing it in the browser i get this:


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@##.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Thanks for assisting.

IF it's not for the Family, It's not for ME!!

Advertisement: