Deci , detin un forum phpbb3 si "dintr-o" data s-au amestecat subforumurile de la categori :| .
Stiti vreo solutie ?
S-au amestecat categoriile / subforumurile phpbb3
Moderators: Moderatori ajutatori, Moderatori
-
- Membru, skill +4
- Posts: 1588
- Joined: 05 Oct 2010, 15:19
- Detinator Steam: Da
- CS Status: Punema la incercare.
- Detinator server CS: Da
- SteamID: SyNkRoNN
- Reputatie: Membru Club eXtreamCS (o luna)
Fost Moderator - Has thanked: 48 times
- Been thanked: 87 times
- Contact:
cum adica s-au amestecat? o poza ceva sau pm.. mai poti pune cel mai recent backup daca ai..
My Steam Profile (from SteamDB)
- Worth: $151 ($32 with sales)
- Games owned: 22
- Games not played: 18 (82%)
- Hours on record: 1,603.0h
-
- Fost administrator
- Posts: 13707
- Joined: 09 Oct 2010, 12:39
- Detinator Steam: Da
- CS Status: In grajd!
- SteamID: kalulord
- Reputatie: Fost Administrator
Fost membru Club eXtreamCS (6 luni)
Nume anterior: Terra - Location: Romania, Ploiesti
- Has thanked: 328 times
- Been thanked: 646 times
- Contact:
Salveaza asta intr-un fisier fixphpbb.php in root-ul forumului si acceseaza-l in browser.
Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id: index.php,v 1.176 2007/10/05 14:30:06 acydburn Exp $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
recalc_btree('forum_id' , FORUMS_TABLE);
echo "Done";
function recalc_btree($sql_id, $sql_table, $module_class = '')
{
global $db;
if (!$sql_id || !$sql_table)
{
return;
}
$sql_where = ($module_class) ? " WHERE module_class = '" . $db->sql_escape($module_class) . "'" : '';
// Reset to minimum possible left and right id
$sql = "SELECT MIN(left_id) as min_left_id, MIN(right_id) as min_right_id
FROM $sql_table
$sql_where";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$substract = (int) (min($row['min_left_id'], $row['min_right_id']) - 1);
if ($substract > 0)
{
$sql = "UPDATE $sql_table
SET left_id = left_id - $substract, right_id = right_id - $substract
$sql_where";
$db->sql_query($sql);
}
$sql = "SELECT $sql_id, parent_id, left_id, right_id
FROM $sql_table
$sql_where
ORDER BY left_id ASC, parent_id ASC, $sql_id ASC";
$f_result = $db->sql_query($sql);
while ($item_data = $db->sql_fetchrow($f_result))
{
if ($item_data['parent_id'])
{
$sql = "SELECT left_id, right_id
FROM $sql_table
$sql_where " . (($sql_where) ? 'AND' : 'WHERE') . "
$sql_id = {$item_data['parent_id']}";
$result = $db->sql_query($sql);
if (!$row = $db->sql_fetchrow($result))
{
$sql = "UPDATE $sql_table SET parent_id = 0 WHERE $sql_id = " . $item_data[$sql_id];
$db->sql_query($sql);
continue;
}
$db->sql_freeresult($result);
$sql = "UPDATE $sql_table
SET left_id = left_id + 2, right_id = right_id + 2
$sql_where " . (($sql_where) ? 'AND' : 'WHERE') . "
left_id > {$row['right_id']}";
$db->sql_query($sql);
$sql = "UPDATE $sql_table
SET right_id = right_id + 2
$sql_where " . (($sql_where) ? 'AND' : 'WHERE') . "
{$row['left_id']} BETWEEN left_id AND right_id";
$db->sql_query($sql);
$item_data['left_id'] = $row['right_id'];
$item_data['right_id'] = $row['right_id'] + 1;
}
else
{
$sql = "SELECT MAX(right_id) AS right_id
FROM $sql_table
$sql_where";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$item_data['left_id'] = $row['right_id'] + 1;
$item_data['right_id'] = $row['right_id'] + 2;
}
$sql = "UPDATE $sql_table
SET left_id = {$item_data['left_id']}, right_id = {$item_data['right_id']}
WHERE $sql_id = " . $item_data[$sql_id];
$db->sql_query($sql);
}
$db->sql_freeresult($f_result);
}
?>
-
- Membru, skill +1
- Posts: 203
- Joined: 10 Nov 2011, 15:54
- Detinator Steam: Da
- CS Status: Citesc forumul eXtreamCS.com...!
- Has thanked: 79 times
- Been thanked: 8 times
- Contact:
Inca sunt "amestecate" dar cred ca a "remediat" putin problema , ideea e ca in ACP la forumurile respective totul e la locul lui .. insa pe prima pagina a forumului sunt amestecate... gen : Categoria X ii apare subforumurile de la categoria Y insa m-am uitat in ACP si toate sunt la locul lor :-?
EDIT :
defapt vad ca nici nu mai apar toate , iar in ACP la forum parinte sunt amestecate ...
P.S Asta mi se intampla doar la 1 sigura categorie , vad ca restu e totul ok .
EDIT :
defapt vad ca nici nu mai apar toate , iar in ACP la forum parinte sunt amestecate ...
P.S Asta mi se intampla doar la 1 sigura categorie , vad ca restu e totul ok .
- Kryme
- Membru, skill +4
- Posts: 1922
- Joined: 31 Dec 2008, 12:45
- Detinator Steam: Da
- SteamID: PM si il dau.
- Reputatie: Ban 1 luna
Ban 2 luni - Location: Zalău
- Has thanked: 132 times
- Been thanked: 69 times
Si eu am aceeasi problema,fara backup nu ai ce face.
Si la fel,intr-o singura categoria,inainte sa stergi ceva ,o categorie sau ceva,faci mereu backup !
On : asta cu fixphpbb.php mi-a mai rezolvat si mie categoria buguit,mersi.
Si la fel,intr-o singura categoria,inainte sa stergi ceva ,o categorie sau ceva,faci mereu backup !
On : asta cu fixphpbb.php mi-a mai rezolvat si mie categoria buguit,mersi.
- Stefan&CS
- Membru, skill +1
- Posts: 352
- Joined: 29 Jul 2011, 09:48
- Detinator Steam: Da
- CS Status: Busy
- Detinator server CS: Da
- SteamID: antboy
- Reputatie: Fost Membru Club eXtreamCS (doua luni)
- Location: Iasi
- Has thanked: 9 times
- Been thanked: 8 times
- Contact:
iti multumesc ! mi sau rezolvat toate problemeleTerra. wrote:Salveaza asta intr-un fisier fixphpbb.php in root-ul forumului si acceseaza-l in browser.
Code: Select all
<?php /** * * @package phpBB3 * @version $Id: index.php,v 1.176 2007/10/05 14:30:06 acydburn Exp $ * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** */ /** * @ignore */ define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup('viewforum'); recalc_btree('forum_id' , FORUMS_TABLE); echo "Done"; function recalc_btree($sql_id, $sql_table, $module_class = '') { global $db; if (!$sql_id || !$sql_table) { return; } $sql_where = ($module_class) ? " WHERE module_class = '" . $db->sql_escape($module_class) . "'" : ''; // Reset to minimum possible left and right id $sql = "SELECT MIN(left_id) as min_left_id, MIN(right_id) as min_right_id FROM $sql_table $sql_where"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $substract = (int) (min($row['min_left_id'], $row['min_right_id']) - 1); if ($substract > 0) { $sql = "UPDATE $sql_table SET left_id = left_id - $substract, right_id = right_id - $substract $sql_where"; $db->sql_query($sql); } $sql = "SELECT $sql_id, parent_id, left_id, right_id FROM $sql_table $sql_where ORDER BY left_id ASC, parent_id ASC, $sql_id ASC"; $f_result = $db->sql_query($sql); while ($item_data = $db->sql_fetchrow($f_result)) { if ($item_data['parent_id']) { $sql = "SELECT left_id, right_id FROM $sql_table $sql_where " . (($sql_where) ? 'AND' : 'WHERE') . " $sql_id = {$item_data['parent_id']}"; $result = $db->sql_query($sql); if (!$row = $db->sql_fetchrow($result)) { $sql = "UPDATE $sql_table SET parent_id = 0 WHERE $sql_id = " . $item_data[$sql_id]; $db->sql_query($sql); continue; } $db->sql_freeresult($result); $sql = "UPDATE $sql_table SET left_id = left_id + 2, right_id = right_id + 2 $sql_where " . (($sql_where) ? 'AND' : 'WHERE') . " left_id > {$row['right_id']}"; $db->sql_query($sql); $sql = "UPDATE $sql_table SET right_id = right_id + 2 $sql_where " . (($sql_where) ? 'AND' : 'WHERE') . " {$row['left_id']} BETWEEN left_id AND right_id"; $db->sql_query($sql); $item_data['left_id'] = $row['right_id']; $item_data['right_id'] = $row['right_id'] + 1; } else { $sql = "SELECT MAX(right_id) AS right_id FROM $sql_table $sql_where"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $item_data['left_id'] = $row['right_id'] + 1; $item_data['right_id'] = $row['right_id'] + 2; } $sql = "UPDATE $sql_table SET left_id = {$item_data['left_id']}, right_id = {$item_data['right_id']} WHERE $sql_id = " . $item_data[$sql_id]; $db->sql_query($sql); } $db->sql_freeresult($f_result); } ?>
Mintile stralucite discuta idei. Mintile luminate discuta evenimente. Mintile "scurte" discuta oamenii
CONNECT CS.RLZ.RO
http://www.rlz.ro
CONNECT CS.RLZ.RO
http://www.rlz.ro