############################################################################### # AdminEdit.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 1 Gold - SP 1.1 # # Released: December 2001; Updated March 22, 2002 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2002 Xnull (www.xnull.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # ############################################################################### $admineditplver = "1 Gold - SP 1.1"; sub EditNews { &is_admin; my($line); $yymain .= qq~
$txt{'7'}

$txt{'670'}




~; $yytitle = "$txt{'7'}"; &template; exit; } sub EditNews2 { &is_admin; fopen(FILE, ">$vardir/news.txt", 1); print FILE "$FORM{'news'}"; fclose(FILE); $yySetLocation = qq~$cgi\;action=admin~; &redirectexit; } sub EditMemberGroups { &is_admin; my(@lines, $mgroups, $i); fopen(FILE, "$vardir/membergroups.txt"); @lines = ; fclose(FILE); foreach $i (@lines) { $i =~ tr/\r//d; $i =~ tr/\n//d; } for( $i = 7; $i < @lines; ++$i ) { if( $lines[$i] =~ m~\A\s+\Z~ ) { next; } $mgroups .= "$lines[$i]\n"; } $yymain .= qq~
$txt{'8'}
$txt{'11'}:
$txt{'12'}:
$txt{'569'}:
$txt{'13'}:
$txt{'14'}:
$txt{'15'}:
$txt{'570'}:
$txt{'16'}:
~; $yytitle = $txt{'8'}; &template; exit; } sub EditMemberGroups2 { &is_admin; my $additional = $FORM{'additional'}; while( $groups = each(%FORM) ) { $FORM{$groups} =~ tr/\n//d; $FORM{$groups} =~ tr/\r//d; } fopen(FILE, ">$vardir/membergroups.txt", 1); print FILE "$FORM{'admin'}\n"; print FILE "$FORM{'moderator'}\n"; print FILE "$FORM{'newbie'}\n"; print FILE "$FORM{'junior'}\n"; print FILE "$FORM{'full'}\n"; print FILE "$FORM{'senior'}\n"; print FILE "$FORM{'god'}\n"; print FILE "$additional"; fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub SetCensor { &is_admin; my( @censored, $i ); fopen(FILE, "$vardir/censor.txt"); @censored = ; fclose(FILE); foreach $i (@censored) { $i =~ tr/\r//d; $i =~ tr/\n//d; } $yymain .= qq~
$txt{'135'}
$txt{'136'}


~; $yytitle = "$txt{'135'}"; &template; exit; } sub SetCensor2 { &is_admin; $FORM{'censored'} =~ tr/\r//d; $FORM{'censored'} =~ s~\A[\s\n]+~~; $FORM{'censored'} =~ s~[\s\n]+\Z~~; $FORM{'censored'} =~ s~\n\s*\n~\n~g; my @lines = split( /\n/, $FORM{'censored'} ); fopen(FILE, ">$vardir/censor.txt", 1); foreach my $i (@lines) { $i =~ tr/\n//d; unless( $i && $i =~ m~.+\=.+~ ) { next; } print FILE "$i\n"; } fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub SetReserve { my( @reserved, @reservecfg, $i ); &is_admin; fopen(FILE, "$vardir/reserve.txt"); @reserved = ; fclose(FILE); fopen(FILE, "$vardir/reservecfg.txt"); @reservecfg = ; fclose(FILE); for(my $i = 0; $i < @reservecfg; $i++) { chomp $reservecfg[$i]; } $yymain .= qq~
$txt{'341'}

$txt{'699'}

$txt{'342'}

$txt{'726'}
$txt{'727'}
$txt{'728'}
$txt{'729'}
~; $yytitle = "$txt{'341'}"; &template; exit; } sub SetReserve2 { &is_admin; $FORM{'reserved'} =~ tr/\r//d; $FORM{'reserved'} =~ s~\A[\s\n]+~~; $FORM{'reserved'} =~ s~[\s\n]+\Z~~; $FORM{'reserved'} =~ s~\n\s*\n~\n~g; fopen(FILE, ">$vardir/reserve.txt", 1); my $matchword = $FORM{'matchword'} eq 'checked' ? 'checked' : ''; my $matchcase = $FORM{'matchcase'} eq 'checked' ? 'checked' : ''; my $matchuser = $FORM{'matchuser'} eq 'checked' ? 'checked' : ''; my $matchname = $FORM{'matchname'} eq 'checked' ? 'checked' : ''; print FILE $FORM{'reserved'}; fclose(FILE); fopen(FILE, "+>$vardir/reservecfg.txt"); print FILE "$matchword\n"; print FILE "$matchcase\n"; print FILE "$matchuser\n"; print FILE "$matchname\n"; fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub ModifyTemplate { &is_admin; my( $fulltemplate, $line ); ### User Templates ### if($FORM{'templatefile'}) { $templatefile = $FORM{'templatefile'} } else { $templatefile = "default.html"; } opendir(TMPLDIR, $templatesdir); @templates = readdir(TMPLDIR); closedir(TMPLDIR); $templs = ""; foreach $file(sort @templates) { ($name, $ext) = split(/\./, $file); $selected = ''; if($ext eq 'html' || $ext eq 'htm') { if($file eq $templatefile) { $selected = ' selected'; } $templs .= qq~\n~; } } fopen(FILE, "$templatesdir/$templatefile"); # fopen(FILE, "$boarddir/template.html"); ###/User Templates ### while( $line = ) { $line =~ s~[\r\n]~~g; &FromHTML; $fulltemplate .= qq~$line\n~; } fclose(FILE); $yymain .= qq~
$txt{'216'}

$txt{'682'}

$templs{'3'}



~; $yytitle = "$txt{'216'}"; &template; exit; } sub ModifyTemplate2 { &is_admin; $FORM{'template'} =~ tr/\r//d; $FORM{'template'} =~ s~\A\n~~; $FORM{'template'} =~ s~\n\Z~~; ### User Templates ### if($FORM{'templatefile'}) { $templatefile = $FORM{'templatefile'}; } else { $templatefile = "default.html"; } fopen(FILE, ">$templatesdir/$templatefile"); # fopen(FILE, ">$boarddir/template.html"); ###/User Templates ### print FILE $FORM{'template'}; fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub ModifyAgreement { &is_admin; my( $fullagreement, $line ); fopen(FILE, "$vardir/agreement.txt"); while( $line = ) { $line =~ tr/[\r\n]//d; &FromHTML($line); $fullagreement .= qq~$line\n~; } fclose(FILE); $yymain .= qq~
$txt{'764'}

$txt{'765'}




~; $yytitle = "$txt{'764'}"; &template; exit; } sub ModifyAgreement2 { &is_admin; $FORM{'agreement'} =~ tr/\r//d; $FORM{'agreement'} =~ s~\A\n~~; $FORM{'agreement'} =~ s~\n\Z~~; fopen(FILE, ">$vardir/agreement.txt"); print FILE $FORM{'agreement'}; fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub ModifySettings { &is_admin; my($gtsl9, $gtsl8, $gtsl7, $gtsl6, $gtsl5, $gtsl4, $gtsl3, $gtsl2, $gtsl1); my($mainchecked, $guestaccchecked, $forcechecked, $blankchecked, $agreechecked, $mailpasschecked, $newpasschecked, $welchecked); my($menuchecked, $ubbcchecked, $aluchecked, $cpchecked, $pbchecked, $insertchecked, $newschecked, $gpchecked, $notifchecked); my ($uapchecked, $uepchecked, $udpchecked, $gvchecked); my($ahmchecked, $slmchecked, $srbarchecked, $smbarchecked, $smreadchecked, $smodchecked, $supicchecked, $sutextchecked, $sgichecked); my($snfchecked, $fls1, $fls2, $fls3, $utfchecked, $truncchecked, $mts1, $mts2, $mts3, $tsl6, $tsl5, $tsl4, $tsl3, $tsl2, $tsl1); # figure out what to print if ($maintenance) { $mainchecked = ' checked'; } if ($guestaccess == 0) { $guestaccchecked = ' checked'; } if($RegAgree) { $agreechecked = " checked"; } if($emailpassword) { $mailpasschecked = " checked"; } if($emailnewpass) { $newpasschecked = " checked"; } if($emailwelcome) { $welchecked = " checked"; } if ($MenuType) { $menuchecked = ' checked'; } if ($enable_quickreply) { $quickreplychecked = ' checked'; } if ($enable_quicksmilies) { $quicksmilieschecked = ' checked'; } if ($enable_ubbc) { $ubbcchecked = ' checked'; } if ($autolinkurls) { $aluchecked = ' checked'; } if ($curposlinks) { $cpchecked = ' checked'; } if ($profilebutton) { $pbchecked = ' checked'; } if ($enable_news) { $newschecked = "checked" } if ($enable_guestposting) { $gpchecked = "checked" } if ($enable_notification) { $notifchecked = "checked" } if ($allow_hide_email) { $ahmchecked = "checked" } if ($showlatestmember) { $slmchecked = "checked" } if ($Show_RecentBar) { $srbarchecked = "checked" } if ($showmarkread) { $smreadchecked = "checked" } if ($showmodify) { $smodchecked = "checked" } if ($ShowBDescrip) { $bdescripchecked = "checked" } if ($showuserpic) { $supicchecked = "checked" } if ($showusertext) { $sutextchecked = "checked" } if ($showgenderimage) { $sgichecked = "checked" } if ($enable_sortbar == 1) { $sortbarchecked = "checked" } if ($shownewsfader) { $snfchecked = "checked" } if ($showyabbcbutt) { $syabbcchecked = "checked" } if ($useraddpoll) { $uapchecked = "checked" } if ($usereditpoll) { $uepchecked = "checked" } if ($userdelpoll) { $udpchecked = "checked" } if ($guestvoting) { $gvchecked = "checked" } if ($showip) { $sipchecked = "checked" } if ($loggedip) { $lipchecked = "checked" } if ($allowpics) { $allowpicschecked = "checked" } if ($showallgroups) { $showallgroupschecked = "checked" } if (!$OnlineLogTime) { $OnlineLogTime = "15" } if ($use_flock == 0) { $fls1 = " selected" } elsif ($use_flock == 1) { $fls2 = " selected" } elsif ($use_flock == 2) { $fls3 = " selected" } $utfchecked = $usetempfile ? ' checked' : ''; $truncchecked = $faketruncation ? ' checked' : ''; if ($mailtype == 0) { $mts1 = ' selected'; } elsif ($mailtype == 1) { $mts2 = ' selected'; } elsif( $mailtype == 2 ) { $mts3 = ' selected'; } if ($timeselected == 6) { $tsl6 = " selected" } elsif ($timeselected == 5) { $tsl5 = " selected" } elsif ($timeselected == 4) { $tsl4 = " selected" } elsif ($timeselected == 3) { $tsl3 = " selected" } elsif ($timeselected == 2) { $tsl2 = " selected" } else { $tsl1 = " selected" } if ($gtimeselected == 9) { $gtsl9 = " selected" } elsif ($gtimeselected == 8) { $gtsl8 = " selected" } elsif ($gtimeselected == 7) { $gtsl7 = " selected" } elsif ($gtimeselected == 6) { $gtsl6 = " selected" } elsif ($gtimeselected == 5) { $gtsl5 = " selected" } elsif ($gtimeselected == 4) { $gtsl4 = " selected" } elsif ($gtimeselected == 3) { $gtsl3 = " selected" } elsif ($gtimeselected == 2) { $gtsl2 = " selected" } else { $gtsl1 = " selected" } $yymain .= qq~
$txt{'222'}

$txt{'347'}

$txt{'350'}
$txt{'351'}
$txt{'349'}

$txt{'348'}
$txt{'348Text'}

$txt{'632'}
$txt{'380'}

$txt{'432'}
$txt{'352'}
$txt{'353'}

$txt{'584'}
$txt{'702'}
$txt{'639'}
$txt{'619'}

$txt{'354'}
$txt{'407'}
$txt{'355'}
$txt{'404'}

$txt{'356'}
$txt{'357'}
$txt{'358'}
$txt{'359'}
$txt{'360'}
$txt{'361'}
$templs{'1'}
$txt{'362'}
$txt{'423'}
$txt{'363'}
$txt{'390'}
$txt{'506'}
$txt{'364'}

$txt{'784'}
$txt{'365'}
$txt{'366'}
$txt{'367'}
$txt{'368'}
$txt{'640'}
$txt{'369'}
$txt{'370'}
$txt{'389'}

$txt{'521'}
$txt{'522'}
$txt{'523'}
$txt{'382'}
$txt{'387'}
$txt{'388'}
$txt{'509'}
$txt{'618'}
$txt{'732'}
$txt{'383'}
$txt{'384'}
$txt{'385'}
$txt{'386'}
$sorttxt{'1'}
$txt{'740'}
Show IP on posts?
Show alternate text for IP?
Alternate text to show for IP

$txt{'587'}
$txt{'371'}
$gmtxt{'10'}

$rtm{'28'}
$rtm{'28a'}
$rtm{'30'}
$rtm{'30a'}
$rtm{'31'}
$rtm{'32'}
$rtm{'33'}
$rtm{'29'}

$txt{'173a'}
$txt{'174a'}
$txt{'378'}
$txt{'524'}
$txt{'379'}
$txt{'498'}

$polltxt{'28'}
$polltxt{'29'}
$polltxt{'30'}
$polltxt{'31'}
$polltxt{'32'}

$txt{'746'}
$txt{'381'}
$txt{'723'}
$txt{'689'}
$txt{'408'}

$txt{'476'}
$txt{'477'}
$txt{'478'}

$txt{'588'}
$txt{'589'}
$txt{'590'}
$txt{'591'}
$amv_txt{'12'}

$txt{'372'}
$txt{'373'}
$txt{'374'}
$txt{'375'}

$txt{'690'}
$amv_txt{'13'}
$txt{'376'}

$txt{'392'}
$txt{'393'}
$txt{'607'}
$txt{'391'}
$txt{'615'}
$txt{'630'}

~; $yytitle = $txt{'222'}; &template; exit; } sub GetBoardURL { my $url = 'http://' . ($ENV{'HTTP_HOST'} ? $ENV{'HTTP_HOST'} : $ENV{'SERVER_NAME'}) . ($ENV{'SERVER_PORT'} != 80 ? ":$ENV{'SERVER_PORT'}" : '') . $ENV{'SCRIPT_NAME'}; $url =~ s~/[^/]+\Z~/~; return $url; } # Gets our current absolute path. Needed for error messages. sub GetDirPath { eval 'use Cwd; $cwd = cwd();'; unless( $cwd ) { $cwd = `pwd`; chomp $cwd; } unless($cwd) { $cwd = $0 || $ENV{'PWD'} || $ENV{'CWD'} || ( $ENV{'DOCUMENT_ROOT'} . '/' . $ENV{'SCRIPT_NAME'} || $ENV{'PATH_INFO'} ); } $cwd =~ tr~\\~/~; $cwd =~ s~\A(.+)/\Z~$1~; $cwd =~ s~\A(.+)/YaBB\.\w+\Z~$1~i; return $cwd; } sub is_exe { my ($cmd,$name); foreach $cmd (@_) { $name = ($cmd =~ /^(\S+)/)[0]; # remove any options return ($cmd) if (-x $name and ! -d $name and $name =~ m:/:); # check for absolute or relative path if (defined $ENV{PATH}) { my $dir; foreach $dir (split(/:/, $ENV{PATH})) { return "$dir/$cmd" if (-x "$dir/$name" && ! -d "$dir/$name"); } } } 0; } sub ModifySettings2 { &is_admin; my @onoff = qw/ 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/; push(@onoff, "useraddpoll", "usereditpoll", "userdelpoll", "guestvoting"); push @onoff, 'showip'; push @onoff, 'loggedip'; # Set as 0 or 1 if box was checked or not my $fi; map { $fi = lc $_; ${$_} = $FORM{$fi} eq 'on' ? 1 : 0; } @onoff; $enable_quickreply = $FORM{'enable_quickreply'} ? 1 : 0; $enable_quicksmilies = $FORM{'enable_quicksmilies'} ? 1 : 0; $guestaccess = $guestaccess ? 0 : 1; $enable_sortbar = $FORM{'enable_sortbar'} ? 1 : 0; # If empty fields are submitted, set them to default-values to save yabb from crashing $maintenancetext = $FORM{'maintenancetext'} || ""; &ToHTML($maintenancetext); $timeout = $FORM{'timeout'} || 5; $fadertime = $FORM{'fadertime'} || 5000; $timeselected = $FORM{'timeselect'} || 0; $gtimeselected = $FORM{'gtimeselect'} || 9; $loggediptxt = $FORM{'loggediptxt'} || "IP logged"; $timeoffset = $FORM{'timeoffset'} || 0; $TopAmmount = $FORM{'TopAmmount'} || 25; $MembersPerPage = $FORM{'MembersPerPage'} || 20; $maxdisplay = $FORM{'maxdisplay'} || 20; $maxmessagedisplay = $FORM{'maxmessagedisplay'} || 20; $max_log_days_old = $FORM{'max_log_days_old'} || 21; $clicklogtime = $FORM{'clicklogtime'} || 1440; if($clicklogtime >= 1440) { $clicklogtime = 1439; } $OnlineLogTime = $FORM{'OnlineLogTime'} || 15; if($OnlineLogTime >= 1440) { $OnlineLogTime = 1439; } $use_flock = $FORM{'use_flock'} || 0; $LOCK_EX = $FORM{'LOCK_EX'} || 2; $LOCK_UN = $FORM{'LOCK_UN'} || 8; $LOCK_SH = $FORM{'LOCK_SH'} || 1; $Cookie_Length = $FORM{'cookielength'} || 60; $cookieusername = $FORM{'cookieusername'} || 'YaBBusername'; $cookiepassword = $FORM{'cookiepassword'} || 'YaBBpassword'; if ($cookieusername eq $cookiepassword) {$cookieusername = 'YaBBusername'; $cookiepassword = 'YaBBpassword';} $maxmesslen = $FORM{'maxmesslen'} || 5000; $numpolloptions = $FORM{'numpolloptions'} || 8; $maxsiglen = $FORM{'maxsiglen'} || 200; $jrmem = $FORM{'jrmem'} || 50; $fullmem = $FORM{'fullmem'} || 100; $srmem = $FORM{'srmem'} || 250; $godmem = $FORM{'godmem'} || 500; $showallgroups = $FORM{'showallgroups'} ? 1 : 0; $language = $FORM{'language'} || 'english.lng'; $mbname = $FORM{'mbname'} || 'My YaBB 1 Gold - SP1'; $mbname =~ s/\"/\'/g; $boardurl = $FORM{'boardurl'} || &GetBoardURL; $boarddir = $FORM{'boarddir'} || &GetDirPath; $boardsdir = $FORM{'boardsdir'} || "$boarddir/Boards"; $datadir = $FORM{'datadir'} || "$boarddir/Messages"; $memberdir = $FORM{'memberdir'} || "$boarddir/Members"; $sourcedir = $FORM{'sourcedir'} || "$boarddir/Sources"; $vardir = $FORM{'vardir'} || "$boarddir/Variables"; $templatesdir = $FORM{'templatesdir'} || "$boarddir/Templates"; $facesdir = $FORM{'facesdir'} || "$boarddir/YaBBImages/avatars"; $facesurl = $FORM{'facesurl'} || "$boardurl/YaBBImages/avatars"; $imagesdir = $FORM{'imagesdir'} || "$boardurl/YaBBImages"; $helpfile = $FORM{'helpfile'} || "$boardurl/YaBBHelp/index.html"; $mailprog = $FORM{'mailprog'} || &is_exe('/usr/lib/sendmail','/usr/sbin/sendmail','/usr/ucblib/sendmail','sendmail','mailx','Mail','mail'); $smtp_server = $FORM{'smtp_server'} || '127.0.0.1'; $webmaster_email = $FORM{'webmaster_email'} || 'webmaster@mysite.com'; $mailtype = $FORM{'mailtype'} || 0; $color{'titlebg'} = $FORM{'titlebg'} || '#6E94B7'; $color{'titletext'} = $FORM{'titletext'} || '#FFFFFF'; $color{'windowbg'} = $FORM{'windowbg'} || '#AFC6DB'; $color{'windowbg2'} = $FORM{'windowbg2'} || '#F8F8F8'; $color{'windowbg3'} = $FORM{'windowbg3'} || '#6394BD'; $color{'catbg'} = $FORM{'catbg'} || '#DEE7EF'; $color{'bordercolor'} = $FORM{'bordercolor'} || '#6394BD'; $color{'fadertext'} = $FORM{'fadertext'} || '#D4AD00'; $faderpath = $FORM{'faderpath'} || "$boardurl/fader.js"; $ubbcjspath = $FORM{'ubbcjspath'} || "$boardurl/ubbc.js"; if ($FORM{'userpic_width'} =~ /\d+/) { $userpic_width = $FORM{'userpic_width'}; } else { $userpic_width = 65; } if ($FORM{'userpic_height'} =~ /\d+/) { $userpic_height = $FORM{'userpic_height'}; } else { $userpic_height = 65; } $userpic_limits = $FORM{'userpic_limits'} || 'Please note that your image has to be gif or jpg and that it will be resized!'; $userpic_limits =~ s/\"/\'/g; my $filler = q~ ~; my $setfile = << "EOF"; ############################################################################### # Settings.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 1 Gold - SP 1.1 # # Released: December 2001; Updated March 22, 2002 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2002 Xnull (www.xnull.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # ############################################################################### ########## Board Info ########## # Note: these settings must be properly changed for YaBB to work \$maintenance = $maintenance; # Set to 1 to enable Maintenance mode \$guestaccess = $guestaccess; # Set to 0 to disallow guests from doing anything but login or register \$language = "$language"; # Change to language pack you wish to use \$mbname = "$mbname"; # The name of your YaBB forum \$boardurl = "$boardurl"; # URL of your board's folder (without trailing '/') \$Cookie_Length = $Cookie_Length; # Default minutes to set login cookies to stay for \$cookieusername = "$cookieusername"; # Name of the username cookie \$cookiepassword = "$cookiepassword"; # Name of the password cookie \$RegAgree = $RegAgree; # Set to 1 to display the registration agreement when registering \$emailpassword = $emailpassword; # 0 - instant registration. 1 - password emailed to new members \$emailnewpass = $emailnewpass; # Set to 1 to email a new password to members if they change their email address \$emailwelcome = $emailwelcome; # Set to 1 to email a welcome message to users even when you have mail password turned off \$mailprog = "$mailprog"; # Location of your sendmail program \$smtp_server = "$smtp_server"; # Address of your SMTP-Server \$webmaster_email = q^$webmaster_email^; # Your email address. (eg: \$webmaster_email = q^admin\@host.com^;) \$mailtype = $mailtype; # Mail program to use: 0 = sendmail, 1 = SMTP, 2 = Net::SMTP ########## Directories/Files ########## # Note: directories other than \$imagesdir do not have to be changed unless you move things \$boarddir = "$boarddir"; # The server path to the board's folder (usually can be left as '.') \$boardsdir = "$boardsdir"; # Directory with board data files \$datadir = "$datadir"; # Directory with messages \$memberdir = "$memberdir"; # Directory with member files \$sourcedir = "$sourcedir"; # Directory with YaBB source files \$vardir = "$vardir"; # Directory with variable files \$templatesdir = "$templatesdir"; # Directory with template files. \$facesdir = "$facesdir"; # The server path to your avatars (userpics) folder \$facesurl = "$facesurl"; # URL to your avatars folder \$imagesdir = "$imagesdir"; # URL to your images folder \$ubbcjspath = "$ubbcjspath"; # URL to your 'ubbc.js' (REQUIRED for post/modify to work properly) \$faderpath = "$faderpath"; # URL to your 'fader.js' \$helpfile = "$helpfile"; # URL to your help file ########## Colors ########## # Note: equivalent to colors in CSS tag of template.html, so set to same colors preferrably # for browsers without CSS compatibility and for some items that don't use the CSS tag \$color{'titlebg'} = "$color{'titlebg'}"; # Background color of the 'title-bar' \$color{'titletext'} = "$color{'titletext'}"; # Color of text in the 'title-bar' (above each 'window') \$color{'windowbg'} = "$color{'windowbg'}"; # Background color for messages/forms etc. \$color{'windowbg2'} = "$color{'windowbg2'}"; # Background color for messages/forms etc. \$color{'windowbg3'} = "$color{'windowbg3'}"; # Color of horizontal rules in posts \$color{'catbg'} = "$color{'catbg'}"; # Background color for category (at Board Index) \$color{'bordercolor'} = "$color{'bordercolor'}"; # Table Border color for some tables \$color{'fadertext'} = "$color{'fadertext'}"; # Color of text in the NewsFader (news color) ########## Layout ########## \$maintenancetext = "$maintenancetext"; # User-defined text for Maintenance mode (leave blank for default text) \$MenuType = $MenuType; # 1 for text menu or anything else for images menu \$curposlinks = $curposlinks; # 1 for links in navigation on current page, or 0 for text without link \$profilebutton = $profilebutton; # 1 to show view profile button under post, or 0 for blank \$timeselected = $timeselected; # Select your preferred output Format of Time and Date \$gtimeselected = $gtimeselected; # Select your preferred output Format of GMT Time and Date \$allow_hide_email = $allow_hide_email; # Allow users to hide their email from public. Set 0 to disable \$showlatestmember = $showlatestmember; # Set to 1 to display "Welcome Newest Member" on the Board Index \$shownewsfader = $shownewsfader; # 1 to allow or 0 to disallow NewsFader javascript on the Board Index # If 0, you'll have no news at all unless you put tag # back into template.html!!! \$Show_RecentBar = $showrecentbar; # Set to 1 to display the Recent Post on Board Index \$showmarkread = $showmarkread; # Set to 1 to display and enable the mark as read buttons \$showmodify = $showmodify; # Set to 1 to display "Last modified: Realname - Date" under each message \$ShowBDescrip = $showbdescrip; # Set to 1 to display board descriptions on the topic (message) index for each board \$showuserpic = $showuserpic; # Set to 1 to display each member's picture in the message view (by the ICQ.. etc.) \$showusertext = $showusertext; # Set to 1 to display each member's personal text in the message view (by the ICQ.. etc.) \$showgenderimage = $showgenderimage; # Set to 1 to display each member's gender in the message view (by the ICQ.. etc.) \$enable_sortbar = $enable_sortbar; # Set to 1 to display the sort topic bar in the message index \$showyabbcbutt = $showyabbcbutt; # Set to 1 to display the yabbc buttons on Posting and IM Send Pages \$showip = $showip; # Set to 1 to display IP on message\$loggedip = $loggedip; # Set to 1 to display custom text in stead of IP\$loggediptxt = \"$loggediptxt\"; # The text to display instead of the IP ########## Feature Settings ########## \$enable_quickreply = $enable_quickreply; # Set to 1 if you want to enable the quick reply box \$enable_quicksmilies = $enable_quicksmilies; # Set to 1 if you want to show smilies in the quick reply box \$enable_ubbc = $enable_ubbc; # Set to 1 if you want to enable UBBC (Uniform Bulletin Board Code) \$enable_news = $enable_news; # Set to 1 to turn news on, or 0 to set news off \$allowpics = $allowpics; # set to 1 to allow members to choose avatars in their profile \$enable_guestposting = $enable_guestposting; # Set to 0 if do not allow 1 is allow. \$enable_notification = $enable_notification; # Allow e-mail notification \$autolinkurls = $autolinkurls; # Set to 1 to turn URLs into links, or 0 for no auto-linking. \$timeoffset = $timeoffset; # Time Offset (so if your server is EST, this would be set to -1 for CST) \$TopAmmount = $TopAmmount; # No. of top posters to display on the top members list \$MembersPerPage = $MembersPerPage; # No. of members to display per page of Members List - All \$maxdisplay = $maxdisplay; # Maximum of topics to display \$maxmessagedisplay = $maxmessagedisplay; # Maximum of messages to display \$MaxMessLen = $maxmesslen; # Maximum Allowed Characters in a Posts \$numpolloptions = $numpolloptions; # Number of poll options \$useraddpoll = $useraddpoll; # Allow users to add polls to their own existing threads? (1 = yes) \$usereditpoll = $usereditpoll; # Allow users to edit their own polls? (1 = yes) \$userdelpoll = $userdelpoll; # Allow users to delete their own polls? (1 = yes) \$guestvoting = $guestvoting; # Allow guests to vote? (1 = yes) \$MaxSigLen = $maxsiglen; # Maximum Allowed Characters in Signatures \$ClickLogTime = $clicklogtime; # Time in minutes to log every click to your forum (longer time means larger log file size) \$OnlineLogTime = $OnlineLogTime; # Time in minutes before users are removed from the online log \$max_log_days_old = $max_log_days_old; # If an entry in the user's log is older than ... days remove it # Set to 0 if you want it disabled \$fadertime = $fadertime; # Length in milliseconds to delay between each item in the news fader \$timeout = $timeout; # Minimum time between 2 postings from the same IP ########## Membergroups ########## \$JrPostNum = $jrmem; # Number of Posts required to show person as 'junior' membergroup \$FullPostNum = $fullmem; # Number of Posts required to show person as 'full' membergroup \$SrPostNum = $srmem; # Number of Posts required to show person as 'senior' membergroup \$GodPostNum = $godmem; # Number of Posts required to show person as 'god' membergroup \$showallgroups = $showallgroups; # Select membergroups to show in memberview (0 = assigned membergroups only , 1 = assigned and post dependant membergroups) ########## MemberPic Settings ########## \$userpic_width = $userpic_width; # Set pixel size to which the selfselected userpics are resized, 0 disables this limit \$userpic_height = $userpic_height; # Set pixel size to which the selfselected userpics are resized, 0 disables this limit \$userpic_limits = qq~$userpic_limits~; # Text To Describe The Limits ########## File Locking ########## \$LOCK_EX = $LOCK_EX; # You can probably keep this as it is set now. \$LOCK_UN = $LOCK_UN; # You can probably keep this as it is set now. \$LOCK_SH = $LOCK_SH; # You can probably keep this as it is set now. \$use_flock = $use_flock; # Set to 0 if your server doesn't support file locking, # 1 for Unix/Linux and WinNT, and 2 for Windows 95/98/ME \$usetempfile = $usetempfile; # Write to a temporary file when updating large files. # This can potentially save your board index files from # being corrupted if a process aborts unexpectedly. # 0 to disable, 1 to enable. \$faketruncation = $faketruncation; # Enable this option only if YaBB fails with the error: # "truncate() function not supported on this platform." # 0 to disable, 1 to enable. 1; EOF $setfile =~ s~(.+\;)\s+(\#.+$)~$1 . substr( $filler, 0, (70-(length $1)) ) . $2 ~gem; $setfile =~ s~(.{64,}\;)\s+(\#.+$)~$1 . "\n " . $2~gem; $setfile =~ s~^\s\s\s+(\#.+$)~substr( $filler, 0, 70 ) . $1~gem; fopen(FILE, ">$boarddir/Settings.pl"); print FILE $setfile; fclose(FILE); $password = crypt($settings[0],$pwseed); $Cookie_Exp_Date = 'Sunday, 17-Jan-2038 00:00:00 GMT'; $yySetCookies1 = cookie(-name => "$cookieusername", -value => "$username", -path => "/", -expires => "$Cookie_Exp_Date"); $yySetCookies2 = cookie(-name => "$cookiepassword", -value => "$password", -path => "/", -expires => "$Cookie_Exp_Date"); &LoadIMs; &LoadUserSettings; &WriteLog; $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } 1;