Restrict Instant Messaging Mod For YaBB GOLD SP 1.1
1.1
This mod allows you to restrict Instant Messaging to people with over a certain number of posts on the message board.
It can be enabled / disabled from within admin preferences / settings. The number of posts required can be altered, also within admin preferences / settings.
Eg. Enable restriction in preferences. Set posts required to 25. Your board users will have to have 25 posts before they can access instant messaging.
This mod is aimed at preventing new users using your board for IMs only.
ver 1.0 Release
ver 1.1 2 Slight bug fixes that enabled members to access IM under certain circumstances.
Ken Ault
http://www.ken.jedimasters.co.uk/cgi-bin/YaBB.pl
Sources\InstantMessage.pl
sub IMIndex {
if( $username eq 'Guest' ) { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1' + $numposts}); }
# Restrict Instant Message Mod#
sub IMOutbox {
if ($username eq 'Guest') { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1'}); }
# Restrict Instant Message Mod#
sub IMPost {
if($username eq 'Guest') { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1'}); }
# Restrict Instant Message Mod#
sub IMPost2
{
if($username eq 'Guest') { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1'}); }
# Restrict Instant Message Mod#
sub IMRemove
{
if($username eq 'Guest') { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1'}); }
# Restrict Instant Message Mod#
sub IMPreferences {
if ($username eq 'Guest') { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1'}); }
# Restrict Instant Message Mod#
sub IMPreferences2 {
if($username eq 'Guest') { &fatal_error($txt{'147'}); }
# Restrict Instant Message Mod#
if( $settings[6] < $numposts ) { &fatal_error($rimtxt{'1'}); }
# Restrict Instant Message Mod#
english.lng
$txt{'796'} = "Your Instant Messages:";
# Restrict Instant Message Mod#
$rimtxt{'1'} = "You Need More Posts To Access Instant Messages !";
$rimtxt{'2'} = "Restrict Instant Messaging?";
$rimtxt{'3'} = "Number Of Posts Required?";
# Restrict Instant Message Mod#
sources/AdminEdit.pl
if ($showusertext) { $sutextchecked = "checked" }
if ($enable_rim) {$senablerim = 'checked' }
$txt{'408'}
$rimtxt{'2'}
$rimtxt{'3'}
# Set as 0 or 1 if box was checked or not
my $fi;
map { $fi = lc $_; ${$_} = $FORM{$fi} eq 'on' ? 1 : 0; } @onoff;
$guestaccess = $guestaccess ? 0 : 1;
push(@onoff, "enable_rim", "numposts");
$facesurl = $FORM{'facesurl'} || "$boardurl/YaBBImages/avatars";
$numposts = $FORM{'numposts'} || 0;
\$timeout = $timeout; # Minimum time between 2 postings from the same IP
\$numposts = $numposts; # Number of posts required to access Instant Messaging
\$showyabbcbutt = $showyabbcbutt; # Set to 1 to display the yabbc buttons on Posting and IM Send Pages
\$enable_rim = $enable_rim; # Set to 1 to restrict Instant messaging