hallo,
also ich hab mir mal etwas dazu überlegt.
Öffne:
posting.php
Suche:
Code: Alles auswählen
//
// Here we do various lookups to find topic_id, forum_id, post_id etc.
// Doing it here prevents spoofing (eg. faking forum_id, topic_id or post_id
//
$error_msg = '';
$post_data = array();
switch ( $mode )
{
füge davor ein:
Code: Alles auswählen
$max_forum = '1';
$max_posts = '10';
if ( $mode == 'reply' )
{
$sql = "SELECT forum_id FROM " . POSTS_TABLE . " WHERE topic_id = '" . $topic_id . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forms information 1', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$forum_id = $row['forum_id'];
}
if ( ( $mode == 'newtopic' || $mode == 'reply' ) && ( $max_forum == $forum_id ) )
{
$sql = "SELECT post_id FROM " . POSTS_TABLE . " WHERE forum_id = '" . $max_forum . "' AND poster_id = '" . $userdata['user_id'] . "'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forms information 1', '', __LINE__, __FILE__, $sql);
}
$i = '0';
while ( $row = $db->sql_fetchrow($result) )
{
$i++;
}
if ( $i >= $max_posts )
{
message_die (GENERAL_MESSAGE, 'Du hast die maximale Anzahl an Postings in diesem Forum erreicht.');
}
}
bei meinem Code steht am Anfang:
Dort gibst du die Foren-ID des betreffenden Forums ein und die Anzahl an Posts, mit der die Meldung kommen soll, das nicht mehr gepostet werden kann.
Das ist jetzt ein Beispiel für die Beschränkung auf nur 1 Forum.
Vervielfältige diesen Code und poste ihn an der gleichen Stelle nacheinander, mit den entsprechenden Anpassungen natürlich.
Ich denke, du solltest damit klar kommen. Falls nicht, dann frag halt nochmal. Okay?