Only Admin Can Register 1.1.1 When installing this mod, only the administator can add new members. version 1.1 (by Striker): - now this can be turned on/off in the admin center version 1.2 (by Ian Micallef): - updated for YaBB 1 Gold SP 1.3.1 - fixed bug with mismatched text in Settings.pl - register links and icons are removed when active [CV]XXL http://boardmod.xnull.com Sources\Register.pl sub Register { if ($registerbyadminonly eq '1') { if ($settings[7] ne 'Administrator') { $yytitle = "$txt{'97'}"; $yymain .= "
Sorry, only the administator can register new members. Please contact him for an account.
"; &template; exit; } }
sub Register2 { if ($registerbyadminonly eq '1') { if ($settings[7] ne 'Administrator') { $yytitle = "$txt{'97'}"; $yymain .= "
Sorry, only the administator can register new members. Please contact him for an account.
"; &template; exit; } }
Sources\Subs.pl if($username eq 'Guest') { $yymenu .= qq~$menusep$img{'login'}$menusep$img{'register'}~; } else { if($settings[7] eq 'Administrator') { $yymenu .= qq~$menusep$img{'register'}~; } $yyuname = $username eq 'Guest' ? qq~$txt{'248'} $txt{'28'}. $txt{'249'} $txt{'34'} $txt{'377'} $txt{'97'}.~ : qq~$txt{'247'} $realname, ~ ; if($username eq 'Guest') { $yyuname = qq~$txt{'248'} $txt{'28'}. $txt{'249'} $txt{'34'}~; if ($registerbyadminonly eq '0') { $yyuname .= qq~ $txt{'377'} $txt{'97'}~; } $yyuname .= qq~.~; } else { $yyuname = qq~$txt{'247'} $realname, ~; } if($username eq 'Guest') { $yymenu .= qq~$menusep$img{'login'}$menusep$img{'register'}~; if($username eq 'Guest') { $yymenu .= qq~$menusep$img{'login'}~; if ($registerbyadminonly eq '0') { $yymenu .= qq~$menusep$img{'register'}~; } $sharedLogin_text=qq~
$txt{'634'}
$txt{'635'} $txt{'636'} $txt{'637'}

~;
$sharedLogin_text=qq~
$txt{'634'}
~; if ($registerbyadminonly eq '0') { $sharedLogin_text.=qq~$txt{'635'} $txt{'636'} $txt{'637'}
~; } $sharedLogin_text.=qq~
~;
Sources\LogInOut.pl $txt{'753'} ~; $yymain .= $registerbyadminonly eq '0' ? qq~$txt{'753'}~ : qq~ ~; $yymain .= qq~ Settings.pl $guestaccess = 0; # Set to 0 to disallow guests from doing anything but login or register $registerbyadminonly = 0; # Set to 1 to let the admin be the only person to register new users Sources\AdminEdit.pl if ($guestaccess == 0) { $guestaccchecked = ' checked'; } if ($registerbyadminonly == 1) { $registerbyadminonly = ' checked'; } $txt{'632'} $txt{'632a'} allowpics showyabbcbutt showbdescrip maintenance guestaccess insert_original enable_ubbc enable_news enable_guestposting enable_notification showlatestmember showrecentbar showmarkread showmodify showuserpic showusertext showgenderimage shownewsfader MenuType curposlinks profilebutton autolinkurls emailpassword RegAgree emailwelcome allow_hide_email usetempfile faketruncation emailnewpass/; allowpics showyabbcbutt showbdescrip maintenance guestaccess registerbyadminonly insert_original enable_ubbc enable_news enable_guestposting enable_notification showlatestmember showrecentbar showmarkread showmodify showuserpic showusertext showgenderimage shownewsfader MenuType curposlinks profilebutton autolinkurls emailpassword RegAgree emailwelcome allow_hide_email usetempfile faketruncation emailnewpass/; $guestaccess = $guestaccess ? 0 : 1; $registerbyadminonly = $registerbyadminonly ? 1 : 0; \$guestaccess = $guestaccess; # Set to 0 to disallow guests from doing anything but login or register \$registerbyadminonly = $registerbyadminonly; # Set to 1 to let the admin be the only person to register new users if ($guestaccess == 0) { $guestaccchecked = ' checked'; } if ($registerbyadminonly == 1) { $registerbyadminonly = ' checked'; } english.lng $txt{'632'} = "Disallow guests from doing anything but login or register?"; $txt{'632a'} = "Only admin is allowed to register new users";