Code: Select all
##############################################################
## MOD Title: Deny Posting URL & BBcode until x posts
## MOD Author: alexi02 < N/A > (Alejandro Iannuzzi) http://www.uzzisoft.com
## MOD Description: If the user is below the post restriction and they post any URLs or use BBcode then their post is denied
## MOD Version: 0.1.0
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: includes/functions_post.php
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## ACP for editing the URLs to restrict and the post restriction hasn't been built yet.
##
##############################################################
## MOD History:
##
## 2006-09-23 - Version 0.1.0
## - Initial Release (for phpBB 2.0.21)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
global $userdata, $user_ip;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Start Deny Posting URL & BBcode until x posts
//
// Lang Variables
$lang['Deny_error_url'] = 'URL Links are not allowed until you have made';
$lang['Deny_error_bbcode'] = 'BBcode is not allowed until you have made';
$lang['Deny_error_posts'] = 'posts.';
// Simulating the DB values
$row = array();
$row['deny_url'] = "http|www|.com|.net|.org";
$row['post_restrict'] = 5;
// Is the user over the post restriction
if ($userdata[user_posts] < $row['post_restrict']) {
// Search for URLs in Post
$deny_url_text = explode("|",$row['deny_url']);
for ($x = 0; $x < count($deny_url_text); $x++) {
if (substr_count($post_message,$deny_url_text[$x])) {
message_die(GENERAL_MESSAGE, $lang['Deny_error_url'] . ' ' . $row['post_restrict'] . ' ' . $lang['Deny_error_posts']);
}
}
// Search for BBCode in Post
if (substr_count($post_message,$bbcode_uid)) {
message_die(GENERAL_MESSAGE, $lang['Deny_error_bbcode'] . ' ' . $row['post_restrict'] . ' ' . $lang['Deny_error_posts']);
}
}
//
// End Deny Posting URL & BBcode until x posts
//
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM