Seite 2 von 2

Verfasst: 04.08.2003 21:14
von einheitlix
Ok, im optionalen Teil gab es auch Fehler. Das Mod bezieht sich auf eine ältere Version von phpBB, oder?

Da gibt es mal wieder den gleichen Fehler in admin/admin_users.php wie vorher in includes/usercp_register.php, die Variablen $user_posts_per_page, $user_topics_per_page, und $user_hot_threshold werden benutzt, ohne dass sie vorher initialisiert worden sind.

Folgender Code sollte dies beheben:
>>FINDE:
$allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allo\
w_smilies'];

>>DARUNTER EINFÜGEN:
$user_posts_per_page = ( isset($HTTP_POST_VARS['user_posts_per_page']) ) ? (intval($HTTP_POST_VARS['user_posts_per_page']) == 0 ? $board_config['posts_per_page'] : intval($HTTP_POST_VARS['user_posts_per_page'])) : $board_config['posts_per_page'];
$user_topics_per_page = ( isset($HTTP_POST_VARS['user_topics_per_page']) ) ? (intval($HTTP_POST_VARS['user_topics_per_page']) == 0 ? $board_config['topics_per_page'] : intval($HTTP_POST_VARS['user_topics_per_page'])) : $board_config['topics_per_page'];
$user_hot_threshold = ( isset($HTTP_POST_VARS['user_hot_threshold']) ) ? (intval($HTTP_POST_VARS['user_hot_threshold']) == 0 ? $board_config['hot_threshold'] : intval($HTTP_POST_VARS['user_hot_threshold'])) : $board_config['hot_threshold'];
Weiterhin...
>>FINDE:
case 'joindate':
$order_by = "user_regdate ASC LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'username':
$order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'location':
$order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'posts':
$order_by = "user_posts $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'email':
$order_by = "user_email $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'website':
$order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'topten':
$order_by = "user_posts DESC LIMIT 10";
break;
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;

>>MIT FOLGENDEM ERSETZEN:
case 'joindate':
$order_by = "user_regdate ASC LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'username':
$order_by = "username $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'location':
$order_by = "user_from $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'posts':
$order_by = "user_posts $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'email':
$order_by = "user_email $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'website':
$order_by = "user_website $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'topten':
$order_by = "user_posts DESC LIMIT 10";
break;
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
Sieht jetzt alles ein wenig anders aus. Richtig wäre
>>FINDE:
case 'joined':
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'username':
$order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'location':
$order_by = "user_from $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'posts':
$order_by = "user_posts $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'email':
$order_by = "user_email $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'website':
$order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'topten':
$order_by = "user_posts $sort_order LIMIT 10";
break;
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;

>>MIT FOLGENDEM ERSETZEN:
case 'joined':
$order_by = "user_regdate $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'username':
$order_by = "username $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'location':
$order_by = "user_from $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'posts':
$order_by = "user_posts $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'email':
$order_by = "user_email $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'website':
$order_by = "user_website $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
case 'topten':
$order_by = "user_posts $sort_order LIMIT 10";
break;
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
break;
Desweiteren:
>>FINDE:
else
{
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
}

>>MIT FOLGENDEM ERSETZEN:
else
{
$order_by = "user_regdate $sort_order LIMIT $start, " . $userdata['user_topics_per_page'];
}
Das gibt es gar nicht mehr. Könnte komplett rausgeschmissen werden ;)
>>FINDE:
$total_members = $total['total'];

$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $userdata['user_topics_per_page'], $start). ' ';
}
}
else
{
$pagination = ' ';
$total_members = 10;
}

$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $userdata['user_topics_per_page'] ) + 1 ), ceil( $total_members / $userdata['user_topics_per_page'] )),

>>MIT FOLGENDEM ERSETZEN:
$total_members = $total['total'];

$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $userdata['user_topics_per_page'], $start). ' ';
$page_number = sprintf($lang['Page_of'], ( floor( $start / $userdata['user_topics_per_page'] ) + 1 ), ceil( $total_members / $userdata['user_topics_per_page'] ));
}
}
else
{
$pagination = ' ';
$total_members = 10;
$page_number = ' ';
}

$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => $page_number,
Wie kann es sein, dass man $userdata['user_topics_per_page'] ) FINDEN soll? Das will man doch erstmal reinhacken... also richtig wäre:
>>FINDE:
$total_members = $total['total'];

$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start). ' ';
}
}
else
{
$pagination = ' ';
$total_members = 10;
}

$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),

>>MIT FOLGENDEM ERSETZEN:
$total_members = $total['total'];

$pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $userdata['user_topic\
s_per_page'], $start). ' ';
$page_number = sprintf($lang['Page_of'], ( floor( $start / $userdata['user_topics_per_page'] ) + 1 ), ceil( $total_members / \
$userdata['user_topics_per_page'] ));
}
}
else
{
$pagination = ' ';
$total_members = 10;
$page_number = ' ';
}

$template->assign_vars(array(
'PAGINATION' => $pagination,
'PAGE_NUMBER' => $page_number,
Folgendes fehlt, das sollte noch eingefügt werden:
>>FINDE:
if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )

>>ERSETZE DURCH:
if ( $mode != 'topten' || $userdata['user_topics_per_page'] < 10 )
Weiter...
#
#-----[ ÖFFNEN ]------------------------------------------
#
# privmsg.php

>>FINDE:
$sql .= $limit_msg_time . " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $userdata['user_topics_per_page'];

>>MIT FOLGENDEM ERSETZEN:
$sql .= $limit_msg_time . " ORDER BY pm.privmsgs_date DESC LIMIT $start, " . $board_config['topics_per_page'];
"Finde" und "Mit folgendem ersetzen" sind hier wohl vertauscht ;)

Danke, jetzt funktioniert das alles perfekt, wie ich es wollte :)