Seite 1 von 2
Update auf php 2.0.20
Verfasst: 18.04.2006 13:44
von werni1949
Folgender Fehler beim Update per Codechanges:
Ich habe die Datei Index.PHP neu bearbeitet, der Fehler bleibt.
Hier mal der Code in der Umgebung des Fehlers: (Zeile ist rot!)
if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = ' ';
$moderator_list = ' ';
}
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('catrow.forumrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image,
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST' => $last_post,
'MODERATORS' => $moderator_list,
'L_MODERATOR' => $l_moderators,
'L_FORUM_FOLDER_ALT' => $folder_alt,
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}
}
}
}
}
} // for ... categories
}// if ... total_categories
else
Kann mir wer helfen? Dieser Bereich sieht auch im heruntergeladenen php 2.0.20 so aus....
Verfasst: 18.04.2006 13:54
von scheibenbrot
poste mal so die 10 Zeilen weiter unten....
Verfasst: 18.04.2006 14:26
von werni1949
Das ist der Rest der Datei. Der Fehler tritt dann auf, wenn man vom Portal zu Index wechselt.
else
//-- add
*/
// don't display the board statistics
if ( ($board_config['display_viewonline'] == 2) || ( ($viewcat < 0) && ($board_config['display_viewonline'] == 1) ) )
{
$template->assign_block_vars('disable_viewonline', array());
}
// display the index
$display = display_index($viewcatkey);
if ( !$display )
//-- fin mod : categories hierarchy ----------------------------------------------------------------
{
message_die(GENERAL_MESSAGE, $lang['No_forums']);
}
//
// Generate the page
//
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Verfasst: 18.04.2006 14:30
von Ramona_FP
Versuche mal..
if ( count($forum_moderators[$forum_id]) > 0 )
{
$l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
$moderator_list = implode(', ', $forum_moderators[$forum_id]);
}
else
{
$l_moderators = ' ';
$moderator_list = ' ';
}
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars('catrow.forumrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FORUM_FOLDER_IMG' => $folder_image,
'FORUM_NAME' => $forum_data[$j]['forum_name'],
'FORUM_DESC' => $forum_data[$j]['forum_desc'],
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],
'LAST_POST' => $last_post,
'MODERATORS' => $moderator_list,
'L_MODERATOR' => $l_moderators,
'L_FORUM_FOLDER_ALT' => $folder_alt,
'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}
}
}
}
}
} // for ... categories
}
}// if ... total_categories
else
(eine Klammer hinzugefügt)
Verfasst: 18.04.2006 14:39
von werni1949
Ich habe die Klammer in Zeile 765 zugefügt, der Fehler ist jetzt:
Es scheint eine Klammer zuviel zu sein. Beim Update werden keine Klammern verändert, und vorher lief das Forum! Ich versteh es nicht....
Verfasst: 18.04.2006 14:48
von Ramona_FP
Ich habe mal ein ähnliches Problem gehabt, ich habe dann solange mit den Klammern rumgespielt bis es wieder ging
Also bei mir sinds 8 in der index, daher hatte ich auch zuerst gedacht das eine fehlt..aber das wras wohl nicht

Verfasst: 18.04.2006 15:09
von werni1949
Auch wenn ich eine entferne, geht es nicht. Aber es ging ja vorher, und das verstehe ich nicht!
Verfasst: 18.04.2006 16:42
von scheibenbrot
Kann es sein, das du da einen Mod zerschnibbelt hast??
Weil hierbei fehlt etwas....:
Code: Alles auswählen
*/
// don't display the board statistics
if ( ($board_config['display_viewonline'] == 2) || ( ($viewcat < 0) && ($board_config['display_viewonline'] == 1) ) )
{
$template->assign_block_vars('disable_viewonline', array());
}
// display the index
$display = display_index($viewcatkey);
if ( !$display )
//-- fin mod : categories hierarchy ----------------------------------------------------------------
Das ist irgendwas von nem MOD, aber nicht das komplette was eingefügt werden sollte

Verfasst: 18.04.2006 17:31
von werni1949
Ich hab das Board so übernommen. Bis 2.0.19 hat es auch geklappt. erst mit den Änderungen
#-----[ OPEN ]---------------------------------------------
#
index.php
#
#-----[ FIND ]---------------------------------------------
# Line 117
while( $category_rows[] = $db->sql_fetchrow($result) );
#
#-----[ REPLACE WITH ]---------------------------------------------
#
while ($row = $db->sql_fetchrow($result))
{
$category_rows[] = $row;
}
#
#-----[ FIND ]---------------------------------------------
# Line 301
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
//
// Should we display this category/forum set?
//
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
{
$display_forums = true;
}
}
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if ( $display_forums )
#
#-----[ REPLACE WITH ]---------------------------------------------
#
// Let's decide which categories we should display
//
$display_categories = array();
for ($i = 0; $i < $total_forums; $i++ )
{
if ($is_auth_ary[$forum_data[$i]['forum_id']]['auth_view'])
{
$display_categories[$forum_data[$i]['cat_id']] = true;
}
}
//
// Okay, let's build the index
//
for($i = 0; $i < $total_categories; $i++)
{
$cat_id = $category_rows[$i]['cat_id'];
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
bekomme ich die Fehlermeldung. Wenn ich index.php vom Download php 2.0.20 einfüge, ist zwar der Fehler weg aber ich bekomme auch keinen Index....

Verfasst: 18.04.2006 18:05
von S2B
Gib doch einfach mal die ganze Datei... (KB:datei)