| |
phpBB-TweakS The easiest way to 'tweak' your phpBB! |
|
|
|
|
|
|
It appears you are using a browser that is not based on Internet Explorer, this means you are not viewing the web as good as you should be. Other browsers might try to immitate Internet Explorer, but none can parse the web as it should like Internet Explorer can. So view the web as it was meant to be with Avant Browser!
|
| |
|
|
All times are GMT - 5 Hours
|
|
 |
Mon Feb 27, 2006 6:22 pm |
 |
Author |
Message |
jsr Support Team

Joined: 06 Jan 2005 Posts: 407 Words Posted: 50,471 Average Post: 124.01
|
| Post subject: Pm's disabled for new members. |
|
|
| How about making a mod, when a new user joins they cant send pm's and cant reply to pm's till they've reached a specified post count. |
|
| Post #1 |
|
|
 |
Tue Feb 28, 2006 12:25 am |
 |
Author |
Message |
hexcode  300 Club

Joined: 27 Feb 2005 Posts: 317 Words Posted: 38,916 Average Post: 122.76
|
| Post subject: |
|
|
Here you go...
| Code: | ##############################################################
## MOD Title: PM threshold
## MOD Author: Ptirhiik < ptirhiik@clanmckeen.com > (Pierre) http://rpgnet.clanmckeen.com
## MOD Description: Add a minimum posts threshold before allowing pms
##
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 10 Minutes
## Files To Edit:
## privmsg.php
## admin/admin_board.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/board_config_body.tpl
##
## Included Files: (n/a)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
## 2003-01-24 - Version 1.0.0
## - first publication
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_allow_threshold', '15');
#
#-----[ OPEN ]------------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : pm threshold ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : pm threshold ----------------------------------------------------------------------------
//-- add
$pm_allow_threshold = isset($board_config['pm_allow_threshold']) ? $board_config['pm_allow_threshold'] : 15;
if ( !$userdata['session_logged_in'] || ($userdata['user_posts'] < $pm_allow_threshold) )
{
message_die(GENERAL_MESSAGE, 'Not_Authorised');
}
//-- fin mod : pm threshold ------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : pm threshold ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$template->assign_vars(array(
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : pm threshold ----------------------------------------------------------------------------
//-- add
'L_PM_ALLOW_THRESHOLD' => $lang['pm_allow_threshold'],
'L_PM_ALLOW_TRHESHOLD_EXPLAIN' => $lang['pm_allow_threshold_explain'],
'PM_ALLOW_THRESHOLD' => $new['pm_allow_threshold'],
//-- fin mod : pm threshold ------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : pm threshold ----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : pm threshold ----------------------------------------------------------------------------
//-- add
$lang['pm_allow_threshold'] = 'Allow PM threshold';
$lang['pm_allow_threshold_explain'] = 'Set here the minimal amount of posts the user has to write before being able to use the private messages.';
//-- fin mod : pm threshold ------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
# at the top of the file
#
<h1>{L_CONFIGURATION_TITLE}</h1>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- mod : pm threshold -->
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="row1">{L_INBOX_LIMIT}</td>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<tr>
<td class="row1">{L_PM_ALLOW_THRESHOLD}<br /><span class="gensmall">{L_PM_ALLOW_TRHESHOLD_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" maxlength="4" size="4" name="pm_allow_threshold" value="{PM_ALLOW_THRESHOLD}" /></td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM |
|
|
| Post #2 |
|
|
 |
Tue Feb 28, 2006 1:18 am |
 |
 |
Tue Feb 28, 2006 4:08 pm |
 |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
Protected by phpBB Security © phpBB-TweakS phpBB Security Has Blocked 3,237 Exploit Attempts.
· Archive · Sitemap: Index · Sitemap: Forums · Sitemap: Topics · Sitemap: Posts ·
:: [ Load Time: 2.8 Seconds ] :: [ 29 Queries ] :: [ 4,560 Page(s) Viewed Today ] :: :: [ Todays Queries: 137,105 ] :: [ Highest Load: 1,396,429 Queries On May. 08, 2007 ] :: :: [ SQL Load: 60% Time: 1.7 ] :: [ PHP Load: 40% Time: 1.1 ] :: [ Debug: On ] :: [ GZIP: Enabled ] :: :: The server last rebooted 81 days, 8 hours, 52 minutes, 51 seconds ago. ::
|
|
|
|
|
This page has been viewed 4,930,132 times, last viewed: Sat Sep 06, 2008 5:23 pm.
|
|
Powered by phpBB 2.0.* © 2001, 2002 phpBB Group
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|