#### No New Users HACK,
#### by C.v. Marle (C.A.vanMarle@inter.NL.net)
#### This hack makes an extra function in the "variables set-up"
#### wich gives you the uppertunity to prevent registering of new users
#### The nonewusers.dat file is the file with the text wich should
#### appear if you turn on the hack and users got into the register page
# Some things may differ, because I've a very modified board...
# Sorry... If you can't find any thing, please mail me...
# BACK-UP all your files before editing!!!
# Don't blame me if your board's messed up
[setvariables.cgi]
>> Aftter:
$tempoutput = "\n";
$tempoutput =~ s/value=\"$announcements\"/value=\"$announcements\" selected/;
print qq~
Do you to have an announcements forum? 'Yes' is recommended
[register.cgi]
>> before:
if ($action eq "addmember") { #start add member
>> add:
if ($newusrs eq 'no') { #start for No New Users HACK
&nonew;
}
else {
>> after:
} # end elseform
>> add:
} # end else for No New Users HACK
>> And the end of the file, after:
&output(
-Title => $boardname,
-ToPrint => $output,
-Version => $versionnumber
);
>> add:
sub nonew { # start No New Users HACK sub
$filetoopen = "$ikondir" . "data/nonewusers.dat";
open(FILE,$filetoopen) or die "Cannot locate the nonewusers.dat file, this should be in the data directory";
@filedata = ; close(FILE);
foreach (@filedata) { $tempoutput .= $_; }
$output .= qq~
No New Users Allowed
$tempoutput
~;
} # end No New Users HACK sub
upload nonewusers.dat in your ikonboard/data directory
## OPTIONAL
## This show a little message on the ikonboard.cgi page
## to inform visitors about the registering prevention
## (if the hack is turned on)
[ikonboard.cgi]
>> change:
#------- HTML
$output .= qq~
$boardname welcomes its newest member $cleanlastregistered
$boardname has $totalmembers members with $totalposts posts in $totalthreads topics
>> to:
if ($newusrs eq 'no') { $nonewusershtml="No registering allow at the moment "; }
#------- HTML
$output .= qq~
$nonewusershtml
$boardname welcomes its newest member $cleanlastregistered
$boardname has $totalmembers members with $totalposts posts in $totalthreads topics
# I think that should do it... ;)
# Mzzl, Chris
# P.S. if you find any bugs/errors please send me an e-mail