New Feature For IP
Subject: New Feature For IP
I didnt know where to post it. There is a simple mod that makes impossible the double posting, i was wondering, if this can be added to Icy Phoenix
Subject: Re: New Feature For IP
Try this and let me know if it works
- #
- #-----[ OPEN ]------------------------------------------
- #
- posting.php
- #
- #-----[ FIND ]------------------------------------------
- #
- switch ( $mode )
- {
- case 'editpost':
- case 'newtopic':
- case 'reply':
- #
- #-----[ AFTER, ADD ]------------------------------------
- #
- #
- //
- // BEGIN - Anti Double Post Mod
- //
- if ( $mode != 'newtopic' )
- {
- $edit_overtime = false;
- if ( !$is_auth['auth_mod'] && $board_config['edit_time'] != 0 )
- {
- $current_time = time();
- $difference_min = ($current_time - $post_info['post_time']) / 60;
- $edit_overtime = $difference_min > $board_config['edit_time'];
- }
- $sql = "SELECT topic_last_post_id
- FROM " . TOPICS_TABLE . "
- WHERE topic_id = " . $topic_id;
- if (!$topic_query = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, $lang['Query_topic']);
- }
- $topic = $db->sql_fetchrow($topic_query);
- $last_post_id = $topic['topic_last_post_id'];
- $sql = "SELECT poster_id
- FROM " . POSTS_TABLE . "
- WHERE post_id = " . $last_post_id;
- if (!$post_query = $db->sql_query($sql))
- {
- message_die(GENERAL_ERROR, $lang['Query_post']);
- }
- $post = $db->sql_fetchrow($post_query);
- $last_user = $post['poster_id'];
- if (($userdata['user_id'] == $last_user) && ($is_auth['auth_edit']) && (!$edit_overtime) && (!$is_auth['auth_mod']))
- {
- message_die(GENERAL_MESSAGE,$lang['No_doublepost']);
- }
- }
- //
- // END - Anti Double Posts Mod
- //
- #
- #-----[ OPEN ]------------------------------------------
- #
- language/lang_english/lang_main.php
- #
- #-----[ FIND ]------------------------------------------
- #
- $lang['No_post_mode']
- #
- #-----[ AFTER, ADD ]-----------------------------------
- #
- $lang['No_doublepost'] = 'You cannot post in this topic until another user posts after you. Please edit your message instead.';
- $lang['Query_topic'] = 'Could not query topics table';
- $lang['Query_post'] = 'Could not query posts table';
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.1239s (PHP: 13% SQL: 87%)
SQL queries: 10 - Debug Off - GZIP Enabled