############################################################################### # 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 ); fopen(FILE, "$boarddir/template.html"); while( $line = ) { $line =~ s~[\r\n]~~g; &FromHTML; $fulltemplate .= qq~$line\n~; } fclose(FILE); $yymain .= qq~
$txt{'216'}

$txt{'682'}




~; $yytitle = "$txt{'216'}"; &template; exit; } sub ModifyTemplate2 { &is_admin; $FORM{'template'} =~ tr/\r//d; $FORM{'template'} =~ s~\A\n~~; $FORM{'template'} =~ s~\n\Z~~; fopen(FILE, ">$boarddir/template.html"); 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; } # Advanced System eMails Mod sub EmailControlCenter { &is_admin; my( $advemailstemplates, @subjlist, @bodylist ); fopen(FILE, "$vardir/advemails.txt"); @EMAILTEMPL = ; fclose(FILE); @subjlist[0] = substr(@EMAILTEMPL[0],0,index(@EMAILTEMPL[0],'|')); @bodylist[0] = substr(@EMAILTEMPL[0],index(@EMAILTEMPL[0],'|')+1,length(@EMAILTEMPL[0])); @subjlist[1] = substr(@EMAILTEMPL[1],0,index(@EMAILTEMPL[1],'|')); @bodylist[1] = substr(@EMAILTEMPL[1],index(@EMAILTEMPL[1],'|')+1,length(@EMAILTEMPL[1])); @subjlist[2] = substr(@EMAILTEMPL[2],0,index(@EMAILTEMPL[2],'|')); @bodylist[2] = substr(@EMAILTEMPL[2],index(@EMAILTEMPL[2],'|')+1,length(@EMAILTEMPL[2])); @subjlist[3] = substr(@EMAILTEMPL[3],0,index(@EMAILTEMPL[3],'|')); @bodylist[3] = substr(@EMAILTEMPL[3],index(@EMAILTEMPL[3],'|')+1,length(@EMAILTEMPL[3])); @subjlist[4] = substr(@EMAILTEMPL[4],0,index(@EMAILTEMPL[4],'|')); @bodylist[4] = substr(@EMAILTEMPL[4],index(@EMAILTEMPL[4],'|')+1,length(@EMAILTEMPL[4])); @subjlist[5] = substr(@EMAILTEMPL[5],0,index(@EMAILTEMPL[5],'|')); @bodylist[5] = substr(@EMAILTEMPL[5],index(@EMAILTEMPL[5],'|')+1,length(@EMAILTEMPL[5])); @subjlist[6] = substr(@EMAILTEMPL[6],0,index(@EMAILTEMPL[6],'|')); @bodylist[6] = substr(@EMAILTEMPL[6],index(@EMAILTEMPL[6],'|')+1,length(@EMAILTEMPL[6])); @subjlist[7] = substr(@EMAILTEMPL[7],0,index(@EMAILTEMPL[7],'|')); @bodylist[7] = substr(@EMAILTEMPL[7],index(@EMAILTEMPL[7],'|')+1,length(@EMAILTEMPL[7])); @subjlist[8] = substr(@EMAILTEMPL[8],0,index(@EMAILTEMPL[8],'|')); @bodylist[8] = substr(@EMAILTEMPL[8],index(@EMAILTEMPL[8],'|')+1,length(@EMAILTEMPL[8])); @subjlist[9] = substr(@EMAILTEMPL[9],0,index(@EMAILTEMPL[9],'|')); @bodylist[9] = substr(@EMAILTEMPL[9],index(@EMAILTEMPL[9],'|')+1,length(@EMAILTEMPL[9])); @subjlist[10] = substr(@EMAILTEMPL[10],0,index(@EMAILTEMPL[10],'|')); @bodylist[10] = substr(@EMAILTEMPL[10],index(@EMAILTEMPL[10],'|')+1,length(@EMAILTEMPL[10])); @subjlist[11] = substr(@EMAILTEMPL[11],0,index(@EMAILTEMPL[11],'|')); @bodylist[11] = substr(@EMAILTEMPL[11],index(@EMAILTEMPL[11],'|')+1,length(@EMAILTEMPL[11])); @subjlist[12] = substr(@EMAILTEMPL[12],0,index(@EMAILTEMPL[12],'|')); @bodylist[12] = substr(@EMAILTEMPL[12],index(@EMAILTEMPL[12],'|')+1,length(@EMAILTEMPL[12])); @subjlist[13] = substr(@EMAILTEMPL[13],0,index(@EMAILTEMPL[13],'|')); @bodylist[13] = substr(@EMAILTEMPL[13],index(@EMAILTEMPL[13],'|')+1,length(@EMAILTEMPL[13])); @subjlist[14] = substr(@EMAILTEMPL[14],0,index(@EMAILTEMPL[14],'|')); @bodylist[14] = substr(@EMAILTEMPL[14],index(@EMAILTEMPL[14],'|')+1,length(@EMAILTEMPL[14])); @subjlist[15] = substr(@EMAILTEMPL[15],0,index(@EMAILTEMPL[15],'|')); @bodylist[15] = substr(@EMAILTEMPL[15],index(@EMAILTEMPL[15],'|')+1,length(@EMAILTEMPL[15])); @subjlist[16] = substr(@EMAILTEMPL[16],0,index(@EMAILTEMPL[16],'|')); @bodylist[16] = substr(@EMAILTEMPL[16],index(@EMAILTEMPL[16],'|')+1,length(@EMAILTEMPL[16])); if (length(@subjlist[0]) == 0) {@subjlist[0] = "[subject]" ;}; if (length(@bodylist[0]) < 2) {@bodylist[0] = "$txt{'247'}\n\n$txt{'128'}, [subject], $txt{'129'} [threadurl]\n\n$txt{'130'}"; }; if (length(@subjlist[1]) == 0) {@subjlist[1] = "$advemailtxt{'10'} ([subject])" ;}; if (length(@bodylist[1]) < 2) {@bodylist[1] = "$txt{'247'} [name]\n\n[sender] $advemailtxt{'11'}\n\n[message]\n\n$txt{'130'}"; }; if (length(@subjlist[2]) == 0) {@subjlist[2] = "$txt{'700'} [mbname]" ;}; if (length(@bodylist[2]) < 2) {@bodylist[2] = "$txt{'248'} [username]!\n\n$txt{'719'} [username] $txt{'492'} [password]\n\n$txt{'701'}\n\n[profile]\n\n$txt{'130'}"; }; if (length(@subjlist[3]) == 0) {@subjlist[3] = "$txt{'700'} [mbname]" ;}; if (length(@bodylist[3]) < 2) {@bodylist[3] = "$txt{'248'} [username]!\n\n$txt{'719'} [username], $txt{'492'} [password]\n\n$txt{'701'}\n\n[profile]\n\n$txt{'130'}"; }; if (length(@subjlist[4]) == 0) {@subjlist[4] = "$txt{'700'} [mbname]" ;}; if (length(@bodylist[4]) < 2) {@bodylist[4] = "$txt{'711'} [name],\n\n$txt{'719'} [username], $txt{'492'} [password]\n\n$txt{'130'}"; }; if (length(@subjlist[5]) == 0) {@subjlist[5] = "$txt{'700'} [mbname]" ;}; if (length(@bodylist[5]) < 2) {@bodylist[5] = "$txt{'733'} [password] $txt{'734'} [username].\n\n$txt{'701'} [profile]\n\n$txt{'130'}"; }; if (length(@subjlist[6]) == 0) {@subjlist[6] = "$txt{'118'}: [subject] ($txt{'318'} [sender])" ;}; if (length(@bodylist[6]) < 2) {@bodylist[6] = "$txt{'711'} [recipient],\n\n$txt{'712'}: [subject], $txt{'30'} [mbname]. $txt{'713'}:\n\n[topicurl]\n\n\n$txt{'714'},\n[sender]"; }; @bodylist[0] =~ s~\\n~\n~g; @bodylist[1] =~ s~\\n~\n~g; @bodylist[2] =~ s~\\n~\n~g; @bodylist[3] =~ s~\\n~\n~g; @bodylist[4] =~ s~\\n~\n~g; @bodylist[5] =~ s~\\n~\n~g; @bodylist[6] =~ s~\\n~\n~g; @bodylist[7] =~ s~\\n~\n~g; @bodylist[8] =~ s~\\n~\n~g; @bodylist[9] =~ s~\\n~\n~g; @bodylist[10] =~ s~\\n~\n~g; @bodylist[11] =~ s~\\n~\n~g; @bodylist[12] =~ s~\\n~\n~g; @bodylist[13] =~ s~\\n~\n~g; @bodylist[14] =~ s~\\n~\n~g; @bodylist[15] =~ s~\\n~\n~g; @bodylist[16] =~ s~\\n~\n~g; $yymain .= qq~

$advemailtxt{'1'}

$advemailtxt{'2'}
$advemailtxt{'12'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'3'}
$advemailtxt{'13'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'4'}
$advemailtxt{'14'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'5'}
$advemailtxt{'14'}

$advemailtxt{'15'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'6'}
$advemailtxt{'14'}

$advemailtxt{'15'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'7'}
$advemailtxt{'14'}

$advemailtxt{'15'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'8'}
$advemailtxt{'17'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'9'}
$advemailtxt{'16'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'18'}
$advemailtxt{'31'} $advemailtxt{'19'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'21'}
$advemailtxt{'22'} $advemailtxt{'19'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'23'}
$advemailtxt{'24'} $advemailtxt{'19'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'25'}
$advemailtxt{'24'} $advemailtxt{'19'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'27'}
$advemailtxt{'28'} $advemailtxt{'19'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'29'}
$advemailtxt{'31'} $advemailtxt{'38'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'30'}
$advemailtxt{'31'} $advemailtxt{'38'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'36'}
$advemailtxt{'31'} $advemailtxt{'38'}

$advemailtxt{'20'}

$txt{'319'}:   
$txt{'69'}:

$advemailtxt{'34'}
$advemailtxt{'35'}

$txt{'319'}:   
$txt{'69'}:

~; $yytitle = $advemailtxt{'1'}; &template; exit; } sub EmailControlCenter3 { $_[0] =~ tr/\r//d; $_[0] =~ s~\A\n~~; $_[0] =~ s~\n\Z~~; $_[0] =~ s/\|/ /g; $_[1] =~ s/\cM//g; $_[1] =~ s~\[([^\]]{0,30})\n([^\]]{0,30})\]~\[$1$2\]~g; $_[1] =~ s~\[/([^\]]{0,30})\n([^\]]{0,30})\]~\[/$1$2\]~g; $_[1] =~ s~(\w+://[^<>\s\n\"\]\[]+)\n([^<>\s\n\"\]\[]+)~$1\n$2~g; $_[1] =~ s~\t~ \ ~g; $_[1] =~ s~\n~\\n~g; } sub EmailControlCenter2 { &is_admin; EmailControlCenter3($FORM{'subj0'},$FORM{'body0'}); EmailControlCenter3($FORM{'subj1'},$FORM{'body1'}); EmailControlCenter3($FORM{'subj2'},$FORM{'body2'}); EmailControlCenter3($FORM{'subj3'},$FORM{'body3'}); EmailControlCenter3($FORM{'subj4'},$FORM{'body4'}); EmailControlCenter3($FORM{'subj5'},$FORM{'body5'}); EmailControlCenter3($FORM{'subj6'},$FORM{'body6'}); EmailControlCenter3($FORM{'subj7'},$FORM{'body7'}); EmailControlCenter3($FORM{'subj8'},$FORM{'body8'}); EmailControlCenter3($FORM{'subj9'},$FORM{'body9'}); EmailControlCenter3($FORM{'subj10'},$FORM{'body10'}); EmailControlCenter3($FORM{'subj11'},$FORM{'body11'}); EmailControlCenter3($FORM{'subj12'},$FORM{'body12'}); EmailControlCenter3($FORM{'subj13'},$FORM{'body13'}); EmailControlCenter3($FORM{'subj14'},$FORM{'body14'}); EmailControlCenter3($FORM{'subj15'},$FORM{'body15'}); EmailControlCenter3($FORM{'subj16'},$FORM{'body16'}); fopen(FILE, ">$vardir/advemails.txt"); print FILE $FORM{'subj0'}; print FILE "|"; print FILE $FORM{'body0'}; print FILE "\n"; print FILE $FORM{'subj1'}; print FILE "|"; print FILE $FORM{'body1'}; print FILE "\n"; print FILE $FORM{'subj2'}; print FILE "|"; print FILE $FORM{'body2'}; print FILE "\n"; print FILE $FORM{'subj3'}; print FILE "|"; print FILE $FORM{'body3'}; print FILE "\n"; print FILE $FORM{'subj4'}; print FILE "|"; print FILE $FORM{'body4'}; print FILE "\n"; print FILE $FORM{'subj5'}; print FILE "|"; print FILE $FORM{'body5'}; print FILE "\n"; print FILE $FORM{'subj6'}; print FILE "|"; print FILE $FORM{'body6'}; print FILE "\n"; print FILE $FORM{'subj7'}; print FILE "|"; print FILE $FORM{'body7'}; print FILE "\n"; print FILE $FORM{'subj8'}; print FILE "|"; print FILE $FORM{'body8'}; print FILE "\n"; print FILE $FORM{'subj9'}; print FILE "|"; print FILE $FORM{'body9'}; print FILE "\n"; print FILE $FORM{'subj10'}; print FILE "|"; print FILE $FORM{'body10'}; print FILE "\n"; print FILE $FORM{'subj11'}; print FILE "|"; print FILE $FORM{'body11'}; print FILE "\n"; print FILE $FORM{'subj12'}; print FILE "|"; print FILE $FORM{'body12'}; print FILE "\n"; print FILE $FORM{'subj13'}; print FILE "|"; print FILE $FORM{'body13'}; print FILE "\n"; print FILE $FORM{'subj14'}; print FILE "|"; print FILE $FORM{'body14'}; print FILE "\n"; print FILE $FORM{'subj15'}; print FILE "|"; print FILE $FORM{'body15'}; print FILE "\n"; print FILE $FORM{'subj16'}; print FILE "|"; print FILE $FORM{'body16'}; print FILE "\n"; fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } # End Advanced System eMails Mod sub ModifySettings { &is_admin; my ($chainmail_chk,$rtmods_chk,$rtglobals_chk,$rtadmins_chk); if ( $chain_mail eq '' ) { $chain_mail = 1; } if($imspam eq "off") {$imspam = "";} my($mainchecked, $guestaccchecked, $forcechecked, $blankchecked, $agreechecked, $mailpasschecked, $newpasschecked, $welchecked); my($menuchecked, $ubbcchecked, $aluchecked, $cpchecked, $pbchecked, $insertchecked, $newschecked, $gpchecked, $notifchecked); my ($uapchecked, $upchecked); 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); my($checkextcheck, $extlist, $extitem, $amdisplaypicscheck, $allowattachcheck, $allowguestattachcheck, $st1, $st2); # figure out what to print foreach $extitem(@ext) { $extlist .= "$extitem "; } if ($checkext == 1) { $checkextcheck = ' checked'; } if ($amdisplaypics == 1) { $amdisplaypicscheck = ' checked'; } if ($allowattach == 1) { $allowattachcheck = ' checked'; } if ($allowguestattach == 1) { $allowguestattachcheck = ' checked'; } if ($maintenance) { $mainchecked = ' checked'; } if ($chain_mail) { $chainmail_chk = ' checked'; } if ($auto_rtmods) { $rtmods_chk = ' checked'; } if ($auto_rtglobals) { $rtglobals_chk = ' checked'; } if ($auto_rtadmins) { $rtadmins_chk = ' 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_quickpost) { $quickpostchecked = ' 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 ($enable_mailsounds) {$senablemailsounds = 'checked' } if ($enable_mailpopup) {$senablemailpopup = 'checked' } if ($enable_imlimit) {$senableimlimit = 'checked' } if ($send_welcomeim) {$send_welcomeimchecked = 'checked' } if ($enable_buddies) {$enable_buddieschecked = 'checked' } if ($popup_on) {$popup_onchecked = 'checked' } if ($showgenderimage) { $sgichecked = "checked" } if ($shownewsfader) { $snfchecked = "checked" } if ($showyabbcbutt) { $syabbcchecked = "checked" } $maxpq ||= 60; $maxpo ||= 50; $maxpc ||= 0; $numpolloptions ||= 8; if ($useraddpoll) { $uapchecked = " checked" } if ($ubbcpolls) { $upchecked = " 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" } $imtext =~ s/\&\&/\n/g; $imtext =~ s/\<//g; $imsubject =~ s/\&\&/\n/g; $imsubject =~ s/\<//g; if ($servertype == 0) { $st1 = " selected"; } elsif ($servertype == 1) { $st2 = " selected"; } $yymain .= qq~
~; if($soundsdir && opendir(DIR, "$soundsdir")) { opendir(DIR, "$soundsdir") || fatal_error("$txt{'230'} ($soundsdir)!
$imtxt{'27'}"); @contents = readdir(DIR); closedir(DIR); $sounds = ""; if ($sound eq "blank.wav" || $sound eq "") { $sounds = qq~ ~; } else { $yymain .= qq~~; } $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'}
$rtm{'28a'}
$rtm{'28b'}
$rtm{'29a'}
$rtm{'29b'}
$rtm{'30a'}
$rtm{'30b'}
$rtm{'31a'}
$rtm{'31b'}

$txt{'356'}
$txt{'357'}
$txt{'358'}
$txt{'359'}
$txt{'360'}
$txt{'361'}
$txt{'362'}
$imtxt{'25'}
$imtxt{'26'}
$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'}
$txt{'740'}

$txt{'587'}
$txt{'371'}

$quick_txt{'3'}
$quick_txt{'4'}
$quick_txt{'5'}
$txt{'378'}
$txt{'524'}
$txt{'379'}
$txt{'498'}

$polltxt{'28'}
$polltxt{'61'}
$polltxt{'62'}
$polltxt{'63'}
$polltxt{'29'}
$polltxt{'60'}

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

$imtxt{'75'}
$imtxt{'52'}
$imtxt{'43'}
$imtxt{'30'}
$imtxt{'76'}
$imtxt{'05'}
$imtxt{'44'}
$imtxt{'06'}
$imtxt{'03'} $txt{'320'}
$imtxt{'03'} $txt{'316'}
$imtxt{'03'} $imtxt{'46'}
$imtxt{'33'}
$imtxt{'34'}
$imtxt{'36'}
$imtxt{'35'}

$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_allow_html_mod{'4'}
$txt_allow_html_mod{'2'}
$txt_allow_html_mod{'3'}

$fatxt{'10'}
$fatxt{'11'}
$fatxt{'47'}
$fatxt{'12'}
$fatxt{'13'}
$fatxt{'14'}
$fatxt{'15'}
$fatxt{'16'}
$fatxt{'17'}
$fatxt{'18'}

$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", "ubbcpolls", "pollcomments"); push(@onoff, "enable_mailsounds", "enable_mailpopup", "enable_imlimit", "numibox", "numobox", "send_welcomeim", "enable_buddies", "enable_rim", "numposts", "popup_on"); if ( $FORM{chain_mail} eq 'on' ) { $chain_mail = 1; } else { $chain_mail = 0; } if ( $FORM{auto_rtmods} eq 'on' ) { $auto_rtmods = 1; } else { $auto_rtmods = 0; } if ( $FORM{auto_rtglobals} eq 'on' ) { $auto_rtglobals = 1; } else { $auto_rtglobals = 0; } if ( $FORM{auto_rtadmins} eq 'on' ) { $auto_rtadmins = 1; } else { $auto_rtadmins = 0; } # Set as 0 or 1 if box was checked or not my $fi; map { $fi = lc $_; ${$_} = $FORM{$fi} eq 'on' ? 1 : 0; } @onoff; $enable_quickpost = $FORM{'enable_quickpost'} ? 1 : 0; $enable_quickreply = $FORM{'enable_quickreply'} ? 1 : 0; $enable_quicksmilies = $FORM{'enable_quicksmilies'} ? 1 : 0; $guestaccess = $guestaccess ? 0 : 1; # If empty fields are submitted, set them to default-values to save yabb from crashing $upload_dir = $FORM{'upload_dir'}; $http_dir = $FORM{'http_dir'}; $servertype = $FORM{'servertype'} || 0; $extensions = $FORM{'extensions'}; chomp $extensions; $limit = $FORM{'limit'} || 0; $dirlimit = $FORM{'dirlimit'} || 0; $checkext = $FORM{'checkext'} || 0; $amdisplaypics = $FORM{'amdisplaypics'} || 0; $allowattach = $FORM{'allowattach'} || 0; $allowguestattach = $FORM{'allowguestattach'} || 0; $maintenancetext = $FORM{'maintenancetext'} || ""; &ToHTML($maintenancetext); $timeout = $FORM{'timeout'} || 5; $fadertime = $FORM{'fadertime'} || 5000; $timeselected = $FORM{'timeselect'} || 0; $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; $maxpq = $FORM{'maxpq'} || 60; $maxpo = $FORM{'maxpo'} || 50; $maxpc = $FORM{'maxpc'} || 0; $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"; $facesdir = $FORM{'facesdir'} || "$boarddir/YaBBImages/avatars"; $facesurl = $FORM{'facesurl'} || "$boardurl/YaBBImages/avatars"; $soundsdir = $FORM{'soundsdir'} || "$boarddir/sounds"; $soundsurl = $FORM{'soundsurl'} || "$boardurl/sounds"; $numposts = $FORM{'numposts'} || 0; $sounds_on = $FORM{'sounds_on'} || "blank.wav"; $numibox = $FORM{'numibox'} || 20; $numobox = $FORM{'numobox'} || 20; $numstore = $FORM{'numstore'} || 20; $sendname = $FORM{'sendname'} || admin; $imspam = $FORM{'imspam'} || off; $FORM{'imtext'} =~ s~\n~\&\&~g; $imtext = $FORM{'imtext'} || "Welcome in our community"; $imtext =~ s~\A\s+~~; $imtext =~ s~\s+\Z~~; $imtext =~ s~[\n\r]~~g; $imtext =~ s~"~\\"~g; $imtext =~ s~@~\\@~g; $imsubject = $FORM{'imsubject'} || "Welcome to $mbname"; $imsubject =~ s~"~\\"~g; $imsubject =~ s~[\n\r]~~g; $imsubject =~ s~\~~gi; $imsubject =~ s~\A\s+~~; $imsubject =~ s~\s+\Z~~; $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 \$chain_mail = $chain_mail; # If true reports will be sent up the chain of command (moderators, globals then admins) \$auto_rtmods = $auto_rtmods; # If true reports will be always sent to moderators \$auto_rtglobals = $auto_rtglobals; # If true reports will always be sent to global mods \$auto_rtadmins = $auto_rtadmins; # If true reports will always be sent to administrators ########## 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 \$facesdir = "$facesdir"; # The server path to your avatars (userpics) folder \$facesurl = "$facesurl"; # URL to your avatars folder \$soundsdir = "$soundsdir"; # Absolute Path to your sounds folder \$soundsurl = "$soundsurl"; # URL to your sounds 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 \$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.) \$showyabbcbutt = $showyabbcbutt; # Set to 1 to display the yabbc buttons on Posting and IM Send Pages \$enable_buddies = $enable_buddies; # Set to 1 to enable the BuddyList for users \$enable_mailsounds = $enable_mailsounds; # Set to 1 to enable info-sounds on new private messages \$sound = \"$sounds_on\"; # Set to 1 to enable Sound as default for new regged users \$enable_mailpopup = $enable_mailpopup; # Set to 1 to enable info-popup on new private messages \$popup_on = $popup_on; # Set to 1 to enable Popups as default for new regged users \$enable_imlimit = $enable_imlimit; # Set to 1 to enable limitation of incoming and outgoing im messages ########## Automated IM Settings ########## \$imtext = qq~$imtext~; \$sendname = $sendname; \$imsubject = "$imsubject"; \$send_welcomeim = $send_welcomeim; ########## File Attachment Settings ########## \$limit = $limit; # Set to the maximum number of kilobytes an attachment can be. Set to 0 to disable the file size check. \$dirlimit = $dirlimit; # Set to the maximum number of kilobytes the attachment directory can hold. Set to 0 to disable the directory size check. \$upload_dir = '$upload_dir'; # The absolute path to the directory where your attachments are to be stored (without trailing '/' ) \$TempFile::TMPDIRECTORY = '$upload_dir'; # Puts temporary files used into same folder as attachments to prevent permission problems \$http_dir = '$http_dir'; # The full url to the directory where your attachments are to be stored (without trailing '/' ) \$servertype = $servertype; # Set to 0 if you are running your YaBB on a Unix/Linux webhost, set to 1 if you are running on windows. \@ext = qw($extensions); # The allowed file extensions for file attachements. Variable should be set in the form of "jpg bmp gif" and so on. \$checkext = $checkext; # Set to 1 to enable file extension checking, set to 0 to allow all file types to be uploaded \$amdisplaypics = $amdisplaypics; # Set to 1 to display attached pictures in posts, set to 0 to only show a link to them. \$allowattach = $allowattach; # Set to 1 to allow file attaching, set to 0 to disable file attaching. \$allowguestattach = $allowguestattach; # Set to 1 to allow guests to upload attachments, 0 to disable guest attachment uploading. ########## Feature Settings ########## \$enable_quickpost = $enable_quickpost; # Set to 1 if you want to enable the quick post box \$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 \$maxpq = $maxpq; # Maximum Allowed Characters in a Poll Qestion? \$maxpo = $maxpo; # Maximum Allowed Characters in a Poll Option? \$maxpc = $maxpc; # Maximum Allowed Characters in a Poll Comment? \$useraddpoll = $useraddpoll; # Allow users to add polls to existing threads? (1 = yes) \$ubbcpolls = $ubbcpolls; # Allow UBBC tags and smilies in polls? (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 \$numposts = $numposts; # Number of posts required to send Instant Messages \$imspam = $imspam; # Percent of Users a user is a allowed to send a message at once \$numibox = $numibox; # Number of maximum Messages in the IM-Inbox \$numobox = $numobox; # Number of maximum Messages in the IM-Outbox \$numstore = $numstore; # Number of maximum Messages in the Storage box ########## 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;