hierachy
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

hierachy
halloww,
ik heb vandaag de hele hierachy (subfora) geinstalleerd, part 1 en 2, maar nu krijg ik ipv. het admin paneel, dit te zien:
Parse error: parse error, unexpected T_CASE in /home/marrucc1/domains/marrucc.com/public_html/area 51/forum/admin/admin_forums.php on line 1541
dus heb ik de regel opgezocht:
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// 'L_FORUM_DELETE' => $lang['Forum_delete'],
// 'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'],
//-- add
'L_FORUM_DELETE' => $lang['Category_delete'],
'L_FORUM_DELETE_EXPLAIN' => $lang['Category_delete_explain'],
//-- fin mod : categories hierarchy ----------------------------------------------------------------
'L_MOVE_CONTENTS' => $lang['Move_contents'],
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// 'L_FORUM_NAME' => $lang['Forum_name'],
//-- add
'L_FORUM_NAME' => $lang['Category'],
//-- fin mod : categories hierarchy ----------------------------------------------------------------
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_SELECT_TO' => $select_to,
'S_SUBMIT_VALUE' => $buttonvalue)
);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
$template->assign_vars(array(
'L_FORUM_DESC' => $lang['Category_desc'],
'DESC' => $desc,
)
);
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$template->pparse("body");
break;
case 'movedelcat':
//
// Move or delete a category in the DB
//
$from_id = intval($HTTP_POST_VARS['from_id']);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $to_id = intval($HTTP_POST_VARS['to_id']);
//-- add
$to_fid = $HTTP_POST_VARS['to_id'];
$to_type = substr($to_fid, 0, 1);
$to_id = intval(substr($to_fid, 1));
//-- fin mod : categories hierarchy ----------------------------------------------------------------
if (!empty($to_id))
{
$sql = "SELECT *
FROM " . CATEGORIES_TABLE . "
WHERE cat_id IN ($from_id, $to_id)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't verify existence of categories", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) != 2)
{
message_die(GENERAL_ERROR, "Ambiguous category ID's", "", __LINE__, __FILE__);
}
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
// check that there is no forum attached to the from cat (will issue to forum attached to forums)
if (($to_type == POST_FORUM_URL) && !defined('SUB_FORUM_ATTACH'))
{
$found = false;
for ($i=0; $i < count($tree['sub'][POST_CAT_URL . $from_id]); $i++)
{
$found = ($tree['type'][$tree['keys'][$tree['sub'][POST_CAT_URL . $from_id][$i]]] == POST_FORUM_URL);
}
if ($found)
{
message_die(GENERAL_ERROR, $lang['Must_delete_forums']);
}
}
$sql_feed = '';
$sql_where = '';
if (defined('SUB_FORUM_ATTACH'))
{
$sql_feed = ", main_type='$to_type'";
$sql_where = " AND main_type='" . POST_CAT_URL . "'";
}
//-- fin mod : categories hierarchy ----------------------------------------------------------------
//-- mod : categories hierarchy --------------------------------------------------------------------
// here we added
// " . $sql_feed . "
// and
// . $sql_where .
//-- modify
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$sql = "UPDATE " . FORUMS_TABLE . "
SET cat_id = $to_id
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move forums to other category", "", __LINE__, __FILE__, $sql);
}
}
$sql = "DELETE FROM " . CATEGORIES_TABLE ."
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete category", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
cache_tree(true);
board_stats();
$err = admin_check_cat();
if ( $err ) $message = $lang['Category_config_error_fixed'] . "<br /><br />" . $message;
//-- fin mod : categories hierarchy ----------------------------------------------------------------
message_die(GENERAL_MESSAGE, $message);
break;
case 'forum_order':
//
// Change order of forums in the DB
//
$move = intval($HTTP_GET_VARS['move']);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $forum_info = get_info('forum', $forum_id);
//
// $cat_id = $forum_info['cat_id'];
//
// $sql = "UPDATE " . FORUMS_TABLE . "
// SET forum_order = forum_order + $move
// WHERE forum_id = $forum_id";
// if( !$result = $db->sql_query($sql) )
// {
// message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
// }
//
// renumber_order('forum', $forum_info['cat_id']);
//-- add
// update the level order
move_tree(POST_FORUM_URL, $forum_id, $move);
cache_tree(true);
board_stats();
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$show_index = TRUE;
het dik gedrukte is regel 1541, alvast bedankt
ik heb vandaag de hele hierachy (subfora) geinstalleerd, part 1 en 2, maar nu krijg ik ipv. het admin paneel, dit te zien:
Parse error: parse error, unexpected T_CASE in /home/marrucc1/domains/marrucc.com/public_html/area 51/forum/admin/admin_forums.php on line 1541
dus heb ik de regel opgezocht:
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// 'L_FORUM_DELETE' => $lang['Forum_delete'],
// 'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'],
//-- add
'L_FORUM_DELETE' => $lang['Category_delete'],
'L_FORUM_DELETE_EXPLAIN' => $lang['Category_delete_explain'],
//-- fin mod : categories hierarchy ----------------------------------------------------------------
'L_MOVE_CONTENTS' => $lang['Move_contents'],
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// 'L_FORUM_NAME' => $lang['Forum_name'],
//-- add
'L_FORUM_NAME' => $lang['Category'],
//-- fin mod : categories hierarchy ----------------------------------------------------------------
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORUM_ACTION' => append_sid("admin_forums.$phpEx"),
'S_SELECT_TO' => $select_to,
'S_SUBMIT_VALUE' => $buttonvalue)
);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
$template->assign_vars(array(
'L_FORUM_DESC' => $lang['Category_desc'],
'DESC' => $desc,
)
);
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$template->pparse("body");
break;
case 'movedelcat':
//
// Move or delete a category in the DB
//
$from_id = intval($HTTP_POST_VARS['from_id']);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $to_id = intval($HTTP_POST_VARS['to_id']);
//-- add
$to_fid = $HTTP_POST_VARS['to_id'];
$to_type = substr($to_fid, 0, 1);
$to_id = intval(substr($to_fid, 1));
//-- fin mod : categories hierarchy ----------------------------------------------------------------
if (!empty($to_id))
{
$sql = "SELECT *
FROM " . CATEGORIES_TABLE . "
WHERE cat_id IN ($from_id, $to_id)";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't verify existence of categories", "", __LINE__, __FILE__, $sql);
}
if($db->sql_numrows($result) != 2)
{
message_die(GENERAL_ERROR, "Ambiguous category ID's", "", __LINE__, __FILE__);
}
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
// check that there is no forum attached to the from cat (will issue to forum attached to forums)
if (($to_type == POST_FORUM_URL) && !defined('SUB_FORUM_ATTACH'))
{
$found = false;
for ($i=0; $i < count($tree['sub'][POST_CAT_URL . $from_id]); $i++)
{
$found = ($tree['type'][$tree['keys'][$tree['sub'][POST_CAT_URL . $from_id][$i]]] == POST_FORUM_URL);
}
if ($found)
{
message_die(GENERAL_ERROR, $lang['Must_delete_forums']);
}
}
$sql_feed = '';
$sql_where = '';
if (defined('SUB_FORUM_ATTACH'))
{
$sql_feed = ", main_type='$to_type'";
$sql_where = " AND main_type='" . POST_CAT_URL . "'";
}
//-- fin mod : categories hierarchy ----------------------------------------------------------------
//-- mod : categories hierarchy --------------------------------------------------------------------
// here we added
// " . $sql_feed . "
// and
// . $sql_where .
//-- modify
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$sql = "UPDATE " . FORUMS_TABLE . "
SET cat_id = $to_id
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't move forums to other category", "", __LINE__, __FILE__, $sql);
}
}
$sql = "DELETE FROM " . CATEGORIES_TABLE ."
WHERE cat_id = $from_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete category", "", __LINE__, __FILE__, $sql);
}
$message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], "<a href=\"" . append_sid("admin_forums.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
cache_tree(true);
board_stats();
$err = admin_check_cat();
if ( $err ) $message = $lang['Category_config_error_fixed'] . "<br /><br />" . $message;
//-- fin mod : categories hierarchy ----------------------------------------------------------------
message_die(GENERAL_MESSAGE, $message);
break;
case 'forum_order':
//
// Change order of forums in the DB
//
$move = intval($HTTP_GET_VARS['move']);
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $forum_info = get_info('forum', $forum_id);
//
// $cat_id = $forum_info['cat_id'];
//
// $sql = "UPDATE " . FORUMS_TABLE . "
// SET forum_order = forum_order + $move
// WHERE forum_id = $forum_id";
// if( !$result = $db->sql_query($sql) )
// {
// message_die(GENERAL_ERROR, "Couldn't change category order", "", __LINE__, __FILE__, $sql);
// }
//
// renumber_order('forum', $forum_info['cat_id']);
//-- add
// update the level order
move_tree(POST_FORUM_URL, $forum_id, $move);
cache_tree(true);
board_stats();
//-- fin mod : categories hierarchy ----------------------------------------------------------------
$show_index = TRUE;
het dik gedrukte is regel 1541, alvast bedankt
-
cartoontje
- Berichten: 1518
- Lid geworden op: 29 jun 2003, 10:57
- Locatie: Home Sweet Home
- Contacteer:
die vet gedrukte regel is niet fout zo te zien, maar verander es
naar
Code: Selecteer alles
template->assign_vars(array(
'L_FORUM_DESC' => $lang['Category_desc'],
'DESC' => $desc,
)Code: Selecteer alles
template->assign_vars(array(
'L_FORUM_DESC' => $lang['Category_desc'],
'DESC' => $desc)