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();
füge danach ein
Code: Alles auswählen
$maxpost = 30;
$week = time() - 604800;
switch ( $mode )
{
case 'newtopic':
case 'reply':
$sql = "SELECT count(post_id) as entries FROM " . POSTS_TABLE . "
WHERE poster_id = ". $userdata['user_id'] ."
AND post_time > ". $week;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not count postings.', '', __LINE__, __FILE__, $sql);
}
$total = $db->sql_fetchrow($result);
if ($total > $maxpost)
{
$message = 'Du kannst maximal '.$maxpost.' Beiträge pro Woche schreiben!';
$message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
break;
default:
}
Mal so auf die Schnelle... UNGETESTET!
EDIT: $maxpost definiert die zulässige Anzahl an Postings, 604800 ist die Anzahl der Sekunden, die 1 Woche hat...